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