-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/API for controlling scene #15
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hannojg
changed the title
[🚧WIP] Feat/api for maintaining scene
Feat/API for controlling scene
Feb 29, 2024
Merged
mrousavy
added a commit
that referenced
this pull request
Mar 5, 2024
>[!WARNING] > Based on the following PR which should be merged first > - #13 **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 manipulator - New `lookAt` function, which can be used to manually control the position, target and up vector of the camera - New `setLensProjection` & `setProjection` function to Control the lens configuration from JS - **⚠️ Note:** @mrousavy The user would also need to call this when the surface size changes (as we need to pass the aspect ratio to this function). Lets discuss in a quick meeting how to solve this best - **Engine:** - 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 want - Exposed `transformToUnitCube`. Pass an asset and it will transform the asset to fit into a unit cube - New `setEntityPosition`, `setEntityRotation` and `setEntityScale` to set or update an entities transform - `loadAsset` now returns a `FilamentAsset`. The asset can be used for various operations in the scene. --------- Co-authored-by: Marc Rousavy <me@mrousavy.com>
mrousavy
added a commit
that referenced
this pull request
Mar 5, 2024
>[!WARNING] > Based on the following PR which should be merged first > - #13 **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 manipulator - New `lookAt` function, which can be used to manually control the position, target and up vector of the camera - New `setLensProjection` & `setProjection` function to Control the lens configuration from JS - **⚠️ Note:** @mrousavy The user would also need to call this when the surface size changes (as we need to pass the aspect ratio to this function). Lets discuss in a quick meeting how to solve this best - **Engine:** - 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 want - Exposed `transformToUnitCube`. Pass an asset and it will transform the asset to fit into a unit cube - New `setEntityPosition`, `setEntityRotation` and `setEntityScale` to set or update an entities transform - `loadAsset` now returns a `FilamentAsset`. The asset can be used for various operations in the scene. --------- --------- Co-authored-by: Hanno J. Gödecke <hanno@margelo.io> Co-authored-by: Hanno J. Gödecke <die.drei99@yahoo.de>
hannojg
added a commit
that referenced
this pull request
Jun 19, 2024
>[!WARNING] > Based on the following PR which should be merged first > - #13 **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 manipulator - New `lookAt` function, which can be used to manually control the position, target and up vector of the camera - New `setLensProjection` & `setProjection` function to Control the lens configuration from JS - **⚠️ Note:** @mrousavy The user would also need to call this when the surface size changes (as we need to pass the aspect ratio to this function). Lets discuss in a quick meeting how to solve this best - **Engine:** - 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 want - Exposed `transformToUnitCube`. Pass an asset and it will transform the asset to fit into a unit cube - New `setEntityPosition`, `setEntityRotation` and `setEntityScale` to set or update an entities transform - `loadAsset` now returns a `FilamentAsset`. The asset can be used for various operations in the scene. --------- Co-authored-by: Marc Rousavy <me@mrousavy.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
lookAt
->lookAtCameraManipulator
Can be used to make camera look at camera manipulatorlookAt
function, which can be used to manually control the position, target and up vector of the camerasetLensProjection
&setProjection
function to Control the lens configuration from JSEngine:
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)createLightEntity
Function to create a light with the configuration you wanttransformToUnitCube
. Pass an asset and it will transform the asset to fit into a unit cubesetEntityPosition
,setEntityRotation
andsetEntityScale
to set or update an entities transformloadAsset
now returns aFilamentAsset
. The asset can be used for various operations in the scene.