StairwayComponent3D
Summary
Stairway component 3D.
Constructor
StairwayComponent3D
Syntax
StairwayComponent3D
(
-
core
Summary
Parameters:
-
core
wnp.CoreWanaplan.
Item Index
Methods
Properties
Methods
compute
Syntax
compute
()
private
Summary
Recompute of the component.createScene
Syntax
createScene
()
Summary
Creates all the stairways of the scene.
createStairway
Syntax
createStairway
(
-
stairway
-
sceneF
-
scene
Summary
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
Syntax
destroy
()
Summary
Destructor.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
Method called when Wanaplan is initialized. You don't need to call this method manually.initMaterials
Syntax
initMaterials
(
private
-
object3d
-
materials
Summary
Puts the material on the good mesh.
Parameters:
-
object3d
BABYLON.MeshThe mesh of the stairway.
-
materials
wnp.standardMaterialThe materials of the stairway.
onContextChanged
Syntax
onContextChanged
(
-
context
Summary
Method called when the context is switched (2D -> 3D or 3D -> 2D)Parameters:
-
context
StringThe new context
onFloorReady
Syntax
onFloorReady
(
private
-
event
Summary
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
Syntax
startListening
()
Summary
Calls all the event listeners.stopListening
Syntax
stopListening
()
Summary
Removes all the event listeners.update
Syntax
update
(
-
deltaTime
Summary
Updates the dynamic part of the component.Parameters:
-
deltaTime
NumberThe time interval.