npm.io
1.0.2 • Published 2d ago

isometric-physics

Licence
MIT
Version
1.0.2
Deps
0
Size
29 kB
Vulns
0
Weekly
0

isometric-physics

Build Docs License: MIT

Zero-dependency isometric projection math, 2D/3D vector operations, and vessel position integration for TypeScript projects.

Install

pnpm add isometric-physics

Usage

import { isoTransform, vec3Cross, stepVesselPosition } from 'isometric-physics';

const screenPoint = isoTransform(4, 2, 1);
const normal = vec3Cross({ x: 1, y: 0, z: 0 }, { x: 0, y: 1, z: 0 });
const nextPosition = stepVesselPosition({ x: 0, y: 0 }, 12, 90, 0.016, 100);

API

The package exports three small modules:

  • isometric for projection helpers and compass labels
  • vectors for 2D and 3D vector math
  • physics for world-wrapping vessel integration

Full API documentation is generated with Typedoc and published through the docs workflow.

Development

pnpm install
pnpm build
pnpm run docs