Giter VIP home page Giter VIP logo

three-freeform-controls's Introduction

three-freeform-controls

npm version Built with TypeScript

This library provides rotation and translation controls for THREE.JS objects.

screenshot


Changelog

v0.3.0 [March 1, 2023]

  • Rework the rotation and translation maths; thanks to @kineticsystem
  • Update peer dependencies to "three": ">=0.150.1"
  • Update dev dependencies and examples

Local development:

  • Install dependencies: npm install
  • Build and watch the source code: npm run start

Running examples:

  • Make sure to build the source code
  • Run examples: npm run examples
  • To see a specific example in fullscreen, use the filename from examples/ folder(like localhost:10001/?example=basic or localhost:10001/?example=transition-limit)

The following features are currently supported:

  • translation controls with 3 degrees of freedom
  • rotation controls with 3 degrees of freedom
  • translation and rotation controls about arbitrary axes
  • plane controls for translation restricted to an arbitrary plane
  • rotation controls in the eye plane
  • free-pick controls for translation in the eye plane
  • fixed mode controls (retain orientation wrt. object rotation)
  • inherit mode controls (make controls follow object rotation)
  • custom objects as controls handles
  • enabling partial controls only
  • multiple instances of controls anchored to a single object
  • different instances of controls anchored to a different objects
  • snap to grid
  • translation limits along individual axes

Todo:

  • tests

About the project

License

three-freeform-controls is distributed with an MIT license.

Contributing

When contributing to this repository, please first discuss the change you wish to make via an issue on the Github Repo.

three-freeform-controls's People

Contributors

greenkeeper[bot] avatar kineticsystem avatar seadeep42 avatar tocttou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

three-freeform-controls's Issues

Request for 'mode=scale' Support

Hi,

I would like to suggest adding a mode=scale functionality to the library. This mode would provide scale handles as spheres at the tips of each axis translate arrow.

I'm willing to contribute to this feature with a pull request.

Please let me know if you're open to this idea :)

If there is

Thank you very much for providing this component. Can you add a function to display the current moving value when x, y, and z move? I think that way, there's no need to constantly monitor the position of each object3d, and you can directly see the changes

How to change HANDLES SCALE, CONE RADIUS and other handle settings?

Hi, my objects are very large (100x100x100), so I need to scale the controls up significantly.
I can change the radius of the controls using the separation parameter, but the cones and the handlebars remain too small (checking in the code: DEFAULT_CONE_RADIUS = 0.3, should be around 10 for me).
How can I set the these values at run time?
Thanks for a great library btw :)

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.