Code Monkey home page Code Monkey logo

Comments (4)

435vic avatar 435vic commented on August 11, 2024 1

Ah, that makes more sense! It works great, thanks!

from three-d.

435vic avatar 435vic commented on August 11, 2024

To be honest, I'm not sure if the magnitude of the up vector of the camera is used, but this solution normalizes the vector so the original magnitude is lost. If the magnitude is needed, I think it could just be calculated beforehand and then added to the vector at the end.

from three-d.

asny avatar asny commented on August 11, 2024

The up vector should always be a unit vector so I'm a bit puzzled why it's necessary, but it's a nice fix anyway 👍

from three-d.

asny avatar asny commented on August 11, 2024

Took a closer look, and it's probably because your up vector is not a unit vector when you call Camera::set_view, so normalized the up vector in that method instead in asny/three-d-asset@52d9a06 . That means we only normalize it once on input and ensure that it's always a unit vector, also when used in other places. Is it still working as expected?

from three-d.

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.