Skip to content
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

Add minimumPixelSize to ModelExperimental #10081

Closed
lilleyse opened this issue Feb 7, 2022 · 0 comments · Fixed by #10092
Closed

Add minimumPixelSize to ModelExperimental #10081

lilleyse opened this issue Feb 7, 2022 · 0 comments · Fixed by #10092
Assignees

Comments

@lilleyse
Copy link
Contributor

lilleyse commented Feb 7, 2022

Part of #9520 for bringing ModelExperimental to production.

Three properties from Model should be added to ModelExperimental:

  • scale
  • minimumPixelSize
  • maximumScale

These control the scale of the computed model matrix. When either of these values is changed updateModelMatrix should be called. When minimumPixelSize does not equal zero, updateModelMatrix should always be called since the world space scale is constantly fluctuating to maintain a constant screen space scale.

The ModelExperimental implementation of these properties can be modeled after backFaceCulling. They should be added to the constructor, to fromGltf, and there should be getters and setters. updateModelMatrix in ModelExperimentalSceneGraph should compute the scale from these three properties and apply that to the model matrix. Generally the scale can be computed similar to getScale in Model except no need to handle the 2D specific code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants