aframe-position-spherical-component

0.1.3 • Public • Published

aframe-position-spherical-component

Simple utility to position entity with spherical coordinate system.

Usage

npm install aframe-position-spherical-component
require('aframe');
require('aframe-position-spherical-component');
<a-box position-shperical="12 90 45"></a-box>
var box = document.querySelector('a-box');
box.setAttribute('position-spherical', { radius: 12, phi: 90, theta: 45 });

Values

Type Description
string String in format: ${radius} ${phi} ${theta}.
custom Object with coordinates properties:
  • radius: number - distance in meters
  • phi: number - polar angle from the y axis in degrees
  • theta: number - equator angle around the y axis in degrees

Example

https://krzysztof-grzybek.github.io/aframe-position-spherical-component/example/

Package Sidebar

Install

npm i aframe-position-spherical-component

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

4.69 MB

Total Files

16

Last publish

Collaborators

  • krzysztof-grzybek