diff --git a/packages/core/src/batch/BatchPluginFactory.js b/packages/core/src/batch/BatchPluginFactory.js index 22bd0ba..ce5a14a 100644 --- a/packages/core/src/batch/BatchPluginFactory.js +++ b/packages/core/src/batch/BatchPluginFactory.js @@ -6,33 +6,32 @@ import defaultFragment from './texture.frag'; /** - * Used to create new, custom BatchRenderer plugins for the Renderer. - * @example - * const fragment = ` - * varying vec2 vTextureCoord; - * varying vec4 vColor; - * varying float vTextureId; - * uniform sampler2D uSamplers[%count%]; - * - * void main(void){ - * vec4 color; - * %forloop% - * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a); - * } - * `; - * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment }); - * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer); - * const sprite = new PIXI.Sprite(); - * sprite.pluginName = 'invert'; - * * @class * @memberof PIXI + * @hideconstructor */ -export class BatchPluginFactory +export default class BatchPluginFactory { /** * Create a new BatchRenderer plugin for Renderer. this convenience can provide an easy way * to extend BatchRenderer with all the necessary pieces. + * @example + * const fragment = ` + * varying vec2 vTextureCoord; + * varying vec4 vColor; + * varying float vTextureId; + * uniform sampler2D uSamplers[%count%]; + * + * void main(void){ + * vec4 color; + * %forloop% + * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a); + * } + * `; + * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment }); + * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer); + * const sprite = new PIXI.Sprite(); + * sprite.pluginName = 'invert'; * * @static * @param {object} [options] diff --git a/packages/core/src/batch/BatchPluginFactory.js b/packages/core/src/batch/BatchPluginFactory.js index 22bd0ba..ce5a14a 100644 --- a/packages/core/src/batch/BatchPluginFactory.js +++ b/packages/core/src/batch/BatchPluginFactory.js @@ -6,33 +6,32 @@ import defaultFragment from './texture.frag'; /** - * Used to create new, custom BatchRenderer plugins for the Renderer. - * @example - * const fragment = ` - * varying vec2 vTextureCoord; - * varying vec4 vColor; - * varying float vTextureId; - * uniform sampler2D uSamplers[%count%]; - * - * void main(void){ - * vec4 color; - * %forloop% - * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a); - * } - * `; - * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment }); - * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer); - * const sprite = new PIXI.Sprite(); - * sprite.pluginName = 'invert'; - * * @class * @memberof PIXI + * @hideconstructor */ -export class BatchPluginFactory +export default class BatchPluginFactory { /** * Create a new BatchRenderer plugin for Renderer. this convenience can provide an easy way * to extend BatchRenderer with all the necessary pieces. + * @example + * const fragment = ` + * varying vec2 vTextureCoord; + * varying vec4 vColor; + * varying float vTextureId; + * uniform sampler2D uSamplers[%count%]; + * + * void main(void){ + * vec4 color; + * %forloop% + * gl_FragColor = vColor * vec4(color.a - color.rgb, color.a); + * } + * `; + * const InvertBatchRenderer = PIXI.BatchPluginFactory.create({ fragment }); + * PIXI.Renderer.registerPlugin('invert', InvertBatchRenderer); + * const sprite = new PIXI.Sprite(); + * sprite.pluginName = 'invert'; * * @static * @param {object} [options] diff --git a/packages/core/src/index.js b/packages/core/src/index.js index 448e3d1..d4cb1fa 100644 --- a/packages/core/src/index.js +++ b/packages/core/src/index.js @@ -22,7 +22,7 @@ export { default as TextureUvs } from './textures/TextureUvs'; export { default as State } from './state/State'; export { default as ObjectRenderer } from './batch/ObjectRenderer'; -export * from './batch/BatchPluginFactory'; +export { default as BatchPluginFactory, BatchRenderer } from './batch/BatchPluginFactory'; export { default as BatchShaderGenerator } from './batch/BatchShaderGenerator'; export { default as BatchGeometry } from './batch/BatchGeometry'; export { default as BatchDrawCall } from './batch/BatchDrawCall';