OvertureComponent3D
Summary
Overture Component 3D.
Constructor
OvertureComponent3D
Syntax
OvertureComponent3D
-
core
Summary
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
carveSubslopeOverture
Syntax
carveSubslopeOverture
-
subslope
-
ov
-
structure
-
floor
Summary
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
Syntax
carveWithOvertureMeshes
-
ov
-
wallCSG
-
wall3D
-
floor
Summary
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
Syntax
compute
()
private
Summary
Recompute of the component.createOverture
Syntax
createOverture
-
overture
-
structure
-
floor
Summary
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
Syntax
destroy
()
Summary
Destructor.disable
Syntax
disable
()
Summary
Disables the componentenable
Syntax
enable
()
Summary
Enables the componentgetFloor
Syntax
getFloor
-
[structure]
Summary
Gets the 3D mesh of the floor structure in parameter (by default current floor).Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
The floor mesh in 3D.
initialize
Syntax
initialize
()
Summary
Method called when Wanaplan is initialized. You don't need to call this method manually.onContextChanged
Syntax
onContextChanged
-
context
Summary
Method called when the context is switched (2D -> 3D or 3D -> 2D)Parameters:
-
context
StringThe new context
onSubslopesReady
Syntax
onSubslopesReady
-
event
Summary
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
Syntax
onWallsReady
-
event
Summary
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
Syntax
overtureBox
-
ov
-
The
-
floor
Summary
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
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.
Properties
keyboardManager
Syntax
keyboardManager
wnp.KeyboardManager
Summary
Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).structure
Syntax
structure
wnp.Structure
Summary
Instance of the structure (shortcut to wanaplan.structure).Events
wnp.engine3D.overturesReady
Syntax
wnp.engine3D.overturesReady
Summary
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
Syntax
wnp.engine3D.subslopeOverturesReady
private
Summary
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.