LockComponent Class
This component is responsible for adding a lock icon to lock/unlock the drag action on all objects in the scene.
Constructor
LockComponent
(
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
compute
()
private
Recompute of the component.
destroy
()
Removes the icon from the menu and stops listening to the lock event.
disable
()
Disables the component
enable
()
Enables the component
getFloor
(
BABYLON.Mesh
-
[structure]
Gets the 3D mesh of the floor structure in parameter (by default current floor).
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
BABYLON.Mesh:
The floor mesh in 3D.
initialize
()
Initializes objects and adds a custom stylesheet.
onContextChanged
(
-
context
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
startListening
()
Calls all the event listeners.
stopListening
()
Removes all the event listeners.
toggleLock
(
-
event
Toggles lock or unlock.
Triggered on event wnp.component.lock
Parameters:
-
event
ObjectThe event object.
update
(
-
deltaTime
Updates the dynamic part of the component.
Parameters:
-
deltaTime
NumberThe time interval.
Properties
keyboardManager
wnp.KeyboardManager
Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).
structure
wnp.Structure
Instance of the structure (shortcut to wanaplan.structure).
Events
wnp.component.lock
Fired to lock/unlock the drag action on scene.