StairwayComponent3D Class
Stairway component 3D.
Constructor
StairwayComponent3D
(
-
core
Parameters:
-
core
wnp.CoreWanaplan.
Item Index
Methods
Properties
Methods
compute
()
private
Recompute of the component.
createScene
()
Creates all the stairways of the scene.
createStairway
(
-
stairway
-
sceneF
-
scene
Creates the mesh of a stairway.
Parameters:
-
stairway
StairwayStructureThe structure of the stairway.
-
sceneF
BABYLON.MeshThe mesh of the floor.
-
scene
BABYLON.SceneThe global scene.
destroy
()
Destructor.
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
()
Method called when Wanaplan is initialized.
You don't need to call this method manually.
initMaterials
(
private
-
object3d
-
materials
Puts the material on the good mesh.
Parameters:
-
object3d
BABYLON.MeshThe mesh of the stairway.
-
materials
wnp.standardMaterialThe materials of the stairway.
onContextChanged
(
-
context
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
onFloorReady
(
private
-
event
When the floor is ready, we can create all the floor of the stage.
Parameters:
-
event
EventThe event with the important informations (The scene and the current structure).
startListening
()
Calls all the event listeners.
stopListening
()
Removes all the event listeners.
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).