HardwareScalingComponent3D
Summary
This component manages hardware scaling on the rendering canvas.
Constructor
HardwareScalingComponent3D
Syntax
HardwareScalingComponent3D
(
-
core
Summary
Parameters:
-
core
CoreThe engine.
Item Index
Methods
Properties
Methods
_onResize
Syntax
_onResize
(
private
-
event
Summary
Resize callback which sets the correct values on render canvas.
Triggered on resize
.
Parameters:
-
event
ObjectThe event object.
compute
Syntax
compute
()
private
Summary
Recompute of the component.destroy
Syntax
destroy
()
Summary
Destructor.disable
Syntax
disable
()
Summary
Disables the componentenable
Syntax
enable
()
Summary
Enables the componentgetFloor
Syntax
getFloor
(
BABYLON.Mesh
-
[structure]
Summary
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
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
setHardwareScalingLevel
Syntax
setHardwareScalingLevel
(
-
level
Summary
Changes the hardware scaling by reducing the backbuffer size (canvas internal size).
Parameters:
-
level
NumberThe level of scaling to apply, default is 1, use power of two.
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.