From 496b928c613c89dd89e1bfdc9000e72d1404faf5 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 21 Sep 2021 11:38:33 +0100 Subject: [PATCH] Fixed eslint issues --- plugins/spine/src/SpinePlugin.js | 7 +++++-- src/plugins/PluginManager.js | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/spine/src/SpinePlugin.js b/plugins/spine/src/SpinePlugin.js index dc6ba07b0..7e7aeb7ed 100644 --- a/plugins/spine/src/SpinePlugin.js +++ b/plugins/spine/src/SpinePlugin.js @@ -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; } diff --git a/src/plugins/PluginManager.js b/src/plugins/PluginManager.js index b54be0506..c857a2f39 100644 --- a/src/plugins/PluginManager.js +++ b/src/plugins/PluginManager.js @@ -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))