https://github.com/mikuauahdark/lua-live2d-framework
(WIP) Live2D Cubism 3 Native Framework, but in Lua.
https://github.com/mikuauahdark/lua-live2d-framework
cubism3 live2d lua luajit luajit-ffi
Last synced: 14 days ago
JSON representation
(WIP) Live2D Cubism 3 Native Framework, but in Lua.
- Host: GitHub
- URL: https://github.com/mikuauahdark/lua-live2d-framework
- Owner: MikuAuahDark
- Created: 2019-05-27T15:59:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-28T16:05:18.000Z (about 5 years ago)
- Last Synced: 2025-01-27T12:48:20.681Z (8 months ago)
- Topics: cubism3, live2d, lua, luajit, luajit-ffi
- Language: Lua
- Homepage:
- Size: 103 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
lua-live2d-framework
====================[CubismNativeFramework](https://github.com/Live2D/CubismNativeFramework/tree/934c194f1eb29cdc7ff39dc4836bb79b076e5c24) but in Lua.
Provides both CubismNativeFramework-like API and [Live2LOVE](https://github.com/MikuAuahDark/Live2LOVE)-compatible API.
Differences
-----------C++ and Lua are completely different thing. Here are some differences between CubismNativeFramework and
lua-live2d-framework:* lua-live2d-framework uses `lowerCamelCase` naming while CubismNativeFramework uses `UpperCamelCase`.
* `CubismId` and `CubismIdHandle` does not exist. Lua string is used instead.
* Anything that uses numeric index ID are assumed to use 1-based indexing.
* There's no `Delete` function. Lua has automatic garbage collection.
* `CubismModel::GetDrawableVertexUvs` is `Model:getDrawableVertexUVs` (notice the uppercase `V`)
* `Model:getDrawableBlendMode` returns 2 strings, which maps to LOVE [BlendMode](https://love2d.org/wiki/BlendMode) and [BlendAlphaMode](https://love2d.org/wiki/BlendAlphaMode) respectively.
* `CubismModel::GetModel` returns backend-specific model object.
* `CubismMoc` equivalent class does not exist. Moc data string is passed directly to `Model` object constructor.
* In `MotionJson` (`CubismMotionJson` equivalent), any `IsExist*` method is replaced by `has*` method instead.
* All `is*` or `has*` method doesn't accept additional value to set the value. Use `set*` function respectively to set it.
* Addition of `Model:getAllParameterValue` which returns 4 values: current parameter value, min, max, and default value.
Third-party Libraries
---------------------Here's list of 3rd-party libraries used:
* [JSON.lua](http://regex.info/blog/lua/json) - CC-BY license.
* [Luaoop](https://github.com/ImagicTheCat/Luaoop) - MIT license.
* [nvec](https://github.com/MikuAuahDark/NPad93/blob/master/nvec.lua) - zLib license.
License
-------Most portion of the code falls into [Live2D Open Software License](http://live2d.com/eula/live2d-open-software-license-agreement_en.html)
which is incompatible with **GPL** and its friends. However, some part of the program like backend
and third-party libraries are licensed under permissive license. See each file for more information.Here are list of files (exclude `3p` folder) which falls under MIT license:
* `init.lua`
* Any files at `backend` folder.
* `math/Math.lua`
* `Live2LOVE.lua`
Anything not stated, with exception of `dummy.lua` falls into Live2D Open Software License.
This thread also worth checking: https://community.live2d.com/discussion/666/re-implementing-cubismnativeframework-is-it-allowed