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 NOOP = require('../../../src/utils/NOOP');
/**
* @classdesc
* 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;
if (!sceneRenderer) {
if (!sceneRenderer)
{
sceneRenderer = new Spine.webgl.SceneRenderer(this.renderer.canvas, this.gl, true);
sceneRenderer.batcher.setBlendMode = setBlendMode;
sceneRenderer.shapes.setBlendMode = setBlendMode;
this.renderer.spineSceneRenderer = sceneRenderer;
}
@ -1141,6 +1143,7 @@ var SpinePlugin = new Class({
{
sceneRenderer.dispose();
}
this.renderer.spineSceneRenderer = null;
this.sceneRenderer = null;
}

View file

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