-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(react-components): Fixes bug where ground plane scale is stored as xz instead of xy #4743
fix(react-components): Fixes bug where ground plane scale is stored as xz instead of xy #4743
Conversation
// New scale format was introduced as a bug in the Scenebuilder | ||
// on August 1st, 2024. This is a temporary fix to handle both formats. | ||
// This should be removed when we upgrade the Scene Data Model to a new version | ||
const groundPlaneUsesNewScaleFormat = groundPlaneUseNewScaleFormat( | ||
scene.sceneConfiguration.updatedAt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to write this down in your document, so that we remember to actually remove this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed!
const scaleX = groundPlane.scaleX; | ||
const scaleY = groundPlaneUsesNewScaleFormat ? groundPlane.scaleZ : groundPlane.scaleY; | ||
|
||
const geometry = new PlaneGeometry(10000 * scaleX, 10000 * scaleY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a bit weird to have this random scaling factor here 😅 Should it be in a variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, fixed in 60db811
Title should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
…ene-ground-plane-scale
Type of change
Description 📝
Fixes bug where starting August 1 2024, groundplanes in scene is stored with scale in XZ instead of XY. Checking
updatedAt
to check which format ground plane scale has been written inHow has this been tested? 🔍
Test instructions ℹ️
Checklist ☑️