OvertureComponent3D Class
Overture Component 3D.
Constructor
OvertureComponent3D
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
carveSubslopeOverture
-
subslope
-
ov
-
structure
-
floor
Carves a subslope overture in the subslopes.
Parameters:
-
subslope
SubSlopeStructureThe subslope attached to the overture.
-
ov
SubSlopeOvertureStructureThe structure of the subslope overture.
-
structure
FloorStructureThe structure of the current floor.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
Returns:
New mesh of the walls after carving.
carveWithOvertureMeshes
-
ov
-
wallCSG
-
wall3D
-
floor
Carves an overture in the walls.
Parameters:
-
ov
BABYLON.CSGThe CSG mesh of the cube to carve with.
-
wallCSG
BABYLON.CSGThe wall in CSG mesh.
-
wall3D
BABYLON.Mesh3D mesh of the walls.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
Returns:
New wall create after dig the wall.
compute
()
private
createOverture
-
overture
-
structure
-
floor
Creates a 3D overture mesh.
Parameters:
-
overture
OvertureStructureThe structure of the overture.
-
structure
FloorStructureThe structure of the current floor.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
destroy
()
disable
()
enable
()
getFloor
-
[structure]
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
The floor mesh in 3D.
initialize
()
onContextChanged
-
context
Parameters:
-
context
StringThe new context
onSubslopesReady
-
event
Carves the subslopes and creates the 3D meshes of the subslope overtures.
Triggered on event wnp.engine3D.roofsReady
Parameters:
-
event
EventThe event received, it contains the walls mesh, the floor mesh and the structure of the floor.
onWallsReady
-
event
Carves the walls and creates the 3D meshes of the overtures.
Triggered on event wnp.engine3D.wallsReady
Parameters:
-
event
EventThe event received, it contains the walls mesh, the floor mesh and the structure of the floor.
overtureBox
-
ov
-
The
-
floor
Creates a CSG box to carve the walls.
Parameters:
-
ov
OvertureStructureThe structure of the overture.
-
The
FloorStructurestructure of the current floor.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
Returns:
The cube that will be used to carve walls, in CSG format.
startListening
()
stopListening
()
update
-
deltaTime
Parameters:
-
deltaTime
NumberThe time interval.
Properties
keyboardManager
wnp.KeyboardManager
structure
wnp.Structure
Events
wnp.engine3D.overturesReady
Fired once the wall overtures are created.
Event Payload:
-
floor
BABYLON.MeshThe mesh of the floor.
-
structure
FloorStructureThe current floor structure.
-
walls
BABYLON.MeshThe mesh of the walls.
wnp.engine3D.subslopeOverturesReady
private
Fired once the subslope overtures are created.
Event Payload:
-
floor
BABYLON.MeshThe mesh of the floor.
-
structure
wnp.floorStructureThe current structure.
-
walls
BABYLON.MeshThe mesh of the wall.