all files / src/compositor/ TextureNode.js

33.33% Statements 1/3
100% Branches 0/0
0% Functions 0/5
33.33% Lines 1/3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32                                                             
import CompositorNode from './CompositorNode';
 
/**
 * @constructor clay.compositor.TextureNode
 * @extends clay.compositor.CompositorNode
 */
var TextureNode = CompositorNode.extend(function() {
    return /** @lends clay.compositor.TextureNode# */ {
        /**
         * @type {clay.Texture2D}
         */
        texture: null,
 
        // Texture node must have output without parameters
        outputs: {
            color: {}
        }
    };
}, function () {
}, {
 
    getOutput: function (renderer, name) {
        return this.texture;
    },
 
    // Do nothing
    beforeFrame: function () {},
    afterFrame: function () {}
});
 
export default TextureNode;