SwimmingPoolComponent3D Class
SwimmingPool Component 3D.
Constructor
SwimmingPoolComponent3D
-
core
Parameters:
-
core
CoreThe main engine.
Item Index
Methods
Properties
Methods
addCarveFloorCallback
-
callback
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
-
swimmingPoolCSG
-
floor
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
-
sp
-
meshCSG
-
ground
-
floor
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
()
private
createSwimmingPool
-
swimmingPool
-
structure
-
floor
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
()
disable
()
enable
()
getFloor
-
[structure]
Parameters:
-
[structure]
FloorStructure optionalThe floor structure.
Returns:
The floor mesh in 3D.
initialize
()
onContextChanged
-
context
Parameters:
-
context
StringThe new context
removeCarveFloorCallback
-
callback
Removes a callback function from the collection of callbacks called when the floor is carved.
Parameters:
-
callback
FunctionThe callback to remove.
startListening
()
stopListening
()
swimmingPoolBassinBox
-
sp
-
structure
-
floor
-
elevation
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
-
sp
-
structure
-
floor
-
elevation
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
-
deltaTime
Parameters:
-
deltaTime
NumberThe time interval.