phaser/v3/src/gameobjects/renderpass/RenderPassFactory.js
2017-04-11 10:15:38 -03:00

20 lines
598 B
JavaScript

var RenderPass = require('./RenderPass');
var FactoryContainer = require('../../gameobjects/FactoryContainer');
var RenderPassFactory = {
KEY: 'renderPass',
add: function (x, y, width, height, shaderName, fragmentShader)
{
return this.children.add(new RenderPass(this.state, x, y, width, height, shaderName, fragmentShader));
},
make: function (x, y, width, height, shaderName, fragmentShader)
{
return new RenderPass(this.state, x, y, width, height, shaderName, fragmentShader);
}
};
module.exports = FactoryContainer.register(RenderPassFactory);