three_js_controls 0.1.0 copy "three_js_controls: ^0.1.0" to clipboard
three_js_controls: ^0.1.0 copied to clipboard

Flutter controls package converted from threejs and three_dart package.

three_js_controls #

Pub Version analysis License: MIT

A type of three_js camera controller that allows users to add either orbit, fly, fps, point, trackball, map, or drag controller to thier projects.

Gif of orbit controls.

This is a dart conversion of three.js and three_dart, originally created by @mrdoob and has a coverted dart fork by @wasabia.

Getting started #

To get started add this to your pubspec.yaml file along with the other portions three_js_math, three_js_core, and a three_js_(loder type).

    late MapControls controls;

    void initControls() {
        controls = MapControls(camera, _globalKey);

        controls.enableDamping = true; // an animation loop is required when either damping or auto-rotation are enabled
        controls.dampingFactor = 0.05;

        controls.screenSpacePanning = false;

        controls.minDistance = 100;
        controls.maxDistance = 500;

        controls.maxPolarAngle = math.pi / 2;
    }

    void update() {
        controls.update();
    }

Usage #

This project is a simple camera controller for three_js.

Example #

Find the example for this API here.

Contributing #

Contributions are welcome. In case of any problems look at existing issues, if you cannot find anything related to your problem then open an issue. Create an issue before opening a pull request for non trivial fixes. In case of trivial fixes open a pull request directly.

1
likes
140
points
1.07k
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter controls package converted from threejs and three_dart package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, three_js_core, three_js_core_loaders, three_js_curves, three_js_geometry, three_js_math, three_js_sensors

More

Packages that depend on three_js_controls