|
@@ -7819,7 +7819,7 @@ var spine;
|
|
|
element.appendChild(canvas);
|
|
|
canvas.width = element.clientWidth;
|
|
|
canvas.height = element.clientHeight;
|
|
|
- var webglConfig = { alpha: false };
|
|
|
+ var webglConfig = { alpha: config.alpha };
|
|
|
var gl = this.gl = (canvas.getContext("webgl", webglConfig) || canvas.getContext("experimental-webgl", webglConfig));
|
|
|
this.shader = spine.webgl.Shader.newColoredTextured(gl);
|
|
|
this.batcher = new spine.webgl.PolygonBatcher(gl);
|
|
@@ -7868,6 +7868,8 @@ var spine;
|
|
|
config.premultipliedAlpha = false;
|
|
|
if (!config.debug === undefined)
|
|
|
config.debug = false;
|
|
|
+ if (!config.alpha === undefined)
|
|
|
+ config.alpha = true;
|
|
|
this.backgroundColor.setFromString(config.backgroundColor);
|
|
|
this.config = config;
|
|
|
};
|
|
@@ -8030,6 +8032,8 @@ var spine;
|
|
|
config.premultipliedAlpha = widget.getAttribute("data-premultiplied-alpha") === "true";
|
|
|
if (widget.getAttribute("data-debug"))
|
|
|
config.debug = widget.getAttribute("data-debug") === "true";
|
|
|
+ if (widget.getAttribute("data-alpha"))
|
|
|
+ config.alpha = widget.getAttribute("data-alpha") === "true";
|
|
|
new spine.SpineWidget(widget, config);
|
|
|
};
|
|
|
SpineWidget.ready = function () {
|
|
@@ -8062,6 +8066,7 @@ var spine;
|
|
|
this.scale = 1.0;
|
|
|
this.x = 0;
|
|
|
this.y = 0;
|
|
|
+ this.alpha = true;
|
|
|
this.fitToCanvas = true;
|
|
|
this.backgroundColor = "#555555";
|
|
|
this.premultipliedAlpha = false;
|