WallComponent3D Class
3D Walls management.
Constructor
WallComponent3D
()
Item Index
Methods
Properties
Events
Methods
compute
()
private
Recompute of the component.
decorate
(
BABYLON.Material
private
-
material
-
collisionInfo
Decoration function. Cannot be used except by the decoration component.
Parameters:
-
material
BABYLON.MaterialNew material.
-
collisionInfo
BABYLON.PickingInfoPicking info for the decoration.
Returns:
BABYLON.Material:
The former material.
destroy
()
Destructor.
disable
()
Disables the component
draw
(
BABYLON.Mesh
private
-
structure
Draw all the walls for a floor
Parameters:
-
structure
FloorStructureThe involved floor.
Returns:
BABYLON.Mesh:
The built mesh.
enable
()
Enables the component
get3DWallFrom2D
(
BABYLON.Mesh
-
structure
Returns a 3D mesh corresponding to a 2D wall structure.
Parameters:
-
structure
WallStructureThe 2D wall.
Returns:
BABYLON.Mesh:
A wall mesh. Be careful, all wall meshes for 1 floor are merged together.
getFloor
(
BABYLON.Mesh
-
[structure]
Gets the 3D mesh of the floor structure in parameter (by default current floor).
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
BABYLON.Mesh:
The floor mesh in 3D.
initialize
()
Method called when Wanaplan is initialized.
You don't need to call this method manually.
onContextChanged
(
-
context
Method called when the context is switched (2D -> 3D or 3D -> 2D)
Parameters:
-
context
StringThe new context
replaceWall
(
private
-
oldWall
-
newWall
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
()
Calls all the event listeners.
stopListening
()
Removes all the event listeners.
update
(
-
deltaTime
Updates the dynamic part of the component.
Parameters:
-
deltaTime
NumberThe time interval.
Properties
_defaultMaterial
BABYLON.StandardMaterial
Default wall material.
Default: wnp.WhiteMaterial
keyboardManager
wnp.KeyboardManager
Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).
structure
wnp.Structure
Instance of the structure (shortcut to wanaplan.structure).
Events
wnp.engine3D.wallsReady
Fired when all 3D wall meshes are ready.