CameraComponent Class
Camera Component.
Constructor
CameraComponent
(
-
core
Parameters:
-
core
wnp.CoreWanaplan core
Item Index
Methods
Properties
Methods
compute
()
private
Recompute of the component.
destroy
()
Destructor.
disable
()
Disables the component
enable
()
Enables the component
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
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
camera
BABYLON.Camera
The cameras. The element of index 0 is a BABYLON.ArcRotateCamera, for orbit mode. The element of index 1 is a BABYLON.FreeCamera, for FPS mode.
keyboardManager
wnp.KeyboardManager
Instance of the Keyboard Manager (shortcut to wanaplan.keyboardManager).
lookAt
BABYLON.Mesh
A mesh bound to the lookAt position, that will move with the camera. By default, it is the avatar mesh.
structure
wnp.Structure
Instance of the structure (shortcut to wanaplan.structure).
Events
wnp.engine3D.camera.zoom
Fired to zoom the camera.
wnp.engine3D.cameraChanged
Fired to change the camera.