Live2D Cubism Native Samples

repository·develop·Indexed 42 days ago

https://github.com/live2d/cubismnativesamples

Sample implementations for displaying Live2D Cubism models in native environments. Provides reference guides for using the Cubism Native Framework and Live2D Cubism Core across DirectX (9.0c, 11), Metal, OpenGL, and Vulkan on platforms including Windows, macOS, iOS, and Linux.

Tokens
11.2K
Snippets
29
Records
73
Agent score
52%

What's inside Live2D Cubism Native Samples

  1. Locate Cubism Core library and header files

    develop

    The Core directory is organized into three main subdirectories:

    • dll: Contains Shared (Dynamic) Library files.
    • include: Contains the necessary Header files.
    • lib: Contains Static Library files.
    Core
    ├─ dll          # Shared (Dynamic) Library files
    ├─ include      # Header file
    └─ lib          # Static Library files
  2. Understand the Live2D Cubism Core library

    develop
    Live2D Cubism Core is a lightweight library containing the headers and platform-specific library files required to load Cubism models into native applications. It serves as the foundational component for model loading and animation playback in native environments.
  3. Understand the stb library license

    develop

    The stb libraries are dual-licensed under the Public Domain and the MIT License.

    • You can use them for any purpose without legal obligation.
    • If your legal requirements necessitate a standard license, you may choose the MIT license.
    • Every source file includes an explicit dual-license declaration.
    • If you wrap an stb library in a new library, your new library does not have to be public domain or MIT; you can relicense your wrapper as you wish.
  4. Understand the difference between Full and Minimum sample versions

    develop

    The OpenGL samples provide two levels of feature implementation:

    Full Version

    Includes all features of the [Cubism Native Framework].

    • Capabilities: Play motions, set facial expressions, switch poses, set physics, and switch models via a menu button.
    • Availability: Available for Android, HarmonyOS, iOS, Linux, macOS, and Windows.

    Minimum Version

    Provides only the essential functionality.

    • Capabilities: Load and display a single model, play a single motion, set facial expressions, and set physics.
    • Limitations: Does not support switching poses or switching models.
    • Availability: Only available for Android.
  5. Using .bundle and .dylib on macOS Catalina or later

    develop
    When using .bundle and .dylib files on macOS Catalina and subsequent versions, an active internet connection is required for notarization verification. Refer to Apple's official documentation regarding app notarization before distribution.
  6. Linux OpenGL environment compatibility

    develop

    The Linux OpenGL environment has the following limitations:

    • CMake 4.0: Not supported because the project uses GLEW 2.2.0, which is incompatible with CMake 4.0.
    • Wayland: Not supported. While GLFW 3.4 supports Wayland, glewInit does not work properly with Wayland (EGL) in GLEW 2.2.0.

    Recommendation: Use X11 builds for Linux OpenGL environments.

  7. Understand the DirectX 9.0c sample versions

    develop

    The DirectX 9.0c samples are provided in two distinct functional modes:

    1. Full Version: Implements all features of the [Cubism Native Framework], including playing motions, setting facial expressions, switching poses, setting physics, and switching models via a menu button.
    2. Minimum Version: Provides only essential features. It can load and display a single model, play a single motion, set facial expressions, and set physics. It does not support switching poses or switching models.
  8. Understand the stb license

    develop
    The stb libraries are in the public domain. You can use them for any purpose without legal obligation. If you prefer a formal license, they are also dual-licensed under the MIT open source license. Every source file includes an explicit dual-license choice. Because they are public domain, you can wrap them in your own library and relicense your library under any license you choose.