0.1.3 • Published 5 years ago

aframe-position-spherical-component v0.1.3

Weekly downloads
7
License
ISC
Repository
github
Last release
5 years ago

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

TypeDescription
stringString in format: ${radius} ${phi} ${theta}.
customObject with coordinates properties: radius: number - distance in metersphi: number - polar angle from the y axis in degreestheta: number - equator angle around the y axis in degrees

Example