SwimmingPoolComponent3D
Summary
SwimmingPool Component 3D.
Constructor
SwimmingPoolComponent3D
Syntax
SwimmingPoolComponent3D
-
core
Summary
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
addCarveFloorCallback
Syntax
addCarveFloorCallback
-
callback
Summary
Adds a callback function called when the floor is carved. The callback is called when the base process is done.
Parameters:
-
callback
FunctionThe callback to add.
applyCarveFloorCallback
Syntax
applyCarveFloorCallback
-
swimmingPoolCSG
-
floor
Summary
Runs all registered callbacks. It must be started only when the carving process is done.
Parameters:
-
swimmingPoolCSG
BABYLON.CSGthe swimming pool mesh.
-
floor
BABYLON.MeshThe floor mesh.
carveWithSwimmingPoolMeshes
Syntax
carveWithSwimmingPoolMeshes
-
sp
-
meshCSG
-
ground
-
floor
Summary
Carves a swimmingPool in room and ground.
Parameters:
-
sp
BABYLON.CSGThe CSG mesh of the cube to carve with.
-
meshCSG
BABYLON.CSGThe ground in CSG mesh.
-
ground
BABYLON.Mesh3D mesh of the ground.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
Returns:
New room create after dig the wall.
compute
Syntax
compute
()
private
Summary
Recompute of the component.createSwimmingPool
Syntax
createSwimmingPool
-
swimmingPool
-
structure
-
floor
Summary
Creates a 3D swimmingPool mesh.
Parameters:
-
swimmingPool
SwimmingPoolStructureThe structure of the swimmingPool.
-
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
removeCarveFloorCallback
Syntax
removeCarveFloorCallback
-
callback
Summary
Removes a callback function from the collection of callbacks called when the floor is carved.
Parameters:
-
callback
FunctionThe callback to remove.
startListening
Syntax
startListening
()
Summary
Calls all the event listeners.stopListening
Syntax
stopListening
()
Summary
Removes all the event listeners.swimmingPoolBassinBox
Syntax
swimmingPoolBassinBox
-
sp
-
structure
-
floor
-
elevation
Summary
Creates a CSG box to carve the ground and the room.
Parameters:
-
sp
SwimmingPoolStructureThe structure of the swimmingPool.
-
structure
FloorStructureThe structure of the current floor.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
-
elevation
BABYLON.Meshthe elevation of the floor.
Returns:
The Cylinder that will be used to carve ground and room, in CSG format.
swimmingPoolBox
Syntax
swimmingPoolBox
-
sp
-
structure
-
floor
-
elevation
Summary
Creates a CSG box to carve the ground and the room.
Parameters:
-
sp
SwimmingPoolStructureThe structure of the swimmingPool.
-
structure
FloorStructureThe structure of the current floor.
-
floor
BABYLON.MeshThe 3D mesh of the floor.
-
elevation
BABYLON.Meshthe elevation of the floor.
Returns:
The cube that will be used to carve ground and room, in CSG format.
update
Syntax
update
-
deltaTime
Summary
Updates the dynamic part of the component.Parameters:
-
deltaTime
NumberThe time interval.