diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index f6fe123..4d4653b 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -96,19 +96,19 @@ projectionMatrix:new Matrix() }, false) - this.addSystem(MaskSystem) - .addSystem(ContextSystem) - .addSystem(StateSystem) - .addSystem(ShaderSystem) + this.addSystem(MaskSystem, 'mask') + .addSystem(ContextSystem, 'context') + .addSystem(StateSystem, 'state') + .addSystem(ShaderSystem, 'shader') .addSystem(TextureSystem, 'texture') - .addSystem(GeometrySystem) - .addSystem(FramebufferSystem) - .addSystem(StencilSystem) - .addSystem(ProjectionSystem) + .addSystem(GeometrySystem, 'geometry') + .addSystem(FramebufferSystem, 'framebuffer') + .addSystem(StencilSystem, 'stencil') + .addSystem(ProjectionSystem, 'projection') //.addSystem(TextureGCSystem) - .addSystem(FilterSystem) - .addSystem(RenderTextureSystem) - .addSystem(BatchSystem) + .addSystem(FilterSystem, 'filter') + .addSystem(RenderTextureSystem, 'renderTexture') + .addSystem(BatchSystem,'batch') this.initPlugins(); @@ -149,11 +149,14 @@ } //TODO - read name from class.name.. + + /* if(name.includes('System')) { name = name.replace('System', ''); name = name.charAt(0).toLowerCase() + name.slice(1); } + */ const system = new _class(this); diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index f6fe123..4d4653b 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -96,19 +96,19 @@ projectionMatrix:new Matrix() }, false) - this.addSystem(MaskSystem) - .addSystem(ContextSystem) - .addSystem(StateSystem) - .addSystem(ShaderSystem) + this.addSystem(MaskSystem, 'mask') + .addSystem(ContextSystem, 'context') + .addSystem(StateSystem, 'state') + .addSystem(ShaderSystem, 'shader') .addSystem(TextureSystem, 'texture') - .addSystem(GeometrySystem) - .addSystem(FramebufferSystem) - .addSystem(StencilSystem) - .addSystem(ProjectionSystem) + .addSystem(GeometrySystem, 'geometry') + .addSystem(FramebufferSystem, 'framebuffer') + .addSystem(StencilSystem, 'stencil') + .addSystem(ProjectionSystem, 'projection') //.addSystem(TextureGCSystem) - .addSystem(FilterSystem) - .addSystem(RenderTextureSystem) - .addSystem(BatchSystem) + .addSystem(FilterSystem, 'filter') + .addSystem(RenderTextureSystem, 'renderTexture') + .addSystem(BatchSystem,'batch') this.initPlugins(); @@ -149,11 +149,14 @@ } //TODO - read name from class.name.. + + /* if(name.includes('System')) { name = name.replace('System', ''); name = name.charAt(0).toLowerCase() + name.slice(1); } + */ const system = new _class(this); diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 7f72349..e24ab9a 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -6,7 +6,7 @@ import EventEmitter from 'eventemitter3'; import settings from '../settings'; import { Rectangle } from '../math'; -import { TextureCache, getResolutionOfUrl } from '../utils'; +import { TextureCache, BaseTextureCache, getResolutionOfUrl } from '../utils'; /** * A texture stores the information that represents an image or part of an image. It cannot be added