Interface: Engine
Extends
PointerHolder
Properties
clearSkybox()
clearSkybox: () =>
void
Removed the skybox from the scene.
Returns
void
Defined in
createAndSetSkyboxByColor()
createAndSetSkyboxByColor: (
colorInHex
,showSun
,envIntensity
) =>void
Skybox
When added to a Scene, the Skybox fills all untouched pixels. By default the scene has no skybox and will be rendered as translucent. When using a skybox make sure to pass enableTransparentRendering as false.
Parameters
• colorInHex: string
• showSun: undefined
| boolean
Indicates whether the sun should be rendered. The sun can only be rendered if there is at least one light of type SUN in the scene. Default: false
• envIntensity: undefined
| number
Skybox intensity when no IndirectLight is set on the Scene. This call is ignored when an IndirectLight is set on the Scene, and the intensity of the IndirectLight is used instead. Scale factor applied to the skybox texel values such that the result is in lux, or lumen/m^2 (default = 30000)
Returns
void
Defined in
createAndSetSkyboxByTexture()
createAndSetSkyboxByTexture: (
buffer
,showSun
,envIntensity
) =>void
Skybox
When added to a Scene, the Skybox fills all untouched pixels. By default the scene has no skybox and will be rendered as translucent. When using a skybox make sure to pass enableTransparentRendering as false.
Parameters
• buffer: FilamentBuffer
• showSun: undefined
| boolean
Indicates whether the sun should be rendered. The sun can only be rendered if there is at least one light of type SUN in the scene. Default: false
• envIntensity: undefined
| number
Skybox intensity when no IndirectLight is set on the Scene. This call is ignored when an IndirectLight is set on the Scene, and the intensity of the IndirectLight is used instead. Scale factor applied to the skybox texel values such that the result is in lux, or lumen/m^2 (default = 30000)
Returns
void
Defined in
isValid
readonly
isValid:boolean
Get if the refernce to the native pointer is still valid and strong.
If this is false
, this object has been manually released with
release
() and all other methods on this object will throw an Error.
Inherited from
PointerHolder.isValid
Defined in
Methods
createLightManager()
createLightManager():
LightManager
Per engine instance you only need one LightManager
.
You should never need to call this manually, use instead from useFilamentContext()
.
Returns
Defined in
createMaterial()
createMaterial(
matcBuffer
):Material
Creates a new material from the given FilamentBuffer.
Parameters
• matcBuffer: FilamentBuffer
Returns
Worklet
Defined in
createOrbitCameraManipulator()
createOrbitCameraManipulator(
config
):CameraManipulator
Parameters
• config: OrbitCameraManipulatorConfig
Returns
Defined in
createRenderableManager()
createRenderableManager():
RenderableManager
Per engine instance you only need one RenderableManager
.
You should never need to call this manually, use instead from useFilamentContext()
.
Returns
Defined in
createRenderer()
createRenderer():
Renderer
Returns
Defined in
createSwapChainForRecorder()
createSwapChainForRecorder(
recorder
):SwapChain
Parameters
• recorder: TFilamentRecorder
Returns
Defined in
createSwapChainForSurface()
createSwapChainForSurface(
surface
,enableTransparentRendering
):SwapChain
Parameters
• surface: SurfaceProvider
• enableTransparentRendering: boolean
Returns
Defined in
createTransformManager()
createTransformManager():
TransformManager
Per engine instance you only need one TransformManager
.
You should never need to call this manually, use instead from useFilamentContext()
.
Returns
Defined in
flushAndWait()
flushAndWait():
void
Kicks the hardware thread (e.g. the OpenGL, Vulkan or Metal thread) and blocks until all commands to this point are executed. Note that does guarantee that the hardware is actually finished. Note: during on screen rendering this is handled automatically, typically used for offscreen rendering (recording).
Returns
void
Defined in
getCamera()
getCamera():
RNFCamera
Returns
Defined in
getScene()
getScene():
Scene
Returns
Defined in
getView()
getView():
View
Returns
Defined in
loadAsset()
loadAsset(buffer)
loadAsset(
buffer
):FilamentAsset
Given a FilamentBuffer (e.g. from a .glb file), load the asset into the engine.
Parameters
• buffer: FilamentBuffer
Returns
Defined in
loadAsset(buffer)
loadAsset(
buffer
):FilamentAsset
Given a
Parameters
• buffer: FilamentBuffer
Returns
See
FilamentBuffer (e.g. from a .glb file), load the asset into the engine. This will by default add all entities from the asset to the attached default scene.
Worklet
Defined in
loadInstancedAsset()
loadInstancedAsset(
buffer
,instanceCount
):FilamentAsset
Given a
Parameters
• buffer: FilamentBuffer