Git Product home page Git Product logo

Comments (4)

dmnsgn avatar dmnsgn commented on September 21, 2024

don't scale scenes -> fix your asset! current attitude after posting this issue

Unfortunately gltf sample models are all over the place in term of scaling.

Sounds like a good use case to have a "center and normalize scene system".

from pex-renderer.

vorg avatar vorg commented on September 21, 2024

Could be quite good example on how to make your own system.

if (enitity.normaliseScale && !aabb.empty(entity.transform.worldBounds) {
  rescaleEntity(enitity)
  delete enitity.normaliseScale
}

from pex-renderer.

vorg avatar vorg commented on September 21, 2024

Just instantiate temp transformSystem, update your scene graph worldBounds in loader (always) so the user can center and normalizeScale as it wishes.

from pex-renderer.

dmnsgn avatar dmnsgn commented on September 21, 2024

Done, feels a bit dirty but will close for now. Reopen if we think normalizing Scene should also be an option in the gltf loader or somewhere else.

Note on alternatives:

// Update transform system
renderEngine.systems
  .find((system) => system.type === "transform-system")
  .update(scene.entities);

// Update all systems
renderEngine.update(scene.entities);

from pex-renderer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.