0.5.1 • Published 3 months ago

@masatomakino/threejs-position-util v0.5.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

threejs-position-util

measuring geometry positions for three.js

MIT License CI_Main Maintainability Test Coverage

ReadMe Card

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

API documentation

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.

License

MIT licensed.

0.5.1

3 months ago

0.5.0

5 months ago

0.4.1

8 months ago

0.4.0

9 months ago

0.3.4

10 months ago

0.4.2

8 months ago

0.3.3

1 year ago

0.3.2

2 years ago