feat: Add API for controlling the scene (#15) #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Warning
Based on the following PR which should be merged first
Goal:
To provide an API from JS that can be used to setup the scene and control the transform of the elements.
(Most important) Changes:
Camera:
Renamed
lookAt
->lookAtCameraManipulator
Can be used to make camera look at camera manipulatorNew
lookAt
function, which can be used to manually control the position, target and up vector of the cameraNew
setLensProjection
&setProjection
function to Control the lens configuration from JSEngine:
Renamed
createDefaultLight
->setIndirectLight
, only sets the indirect light from an FilamentBuffer now (decouples the function from setting a default directional light, which can be now configured by the user)New
createLightEntity
Function to create a light with the configuration you wantExposed
transformToUnitCube
. Pass an asset and it will transform the asset to fit into a unit cubeNew
setEntityPosition
,setEntityRotation
andsetEntityScale
to set or update an entities transformloadAsset
now returns aFilamentAsset
. The asset can be used for various operations in the scene.