Giter Site home page Giter Site logo

Comments (3)

Mugen87 avatar Mugen87 commented on July 30, 2024

Can you please demonstrate with a fiddle what's going wrong: https://jsfiddle.net/narenjcs/8ret1b9z/13/

It's currently not clear to me if this is a bug or if it is just the expected behavior.

from three.js.

Mugen87 avatar Mugen87 commented on July 30, 2024

I've created a fiddle by myself: https://jsfiddle.net/3cbrz8k4/3/

What we see is the expected behavior when enabling on transformGroup.

Objects organized in groups usually are logically connected so it makes sense when transformGroup is set to true, the entire group is affected. I understand there is the use case if just a single object of the hierarchy is added to the controls and transformGroup is set to true. In this case, users might expect the controls do not affect the hierarchy. But I'm unsure if this is right considering that enabling transformGroup should transform groups. That's the hole point of the property.

Nevertheless, we could basically check if the detected group is part of the objects array maintained by DragControls but that would potentially break other use cases which rely on the current behavior. As long as no other devs report the issue, let's keep the current default.

from three.js.

Mugen87 avatar Mugen87 commented on July 30, 2024

Nevertheless, we could basically check if the detected group is part of the objects array maintained by DragControls

Here is a custom version of DragControls that implements the suggested fix: https://jsfiddle.net/3bc8Lov7/

There is now a new helper function inObjects() that checks whether a found group belongs to the object hierarchies managed by DragControls.

from three.js.

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.