npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@homie-rocks/geom

v0.1.1

Published

Procedural geometry for three.js games: chamfered primitives, walls with cut openings, lofts, sweeps, merge and instancing accumulators, route and racing-line maths. It builds triangles; it owns no game content.

Readme

@homie-rocks/geom

Procedural geometry for three.js games: chamfered boxes, lathes and plates, a wall with real cut openings, lofts and sweeps, accumulators that merge many parts into one buffer or one InstancedMesh, and the corridor maths under a racing line (stations, frames, cross-sections, a minimum-curvature offset). It knows triangles, matrices, instances and cells. It ships no prop generator and no art direction, and it does not know what a lap, a checkpoint or a building is: every number that describes a particular world is an argument.

Part of Homie's open game engine: the packages the Homie games are built on.

Install

npm install --save-exact @homie-rocks/[email protected] [email protected]

npm installs its one dependency, @homie-rocks/heightfield, with it.

Use

import * as THREE from 'three';
import { bevelBox } from '@homie-rocks/geom/prim.js';
import { GeoAccum } from '@homie-rocks/geom/accum.js';
import { trs } from '@homie-rocks/geom/trs.js';

// Ten chamfered 2 x 1 x 1 m blocks, merged into one draw call.
const block = bevelBox(2, 1, 1);
const acc = new GeoAccum();
for (let i = 0; i < 10; i++) acc.add(block, trs(i * 2.5, 0.5, 0, 0), new THREE.Color(0xb8b0a4));

const geo = acc.build(); // one indexed BufferGeometry with vertex colours, or null if empty
if (geo) scene.add(new THREE.Mesh(geo, new THREE.MeshStandardMaterial({ vertexColors: true })));

There is no barrel file: import the module you need.

Modules

| module | what it does | |---|---| | prim.js | bevelBox, plainBox, card, groundStrip, wobbleDisc, chamferCap, flipFaces | | chamfer.js | metre-UV primitives: chamferBox, latheGeo, chamferCyl, torusGeo, plateGeo, domeMeridian | | wall.js | wallWithOpenings: a facade panel with recessed window and door reveals | | loft.js | loft: a closed cross-section swept along a path, with a radius callback | | mesher.js | MesherBase: one growing triangle soup with rounded-rectangle lofts, revolves, tubes and atlas UV remapping | | accum.js | GeoAccum: many transformed geometries into one indexed buffer with tint and baked AO | | inst.js | InstSet: many transforms into one InstancedMesh with per-instance tint, UV, wind, LOD and bob channels | | merge.js | mergeStaticSets: static instance sets baked into one mesh per material per grid cell | | weld.js | weldGeos over a declared attribute schema, weldParts, constAttr, bakeXform | | sweep.js | sweepAlongZ: bend a geometry built straight along +Z onto a curved path | | route.js | sampleRoute over a height field, then sweepGeo, ribbonGeo, dashedRibbon and slicing along the frames | | station.js | StationLine: a closed corridor cut into stations, the minimum-curvature offset and wrap-safe lookups | | ribbon.js | the frame along a station table, cross-section profiles, and a grid-accelerated findStation | | navgraph.js | NavGraph: an XZ road graph with an injected RNG for crowds and traffic | | laneride.js | LaneRider: a body travelling a NavGraph offset from the centre line, easing into junctions |

and 24 more in src/: xform, trs, tube, hexring, revolve, bell, coneshell, finplate, extrude, bonekit, stencil, leanhull, floor, graph, planar, network and others.

License

Apache-2.0. See LICENSE and NOTICE.