mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[phaser] Closes #2390, reset static gameWebGLRenderer to remounts in React/Vue work.
This commit is contained in:
parent
a7bb103ec9
commit
8d4ed3056a
@ -193,6 +193,7 @@ export class SpinePlugin extends Phaser.Plugins.ScenePlugin {
|
|||||||
gameDestroy () {
|
gameDestroy () {
|
||||||
this.pluginManager.removeGameObject((window as any).SPINE_GAME_OBJECT_TYPE ? (window as any).SPINE_GAME_OBJECT_TYPE : SPINE_GAME_OBJECT_TYPE, true, true);
|
this.pluginManager.removeGameObject((window as any).SPINE_GAME_OBJECT_TYPE ? (window as any).SPINE_GAME_OBJECT_TYPE : SPINE_GAME_OBJECT_TYPE, true, true);
|
||||||
if (this.webGLRenderer) this.webGLRenderer.dispose();
|
if (this.webGLRenderer) this.webGLRenderer.dispose();
|
||||||
|
SpinePlugin.gameWebGLRenderer = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the TextureAtlas instance for the given key */
|
/** Returns the TextureAtlas instance for the given key */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user