UNPKG

sunrize

Version:

Sunrize — A Multi-Platform X3D Editor

26 lines (19 loc) 684 B
"use strict"; const X3DLightNodeTool = require ("./X3DLightNodeTool"); class SpotLightTool extends X3DLightNodeTool { async initializeTool () { await super .initializeTool (); this .tool .getField ("location") .addReference (this .node ._location); this .tool .getField ("direction") .addReference (this .node ._direction); this .tool .getField ("beamWidth") .addReference (this .node ._beamWidth); this .tool .getField ("cutOffAngle") .addReference (this .node ._cutOffAngle); this .tool .type = 2; } beginUndo () { this .undoSaveInitialValues (["location", "direction"]); } } module .exports = SpotLightTool;