UNPKG

@polygonjs/polygonjs

Version:

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

33 lines (32 loc) 1.03 kB
"use strict"; import { ParamConfig } from "../../engine/nodes/utils/params/ParamsConfig"; import { TypedNodePathParamValue } from "../Walker"; import { NodeContext } from "../../engine/poly/NodeContext"; import { CopType } from "../../engine/poly/registers/nodes/types/Cop"; export const DEFAULT_LIGHT_PROBE_PARAMS = { cubeMap: new TypedNodePathParamValue(""), intensity: 1, name: "lightProbe" }; const DEFAULT = DEFAULT_LIGHT_PROBE_PARAMS; export function LightProbeParamConfig(Base) { return class Mixin extends Base { constructor() { super(...arguments); /** @param cubeMap */ this.cubeMap = ParamConfig.NODE_PATH("", { nodeSelection: { context: NodeContext.COP, types: [CopType.CUBE_MAP] } }); /** @param light intensity */ this.intensity = ParamConfig.FLOAT(DEFAULT.intensity, { range: [0, 2], rangeLocked: [true, false] }); /** @param light name */ this.name = ParamConfig.STRING("`$OS`"); } }; }