OvertureComponent3D
Summary
Overture Component 3D.
Constructor
OvertureComponent3D
Syntax
OvertureComponent3D
-
core
Summary
Parameters:
-
coreCoreThe main engine.
Item Index
Methods
Properties
Methods
carveSubslopeOverture
Syntax
carveSubslopeOverture
-
subslope -
ov -
structure -
floor
Summary
Carves a subslope overture in the subslopes.
Parameters:
-
subslopeSubSlopeStructureThe subslope attached to the overture.
-
ovSubSlopeOvertureStructureThe structure of the subslope overture.
-
structureFloorStructureThe structure of the current floor.
-
floorBABYLON.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:
-
ovBABYLON.CSGThe CSG mesh of the cube to carve with.
-
wallCSGBABYLON.CSGThe wall in CSG mesh.
-
wall3DBABYLON.Mesh3D mesh of the walls.
-
floorBABYLON.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:
-
overtureOvertureStructureThe structure of the overture.
-
structureFloorStructureThe structure of the current floor.
-
floorBABYLON.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:
-
contextStringThe 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:
-
eventEventThe 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:
-
eventEventThe 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:
-
ovOvertureStructureThe structure of the overture.
-
TheFloorStructurestructure of the current floor.
-
floorBABYLON.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:
-
deltaTimeNumberThe 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:
-
floorBABYLON.MeshThe mesh of the floor.
-
structureFloorStructureThe current floor structure.
-
wallsBABYLON.MeshThe mesh of the walls.
wnp.engine3D.subslopeOverturesReady
Syntax
wnp.engine3D.subslopeOverturesReady
private
Summary
Fired once the subslope overtures are created.
Event Payload:
-
floorBABYLON.MeshThe mesh of the floor.
-
structurewnp.floorStructureThe current structure.
-
wallsBABYLON.MeshThe mesh of the wall.