LÖVE module to load and render Live2D Cubism 2 models.

Due to Live2D restrictions, this library must be compiled from source. Furthermore, source modification to LÖVE is needed for iOS and Android to package.preload this library.


If you have model definition file live2d/model.json

local Live2LOVE = require("Live2LOVE")
local model
function love.load()
	-- Live2LOVE fully respect love.filesystem
	-- so loading from fused game works out-of-the-box
	model = Live2LOVE.loadModel("live2d/model.json")
	model:setMotion("idle", "loop")
function love.draw()
	-- Model drawing also respects
	-- state, so you can render model to Canvas (enable stencil bufffer!)
	-- or apply Shader to it. Furthermore, graphics transformation is also
	-- applied to the model.
	-- Push stack"all")
	-- make the model cyan-masked, and 75% opaque, 1, 1, 1, 0.75)
	-- Scale down the model by 50%, 0.5)
	-- Rotate it by 30 degrees
	-- Move it to +300+200, 200)
	-- Draw the model
	-- Pop stack