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

Better names for Scene related stuff #11

Open
mgsx-dev opened this issue Mar 1, 2020 · 3 comments
Open

Better names for Scene related stuff #11

mgsx-dev opened this issue Mar 1, 2020 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@mgsx-dev
Copy link
Owner

mgsx-dev commented Mar 1, 2020

Some classes names are a bit misleading for libgdx users
we have :

  • SceneAsset is what you load, it contains several SceneModel, there are no equivalent in libgdx since GLTF allow multiple scenes (multiple Model) in the same file.
  • SceneModel is the equivalent of Model in libgdx.
  • Scene is the equivalent of ModelInstance in libgdx, it could be renamed as "SceneInstance".
  • SceneManager has no equivalent in libgdx, it handles both animations and rendering. Singular Scene word is misleading since it handles several scenes (scene instances), maybe SceneGraph or SceneTree could be better names.
@mgsx-dev mgsx-dev added the enhancement New feature or request label Mar 1, 2020
@mgsx-dev
Copy link
Owner Author

mgsx-dev commented Mar 2, 2021

Also some other classes was named pretty badly. Since there are not tight coupled to the GLTF format, it doesn't make sense to prefix them with GLTF, the idea would be to use a common suffix for them. Best candidate so far would be "Ex" as in "Extended".

problematic classes :

  • AnimationControllerHack, NodeAnimationHack and ModelInstanceHack add supports for morphTarget and new keyframe interpolations.
  • NodePlus and NodePartPlus add supports for morphTarget.
  • DirectionalLightEx, supports intensity.
  • PointLightEx and SpotLightEx have a range.
  • DirectionalShadowLight is the core DirectionalShadowLight version of DirectionalLightEx.

@mgsx-dev mgsx-dev added this to the 2.0 milestone Mar 2, 2021
@cosmicdan
Copy link

As a newbie to 3D game design, I was confused only by the "Scene" class name. I've instead just made my own class named "SceneModelInstance" that wraps it, but I read that a Scene can have multiple models. Is that a GLTF thing, or is it actually possible to put multiple GLTF's into one model instance?

@mgsx-dev
Copy link
Owner Author

mgsx-dev commented Dec 29, 2021

Thing is, the Scene class is more than a ModelInstance wrapper, it also wraps an AnimationController, lights, and cameras. The term "scene" indeed comes from GLTF format specification. A GLTF file can have several scenes, it typically only contains one scene though. Also, you're free to merge several Scene's into one, the same way you can merge several ModelInstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants