0.6.1 • Published 4 years ago

ember-aframe-camera-extras v0.6.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

ember-aframe-camera-extras

npm version Build Status Netlify Status

Sync camera rotation and position with query params or network

Demo: https://ember-aframe-camera-extras.netlify.com

Rotation doesn't work in A-Frame 0.8 because of https://stackoverflow.com/questions/52815449/incorrent-orientation-with-initial-camera-rotation-in-aframe-0-8

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install ember-aframe-camera-extras

Usage

Add this to your route:

import Ember from 'ember';
import QueryParamsRouteMixin from 'ember-aframe-camera-extras/mixins/query-params-route';

export default Ember.Route.extend(QueryParamsRouteMixin, {
});

and this to your controller:

import Ember from 'ember';
import QueryParamsControllerMixin from 'ember-aframe-camera-extras/mixins/query-params-controller';

export default Ember.Controller.extend(QueryParamsControllerMixin, {
});

and this to your camera component:

import ACamera from 'ember-aframe/components/a-camera';
import ComponentActionsMixin from 'ember-aframe-camera-extras/mixins/component-actions';

export default ACamera.extend(ComponentActionsMixin, {
});

Then, you can customize the actions in your template:

<a-scene>
  {{my-camera
    cameraQueryParams=cameraQueryParams
    intervals=(hash
      cameraMoveSlow=(hash interval=1000 adjustHeight=true)
      cameraMoveFast=(hash interval=10)
    )
    cameraMoveSlow=(action "updateCameraQueryParams")
    cameraMoveFast=(action "someCustomNetworkCall")
  }}
</a-scene>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

0.6.1

4 years ago

0.6.0

4 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.0

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

7 years ago

0.0.0

7 years ago