Giter Site home page Giter Site logo

Comments (7)

codynova avatar codynova commented on May 25, 2024 2

Hey @ianpurvis, sorry for the delayed response, I've been super busy lately - thanks for taking a look! I agree with Marco that I'd rather this not be configurable, although I can see why you thought that was my goal due to my comment about performance.

My concern was generating the geometry in the incorrect axes, then transforming to align with ThreeJS. Instead we want to construct the geometry in the correct axes according to ThreeJS alignment, then allow other transforms at runtime. There is also the option to use ConvexPolyhedron.

I'm closing #28 in favor of #30 and have released the updated Cylinder class in [email protected]. I've also updated and released [email protected].

from cannon-es.

sunwin123 avatar sunwin123 commented on May 25, 2024 1

Hey @codynova , you may have a look at this issue Cylinder cannon.js vs cylinder three.js #58 #issuecomment-618207128.
It is a way to solve the problem, I've tested, it works very well.

from cannon-es.

codynova avatar codynova commented on May 25, 2024

@sunwin123 Thank you for taking a look. For performance reasons, rather than create the shape and then rotate, we should construct the geometry in the correct axes to start with.

from cannon-es.

sunwin123 avatar sunwin123 commented on May 25, 2024

@codynova Agree, if thereโ€™s a way to create the geometry with correct rotations, it would be nice. But do they have such APIs ?

from cannon-es.

codynova avatar codynova commented on May 25, 2024

The geometry vertices and faces are mathematically generated here. I haven't looked into it enough yet, but there should be a straightforward way to alter that class to get the desired result during geometry generation.

from cannon-es.

sunwin123 avatar sunwin123 commented on May 25, 2024

I've read the code, it hasn't parameters to alter transformations in geometry creation periods.

from cannon-es.

ianpurvis avatar ianpurvis commented on May 25, 2024

@codynova @sunwin123 Hi guys. I gave this a try... what do you think of the approach in #28 ? Let me know if there is a better way to write the Typescript.

from cannon-es.

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.