Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
add physics update
Browse files Browse the repository at this point in the history
  • Loading branch information
MikalDev committed May 20, 2024
1 parent 50c8298 commit c8c2593
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
Binary file added dist/Spine-v2.9.1.c3addon
Binary file not shown.
2 changes: 1 addition & 1 deletion src/addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "plugin",
"name": "Spine",
"id": "Gritsenko_Spine",
"version": "2.9.0",
"version": "2.9.1",
"author": "Mikal and Igor Gritsenko",
"website": "https://gritsenko.github.io/c3_spine_plugin",
"documentation": "https://gritsenko.github.io/c3_spine_plugin",
Expand Down
6 changes: 5 additions & 1 deletion src/c3runtime/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,12 @@
while (active.playTime >= animationDuration)
active.playTime -= animationDuration;
}
const skeleton = active.skeleton;
state.update(delta);
state.apply(active.skeleton);
state.apply(skeleton);
if (this.physicsMode == spine.Physics.update) {
skeleton.update(delta);
}

// Set track listeners if needed for set animation done w/ current time or current ratio
// Set after update/apply so earlier events do not trigger
Expand Down
2 changes: 1 addition & 1 deletion src/c3runtime/spine-draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class SpineBatch {
// @ts-ignore
if (!globalThis.spineBatcher)
{
console.info('[Spine] SpineBatcher init, 2.9.0, Spine 4.2.x compatible');
console.info('[Spine] SpineBatcher init, 2.9.1, Spine 4.2.x compatible');
// @ts-ignore
globalThis.spineBatcher = new SpineBatch();
}
2 changes: 1 addition & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const C3 = self.C3;

const PLUGIN_ID = "Gritsenko_Spine";
const PLUGIN_VERSION = "2.9.0";
const PLUGIN_VERSION = "2.9.1";
const PLUGIN_CATEGORY = "general";

const PLUGIN_CLASS = SDK.Plugins.Gritsenko_Spine = class SpinePlugin extends SDK.IPluginBase {
Expand Down

0 comments on commit c8c2593

Please sign in to comment.