StairwayStructure Class
The structure of a stairway.
Constructor
StairwayStructure
()
Item Index
Methods
Methods
add
-
propertyName
-
value
Returns:
addMaterial
-
parent
-
mesh
-
materialItem
Adds a material.
Parameters:
-
parent
BABYLON.MeshThe parent of the mesh.
-
mesh
BABYLON.MeshThe stairway mesh.
-
materialItem
wnp.StandardMaterialThe item material.
deserialize
-
hybrid
Parameters:
-
hybrid
ObjectJSON describing the object, built with the method serialize.
Returns:
The Structure object built from the deserialization
getAvailableProperties
()
Object[]
Gets the available properties of the object (user-customizable).
Returns:
An array containing several properties of the object.
getElementByName
-
name
-
collection
Parameters:
Returns:
getFloor
-
collection
Parameters:
-
collection
StringCollection to search within.
Returns:
The floor containing this structure, -1 if the object has not been added to any floor collection.
getHopperPoints
()
BABYLON.Vector2
Gets the hopper points created by the stairway.
Returns:
The four points of the hopper carved in the upper floor.
getNormalAtPoint
-
index
Gets the normal at the given index point.
Parameters:
-
index
NumberThe index of the point.
Returns:
The normal at the point.
getStepBoundPoints
-
bottomIndex
Returns the 4 points of the step.
Parameters:
-
bottomIndex
NumberThe index of the bottom point of the step.
Returns:
The four points of a step.
initialize
()
private
remove
-
structure
Deletes the stairway.
Parameters:
-
structure
FloorStructureThe structure of the floor.
serialize
()
Object
Returns:
update
()
updateReferences
-
structure
Parameters:
-
structure
wnp.StructureFloor Structure to work with
Properties
points
BABYLON.Vector3
The points defining the path of the stairway.