パッケージの詳細

lesca-threejs-orbitcontrols

jameshsu1125711MIT1.1.2

add set polar angle and azimuthal angle

lesca, 衝康吉, jameshsu1125, threejs

readme

NPM React React React React React NPM

Why use it?

add OrbitControls setAzimuthalAngle and getPolarAngle methods.

Live Demo

Installation

npm install lesca-threejs-orbitcontrols --save

Usage

import * as THREE from 'three';
import { OrbitControls } from 'lesca-threejs-orbitcontrols';

const renderer = new THREE.WebGLRenderer();
const camera = new THREE.PerspectiveCamera(75, 16 / 9, 0.1, 1000);

// create controls object
const controls = new new OrbitControls(THREE)(camera, renderer.domElement);

// keep update
function animate() {
  requestAnimationFrame(animate);
  controls.update();
}

animate();

Development

Methods

method description
.setPolarAngle(angle:number) set Polar Angle
.setAzimuthalAngle(angle:number) set Azimuthal Angle

Features

  • maintain if necessary