diff --git a/README.md b/README.md index 5677b53..a51bec2 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ Add-on based on **Mikal's** sample from this [thread](https://www.construct.net/ [BoundingBoxMesh project](https://github.com/gritsenko/c3_spine_plugin/releases/download/1.18.0/SpineBBoxMesh.c3p) +[AimBoneControl project](https://github.com/gritsenko/c3_spine_plugin/releases/download/1.36.1/SpineboyAimBoneControl.c3p) + ## LIVE DEMO [Live Demo](https://gritsenko.github.io/c3_spine_plugin/docs/LiveDemo/index.html) diff --git a/dist/Spine-v1.36.2.c3addon b/dist/Spine-v1.36.2.c3addon new file mode 100644 index 0000000..3ec5572 Binary files /dev/null and b/dist/Spine-v1.36.2.c3addon differ diff --git a/src/addon.json b/src/addon.json index 7437be4..43bba0a 100755 --- a/src/addon.json +++ b/src/addon.json @@ -3,7 +3,7 @@ "type": "plugin", "name": "Spine", "id": "Gritsenko_Spine", - "version": "1.36.1", + "version": "1.36.2", "author": "Mikal and Igor Gritsenko", "website": "https://gritsenko.github.io/c3_spine_plugin", "documentation": "https://gritsenko.github.io/c3_spine_plugin", diff --git a/src/c3runtime/instance.js b/src/c3runtime/instance.js index a669f5d..b3aec82 100644 --- a/src/c3runtime/instance.js +++ b/src/c3runtime/instance.js @@ -27,6 +27,7 @@ this.trackAnimations = {}; this.skinNames = []; this.delayedTrackListeners = []; + this.sdkType = this.GetSdkType(); this.atlasPath = ""; @@ -92,12 +93,12 @@ } async initTexturesBatcher() { - this._sdkType._texturesBatcherInitializing = true; + this.sdkType._texturesBatcherInitializing = true; // Init spineBatcher (only initializes once) spineBatcher.init(this.canvas, this.runtime); await this.loadSkeletonTextures(); - this._sdkType._texturesBatcherInitialized = true; - this._sdkType._texturesBatcherInitializing = false; + this.sdkType._texturesBatcherInitialized = true; + this.sdkType._texturesBatcherInitializing = false; } resize() { @@ -118,10 +119,10 @@ async loadSkeletonTextures() { - this._sdkType._assetManager = new spine.SharedAssetManager(); - this._sdkType._assetTag = this.uid; - const assetManager = this._sdkType._assetManager; - const assetTag = this._sdkType._assetTag; + this.sdkType._assetManager = new spine.SharedAssetManager(); + this.sdkType._assetTag = this.uid; + const assetManager = this.sdkType._assetManager; + const assetTag = this.sdkType._assetTag; const gl = this.gl; if (this.debug) console.info(this.GetInstance().GetUID(),'[Spine] Loading skeleton, textures, json, atlas'); @@ -131,11 +132,11 @@ // Path translation for json and atlast (1:1) this.atlasURI = await this.runtime._assetManager.GetProjectFileUrl(this.atlasPath); - this._sdkType._assetPaths[this.atlasURI] = this.atlasURI; - this._sdkType._assetPaths[this.atlasPath] = this.atlasURI; + this.sdkType._assetPaths[this.atlasURI] = this.atlasURI; + this.sdkType._assetPaths[this.atlasPath] = this.atlasURI; this.jsonURI = await this.runtime._assetManager.GetProjectFileUrl(this.jsonPath); - this._sdkType._assetPaths[this.jsonURI] = this.jsonURI; - this._sdkType._assetPaths[this.jsonPath] = this.jsonURI; + this.sdkType._assetPaths[this.jsonURI] = this.jsonURI; + this.sdkType._assetPaths[this.jsonPath] = this.jsonURI; assetManager.loadJson(assetTag, this.jsonURI); @@ -146,7 +147,7 @@ for(let i=0;i