mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[lua] Fixed wrong frame array length calculation in TransformConstraintTimeline. Updated spine-love README.md with instructions for debugging the example project with IntelliJ IDEA and EmmyLua. Closes #1611.
This commit is contained in:
parent
3a7aff7a5c
commit
2b879f9b7d
@ -32,5 +32,15 @@ Alternatively, the `spine-lua` and `spine-love/spine-love` directories can be co
|
||||
* To enable two color tinting, pass `true` to `SkeletonRenderer.new()`.
|
||||
|
||||
## Examples
|
||||
If you want to run and debug the example project, use IntelliJ IDEA with the EmmyLua plugin.
|
||||
|
||||
1. Install IntelliJ IDEA and the EmmyLua plugin.
|
||||
2. Install LÖVE.
|
||||
3. Copy the contents of `spine-lua` to `spine-love/spine-lua`.
|
||||
4. Open the `spine-love` folder in IntelliJ IDEA.
|
||||
5. Create a new launch configuration of the type `Lua Application`, with the following settings
|
||||
1. `Program` should point at the `love` or `love.exe` executable, e.g. `/Applications/love.app/Contents/MacOS/love` on macOS.
|
||||
2. `Working directory` should be the `spine-love/` directory.
|
||||
3. `Parameters` should be `./` so LÖVE loads the `main.lua` file from `spine-love/`.
|
||||
|
||||
[Simple Example](main.lua)
|
||||
|
||||
@ -1372,7 +1372,7 @@ function Animation.TransformConstraintTimeline.new (frameCount)
|
||||
local scale = 0
|
||||
local shear = 0
|
||||
if time >= frames[zlen(frames) - ENTRIES] then -- Time is after last frame.
|
||||
local i = zlen(frames.length)
|
||||
local i = zlen(frames)
|
||||
rotate = frames[i + PREV_ROTATE]
|
||||
translate = frames[i + PREV_TRANSLATE]
|
||||
scale = frames[i + PREV_SCALE]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user