WallComponent3D
Summary
3D Walls management.
Constructor
WallComponent3D
Syntax
WallComponent3D
()
Summary
Item Index
Methods
Properties
Events
Methods
compute
Syntax
compute
()
private
Summary
Recompute of the component.decorate
Syntax
decorate
-
material
-
collisionInfo
Summary
Decoration function. Cannot be used except by the decoration component.
Parameters:
-
material
BABYLON.MaterialNew material.
-
collisionInfo
BABYLON.PickingInfoPicking info for the decoration.
Returns:
The former material.
destroy
Syntax
destroy
()
Summary
Destructor.disable
Syntax
disable
()
Summary
Disables the componentdraw
Syntax
draw
-
structure
Summary
Draw all the walls for a floor
Parameters:
-
structure
FloorStructureThe involved floor.
Returns:
The built mesh.
enable
Syntax
enable
()
Summary
Enables the componentget3DWallFrom2D
Syntax
get3DWallFrom2D
-
structure
Summary
Returns a 3D mesh corresponding to a 2D wall structure.
Parameters:
-
structure
WallStructureThe 2D wall.
Returns:
A wall mesh. Be careful, all wall meshes for 1 floor are merged together.
getFloor
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
replaceWall
Syntax
replaceWall
-
oldWall
-
newWall
Summary
Replaces one wall mesh with another, copying important data along.
The old wall mesh is disposed during the process.
Used mainly by the CSG operations.
Parameters:
-
oldWall
BABYLON.MeshOld wall.
-
newWall
BABYLON.MeshNew wall.
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
_defaultMaterial
Syntax
_defaultMaterial
BABYLON.StandardMaterial
Summary
Default wall material.
Default: wnp.WhiteMaterial
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.wallsReady
Syntax
wnp.engine3D.wallsReady
Summary
Fired when all 3D wall meshes are ready.