mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Fix spine plugin multiple game instances support #5765
This commit is contained in:
parent
9d2374c4a5
commit
f93388851a
1 changed files with 3 additions and 8 deletions
|
@ -15,8 +15,6 @@ var SpineGameObject = require('./gameobject/SpineGameObject');
|
|||
var SpineContainer = require('./container/SpineContainer');
|
||||
var NOOP = require('../../../src/utils/NOOP');
|
||||
|
||||
// Plugin specific instance of the Spine Scene Renderer
|
||||
var sceneRenderer;
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
|
@ -463,12 +461,9 @@ var SpinePlugin = new Class({
|
|||
}
|
||||
};
|
||||
|
||||
if (!sceneRenderer)
|
||||
{
|
||||
sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);
|
||||
sceneRenderer.batcher.setBlendMode = setBlendMode;
|
||||
sceneRenderer.shapes.setBlendMode = setBlendMode;
|
||||
}
|
||||
var sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);
|
||||
sceneRenderer.batcher.setBlendMode = setBlendMode;
|
||||
sceneRenderer.shapes.setBlendMode = setBlendMode;
|
||||
|
||||
// All share the same instance
|
||||
this.sceneRenderer = sceneRenderer;
|
||||
|
|
Loading…
Reference in a new issue