SubSlopeComponent3D Class
Creates and draws subslopes in 3D.
Constructor
SubSlopeComponent3D
-
core
Parameters:
-
core
wnp.CoreWanaplan core.
Item Index
Methods
Properties
Events
Methods
addSubSlope
-
wallMesh
-
points
-
subslope
-
structure
-
sceneF
Adds the subslope mesh to the scene.
Parameters:
-
wallMesh
BABYLON.MeshMesh of the walls.
-
points
BABYLON.Vector3Points of the subslope plane mesh.
-
subslope
SubSlopeStructureThe current subslope.
-
structure
FloorStructureThe floor on which the subslope must be added.
-
sceneF
BABYLON.MeshCurrent floor mesh.
buildCSG
-
points
-
structure
-
sceneF
Builds the CSG mesh which carves a part of the wall mesh.
Parameters:
-
points
BABYLON.Vector3Points of the subslope plane mesh.
-
structure
SubSlopeStructureStructure of the SubSlope
-
sceneF
BABYLON.MeshCurrent floor.
Returns:
Final CSG mesh.
buildFromCSG
-
wallMesh
-
wallCSG
-
roomCSG
-
subslopeCSG
-
sceneF
Carves the wall with the big union of CSG.
Parameters:
-
wallMesh
BABYLON.MeshMesh of the wall.
-
wallCSG
BABYLON.CSGMesh of the wall but in CSG.
-
roomCSG
BABYLON.CSGCSG of the room.
-
subslopeCSG
BABYLON.CSGCSG of all the subslopes.
-
sceneF
BABYLON.MeshCurrent floor mesh.
compute
()
private
destroy
()
disable
()
drawSSForStructure
-
structure
-
sceneF
Carves and creates all the subslopes without a roof for a floor.
Parameters:
-
structure
FloorStructureRelated floor structure.
-
sceneF
BABYLON.MeshFloor mesh.
enable
()
getFloor
-
[structure]
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
The floor mesh in 3D.
initialize
()
onContextChanged
-
context
Parameters:
-
context
StringThe new context
onWallsReady
-
event
Triggered on event wnp.engine3D.wallsReady
.
Adds subslopes meshes (planes for subslopes without a roof) to the scene.
Parameters:
-
event
EventThe JS event.
startListening
()
stopListening
()
update
-
deltaTime
Parameters:
-
deltaTime
NumberThe time interval.
Properties
keyboardManager
wnp.KeyboardManager
structure
wnp.Structure
Events
wnp.engine3D.subslopesReady
Fired when the subslopes are ready and added to the scene.
Event Payload:
-
floor
BABYLON.Mesh3D Floor mesh.
-
structure
FloorStructureRelated floor structure.
-
walls
BABYLON.MeshThe resultant wall mesh for this floor (The subslopes carve the wall mesh when built).