Fixed eslint issues

This commit is contained in:
Richard Davey 2021-09-21 11:38:33 +01:00
parent 9cfbe65bfa
commit 496b928c61
2 changed files with 8 additions and 3 deletions

View file

@ -15,7 +15,6 @@ var SpineGameObject = require('./gameobject/SpineGameObject');
var SpineContainer = require('./container/SpineContainer'); var SpineContainer = require('./container/SpineContainer');
var NOOP = require('../../../src/utils/NOOP'); var NOOP = require('../../../src/utils/NOOP');
/** /**
* @classdesc * @classdesc
* The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects. * The Spine Plugin is a Scene based plugin that handles the creation and rendering of Spine Game Objects.
@ -462,10 +461,13 @@ var SpinePlugin = new Class({
}; };
var sceneRenderer = this.renderer.spineSceneRenderer; var sceneRenderer = this.renderer.spineSceneRenderer;
if (!sceneRenderer) {
if (!sceneRenderer)
{
sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true); sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);
sceneRenderer.batcher.setBlendMode = setBlendMode; sceneRenderer.batcher.setBlendMode = setBlendMode;
sceneRenderer.shapes.setBlendMode = setBlendMode; sceneRenderer.shapes.setBlendMode = setBlendMode;
this.renderer.spineSceneRenderer = sceneRenderer; this.renderer.spineSceneRenderer = sceneRenderer;
} }
@ -1141,6 +1143,7 @@ var SpinePlugin = new Class({
{ {
sceneRenderer.dispose(); sceneRenderer.dispose();
} }
this.renderer.spineSceneRenderer = null; this.renderer.spineSceneRenderer = null;
this.sceneRenderer = null; this.sceneRenderer = null;
} }

View file

@ -370,7 +370,9 @@ var PluginManager = new Class({
// Plugin is freshly loaded // Plugin is freshly loaded
PluginCache.register(key, plugin, mapping, true); PluginCache.register(key, plugin, mapping, true);
} }
if (this.scenePlugins.indexOf(key) === -1) {
if (this.scenePlugins.indexOf(key) === -1)
{
this.scenePlugins.push(key); this.scenePlugins.push(key);
} }
else if (!fromLoader && PluginCache.hasCore(key)) else if (!fromLoader && PluginCache.hasCore(key))