@masatomakino/threejs-spherical-controls
TypeScript icon, indicating that this package has built-in type declarations

0.9.3 • Public • Published

threejs-spherical-controls

Spherical camera controller for Three.js

MIT License build test Maintainability Test Coverage

ReadMe Card

Demo

Demo Page

Getting Started

Install

npm install @masatomakino/threejs-spherical-controls --save-dev

Import

threejs-spherical-controls is composed of ES6 modules and TypeScript d.ts files.

At first, import classes.

import { SphericalController } from "@masatomakino/threejs-spherical-controls";

Set up controller

const cameraTarget = new Mesh(new SphereGeometry(1));
scene.add(cameraTarget);

const cameraController = new SphericalController(camera, cameraTarget);
cameraController.initCameraPosition(
  new Spherical(radius, 0, 0), // => North Pole
);
cameraController.move(
  new Spherical(radius, Math.PI, 0), // => South Pole
);

API documents

License

MIT license

Readme

Keywords

Package Sidebar

Install

npm i @masatomakino/threejs-spherical-controls

Weekly Downloads

4

Version

0.9.3

License

MIT

Unpacked Size

41.2 kB

Total Files

33

Last publish

Collaborators

  • makio_masato