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

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MikalDev authored Jan 18, 2022
2 parents 8275f12 + 1c8e53f commit ac1027e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ Add-on based on **Mikal's** sample from this [thread](https://www.construct.net/
[Current Add-on, Release 1.55.1](https://github.com/gritsenko/c3_spine_plugin/releases/download/1.55.1/Spine-v1.55.1.c3addon)

[Previous Add-on Releases](https://github.com/gritsenko/c3_spine_plugin/releases)
### Spine 4.0.x compatible Addon (beta version)
#### New beta version plug-in with Spine 4.0 - there may be bugs, only suggested for experienced plug-in / Spine users. No 4.0 example projects yet.
### Spine 4.0.x compatible Addon (alpha version)
#### New beta version plug-in with Spine 4.0 - there may be bugs, only suggested for experienced plug-in / Spine users. Example project in release 2.0.0.
2.x versions of the addon will support Spine 4.x
[Beta Add-on, Release 2.0.0](https://github.com/gritsenko/c3_spine_plugin/releases/download/2.0.0/Spine-v2.0.0.c3addon)
[Beta Add-on, Release 2.0.1](https://github.com/gritsenko/c3_spine_plugin/releases/download/2.0.1/Spine-v2.0.1.c3addon)
#### Please support development of the C3 Spine plugin for Spine 4.x
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T8VV6CJVP3X3S)
#### Please report beta issues to: [Issues](https://github.com/gritsenko/c3_spine_plugin/issues)

### Note sample projects are still Spine 3.8.x
### Note sample projects are still Spine 3.8.x, they are not plug-in 2.x.x / Spine 4.0.x compatiable
[Sample project](https://github.com/gritsenko/c3_spine_plugin/releases/download/1.5.0/SpinePluginTest.c3p)

[MixAndMatch project](https://github.com/gritsenko/c3_spine_plugin/releases/download/1.13.0/SpineMixandMatch.c3p)
Expand Down Expand Up @@ -143,6 +143,8 @@ Useful for Dragon Bones Spine JSON export and earlier Spine versions.
- Preview Spine render in editor (dependent on C3 editor SDK updates)

## Release notes
- 2.0.1 Fix SpineBBoxCenterX to accept slot and name (previously was ignoring slot)
- 2.0.0 4.0 spine-ts runtime, compatible with Spine 4.0.x export files
- 1.55.1 Fix addCustomSkinOutfit update slot colors for dependent colors
- 1.55.0 Add addCustomSkinOutfit skin tone
- 1.54.0 Add addCustomSkinOutfit skin, color
Expand Down
Binary file added dist/Spine-v2.0.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.0.0",
"version": "2.0.1",
"author": "Mikal and Igor Gritsenko",
"website": "https://gritsenko.github.io/c3_spine_plugin",
"documentation": "https://gritsenko.github.io/c3_spine_plugin",
Expand Down
4 changes: 2 additions & 2 deletions src/c3runtime/expressions.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@

return track.alpha;
},
SpineBBoxCenterX(name){
SpineBBoxCenterX(slot, name){

if (!this.isLoaded) return 0;

let bBox = this.skeletonInfo.skeleton.getAttachmentByName(name,name);
let bBox = this.skeletonInfo.skeleton.getAttachmentByName(slot,name);
if (!bBox) return 0;

let points = this.skeletonInfo.skeletonBounds.getPolygon(bBox);
Expand Down
3 changes: 2 additions & 1 deletion src/c3runtime/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// @ts-ignore
const C3 = self.C3;
const spineBatcher = globalThis.spineBatcher;
const spine = globalThis.spine

C3.Plugins.Gritsenko_Spine.Instance = class SpineInstance extends C3.SDKWorldInstanceBase {

Expand Down Expand Up @@ -511,7 +512,7 @@
}

async IsSpineReady() {
spine = globalThis.spine
// spine = globalThis.spine
if (this.sdkType._initFailed) return false;

// Guard for case where sdkType does not exist (deleted on release)
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 @@ -347,7 +347,7 @@ class SpineBatch {
// @ts-ignore
if (!globalThis.spineBatcher)
{
console.log('[Spine] SpineBatcher init, 2.0.0, Spine 4.0.x compatible');
console.log('[Spine] SpineBatcher init, 2.0.1, Spine 4.0.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.0.0";
const PLUGIN_VERSION = "2.0.1";
const PLUGIN_CATEGORY = "general";

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

0 comments on commit ac1027e

Please sign in to comment.