0.9.3 • Published 18 days ago

@masatomakino/threejs-spherical-controls v0.9.3

Weekly downloads
-
License
MIT
Repository
-
Last release
18 days ago

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

0.9.3

18 days ago

0.9.2

20 days ago

0.9.1

3 months ago

0.9.0

4 months ago

0.8.0

7 months ago

0.7.1

8 months ago

0.5.3

10 months ago

0.7.0

8 months ago

0.6.1

9 months ago

0.6.0

9 months ago

0.5.2

11 months ago

0.5.0

1 year ago

0.5.1

1 year ago

0.4.8

1 year ago

0.4.7

1 year ago

0.4.6

2 years ago