UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

38 lines (37 loc) 1.08 kB
"use strict"; import { MeshBasicMaterial } from "three"; import { NodeParamsConfig, ParamConfig } from "../../../utils/params/ParamsConfig"; import { TypedObjNode } from "../../_Base"; import { FlagsControllerD } from "../../../utils/FlagsController"; export function BaseLightHelperParamConfig(Base) { return class Mixin extends Base { constructor() { super(...arguments); this.showHelper = ParamConfig.BOOLEAN(0); } }; } class BaseLightHelperParamsConfig extends BaseLightHelperParamConfig(NodeParamsConfig) { } export class BaseLightHelperObjNode extends TypedObjNode { constructor() { super(...arguments); this.flags = new FlagsControllerD(this); } } export class BaseLightHelper { constructor(node, _name) { this.node = node; this._name = _name; this._object = this.createObject(); this._material = new MeshBasicMaterial({ wireframe: true, fog: false }); } build() { this._object.matrixAutoUpdate = false; this._object.name = this._name; this.buildHelper(); } get object() { return this._object; } }