UNPKG

@lightningjs/renderer

Version:
30 lines 802 B
import { UpdateType } from './CoreNode.js'; export default class ShaderNode { shader; props; node = null; constructor(shader, props) { this.shader = shader; this.props = props; this.defineProperties(); } defineProperties() { for (const key in this.props) { Object.defineProperty(this, key, { get() { return this.props[key]; }, set(value) { this.props[key] = value; if (this.node !== null) { this.node.setUpdateType(UpdateType.Local); } }, }); } } attachNode(node) { this.node = node; } } //# sourceMappingURL=ShaderNode.js.map