Git Product home page Git Product logo

Comments (4)

bsergean avatar bsergean commented on June 15, 2024 1

My opinion is that only one package on NPM is the right thing to do to avoid confusion. I was given ownership rights but unfortunately I'm not doing three.js / js (was doing coffee script !) daily.

@mattdesl is the real owner of this package so I'll leave it up to him.

@fibo, my take on this is that if you are motivated and ready to keep the package up to date, you should become one of the owner of this git repo.

from three-orbit-controls.

fibo avatar fibo commented on June 15, 2024

@bsergean it is ok for me to maintain this package, but, only if its real development is done by original three.js contributors and this package do the minimum modifications to put it on npm.

Then there is a thread about three.js modularization (since 2014 :) and when it ends, my proposal is to give back this package to mrdoob, since maybe he will want to manage it with lerna or some other tool.

@mattdesl if this roadmap is ok for you, I can do the rest and keep this package updated, otherwise I will proceed with the one I created. I prefer the first option, please let me know.

from three-orbit-controls.

mattdesl avatar mattdesl commented on June 15, 2024

Both modules handle the THREE global differently. With modular THREE right now there's are a few ways as I see it, with their own pros/cons:

  • Direct dependency on three — not a good solution IMHO, will lead to version woes for the end-user and expects three.js to be part of the bundle
  • Peer dependency on three — can avoid some versioning woes but peer deps are never really good, they cause all sorts of headaches and confusion for many end-users, and ultimately don't solve a whole lot
  • Wrapping things in a closure and forcing the user to pass their own THREE instance — i.e. what this module does. It provides the most flexibility since it doesn't assume THREE is in global scope, and it works whether or not the library is in your bundle or a separate script tag. It's a bit cumbersome to type and harder to pull upstream updates
  • Just expecting THREE to be globally accessible, and not handling version differences. This is probably the easiest way to keep the library updated but also forces the end-user to structure their code in a specific way (including THREE in global scope before requiring modules like this)

It's hard to say which is best, and maybe having multiple modules to choose from isn't such a bad thing for end-users.

from three-orbit-controls.

fibo avatar fibo commented on June 15, 2024

I agree, so I will use peer deps on a separate package, maybe including all controls.

It is true that peer deps can lead to some headache cause they are not installed automatically, but, usually a user that requires Orbit control already has three.js as a dependency. I will keep updated the required version with the upstream and I need really few modifications (which probably I can automate) to make the module exportable, so I think using peer deps is ok.

Using a closure is a nice solution, and I wanted to use this package, but it is not updated to latest version.

Anyway, I think you should not fix bugs on Orbit control issues, but, update from the upstream and invite users to open an issue on three.js official repository, you are doing a task twice.

from three-orbit-controls.

Related Issues (18)

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.