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

Commit

Permalink
Release 1.14.1 - fix PMA regression
Browse files Browse the repository at this point in the history
  • Loading branch information
MikalDev committed Sep 16, 2020
1 parent b3bd877 commit 6da9e4c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
Binary file added dist/Spine-v1.14.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": "1.14.0",
"version": "1.14.1",
"author": "Mikal and Igor Gritsenko",
"website": "https://gritsenko.github.io/c3_spine_plugin",
"documentation": "https://gritsenko.github.io/c3_spine_plugin",
Expand Down
8 changes: 2 additions & 6 deletions src/c3runtime/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@
this._sdkType._assetPaths[assetPaths[i]] = this.pngURI;
this.assetManager.loadTexture(this.DEMO_NAME, textureLoader, this.pngURI);
}
console.log('[SpineInit] paths',this._sdkType._assetPaths)

this.assetManager.loadText(this.DEMO_NAME, this.atlasURI);
}
Expand Down Expand Up @@ -156,6 +155,7 @@
// console.log("Loading skeleton");

this.skeletonInfo = this.loadSkeleton(this.skeletonName, this.animationName);
this.skeletonInfo.premultipliedAlpha = this.premultipliedAlpha;

const skins = this.skeletonInfo.skeleton.data.skins;
this.skinNames = skins.map(x => x.name);
Expand All @@ -182,7 +182,7 @@
this._sdkType._skeletonData.notInitialized = false;
const atlasURI = assetManager.get(this.DEMO_NAME, this.atlasURI);
this._sdkType._atlas = new spine.TextureAtlas(atlasURI, function(path) {
// console.log(`Loading png atlas ${path} replaced with ${self.pngURI}`);
// console.log(`Loading png atlas ${path} replaced with ${self._sdkType._assetPaths[path]}`);
return assetManager.get(self.DEMO_NAME, self._sdkType._assetPaths[path]);
});
this._sdkType._atlasLoader = new spine.AtlasAttachmentLoader(this._sdkType._atlas);
Expand Down Expand Up @@ -409,10 +409,6 @@

Draw(renderer) {

// if (!this.loggedRenderer) {
// this.loggedRenderer = true;
// console.log(renderer);
// }
var gl = renderer._gl

if (this._elementId == "" || !this.isSkeletonLoaded) return; // elementID not set, can't draw the element
Expand Down
4 changes: 3 additions & 1 deletion src/c3runtime/spine-draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ class SpineBatch {
if (skeletonInstance.initialized)
{
const bounds = skeletonInstance.skeletonInfo.bounds;
const premultipliedAlpha = skeletonInstance.skeletonInfo.premultipliedAlpha;

// Render to our targetTexture by binding the framebuffer to the SpineFB texture
gl.bindFramebuffer(gl.FRAMEBUFFER, skeletonInstance.spineFB);

Expand Down Expand Up @@ -202,7 +204,7 @@ class SpineBatch {
gl.clear(gl.COLOR_BUFFER_BIT);

// Render
this.renderer.premultipliedAlpha = this.premultipliedAlpha;
this.renderer.premultipliedAlpha = premultipliedAlpha;
this.renderer.draw(this.batcher, skeletonInstance.skeletonInfo.skeleton);
this.batcher.end();
this.shader.unbind();
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{

const PLUGIN_ID = "Gritsenko_Spine";
const PLUGIN_VERSION = "1.14.0";
const PLUGIN_VERSION = "1.14.1";
const PLUGIN_CATEGORY = "general";

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

0 comments on commit 6da9e4c

Please sign in to comment.