An open API service indexing awesome lists of open source software.

https://github.com/willviles/ember-3d-orbit-controls

Ember Addon to add Three.js orbit controls to Ember 3D.
https://github.com/willviles/ember-3d-orbit-controls

Last synced: 9 months ago
JSON representation

Ember Addon to add Three.js orbit controls to Ember 3D.

Awesome Lists containing this project

README

          

Ember 3D Orbit Controls [![npm](https://img.shields.io/npm/v/ember-3d-orbit-controls.svg)](https://www.npmjs.com/package/ember-3d-orbit-controls)
======

Offers Three.js Orbit Controls functionality for [Ember 3D](https://github.com/willviles/ember-3d), an Ember Addon for using [Three.js](https://github.com/mrdoob/three.js).

Orbit controls perform orbiting, dollying (zooming), and panning with mouse, mousewheel, touch, and arrow key support. Check out the official [example](https://threejs.org/examples/misc_controls_orbit.html).

## Installation

Ensure you've installed Ember 3D:

`ember install ember-3d`

Then install Ember 3D Orbit Controls

`ember install ember-3d-orbit-controls`

## Mixin

Ember 3D Orbit Controls enables you to use the [OrbitControlsInteractionMixin](https://github.com/willviles/ember-3d-orbit-controls/blob/master/addon/interactions/orbit-controls.js), which registers orbit controls as `orbitControls` on the scene component. You may also pass an options POJO which will be used to set up the controls.

```javascript
// app/3d/scene-id/interactions/orbit-controls.js
import OrbitControlsInteractionMixin from 'ember-3d-orbit-controls/interactions/orbit-controls';

export default OrbitControlsInteractionMixin.extend({

options: {
enableZoom: false,
enablePan: false,
maxPolarAngle: Math.PI / 2
}

});

```

For more information on available options, check out the Three.js code for [Orbit Controls](https://github.com/mrdoob/three.js/blob/576c75dadaf04c76b10e3f9b6e36f9af53e3896c/examples/js/controls/OrbitControls.js).