@masatomakino/threejs-position-util
v0.5.1
Published
measuring geometry positions for three.js
Downloads
112
Readme
threejs-position-util
measuring geometry positions for three.js
Demo
View Demo Page and open console.
Vector3
x: 960
y: 540
z: 0
threejs-position-util output a geometry position on screen.
Getting Started
Install
npm install @masatomakino/threejs-position-util --save-dev
Import
At first, import a class.
import { PositionUtil } from "@masatomakino/threejs-position-util";
Functions
Call static functions in PositionUtil class.
PositionUtil.getGeometryCenterInWorld(mesh);
PositionUtil.getGeometryCenterInLocal(mesh);
PositionUtil.get2DPositionWithMesh(mesh, camera, W, H);
Functions return a position as THREE.Vector3.
see also demo page.