# evanw/csg.js

Constructive solid geometry on meshes using BSP trees in JavaScript

Repository: https://github.com/evanw/csg.js
Canonical: https://ross.abutalabs.com/products/csgjs
Homepage: http://evanw.github.com/csg.js/
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2019-10-05T21:08:20+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5390, "days_push": 2524, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1862, forks 265 (observed 2026-08-28T04:05:45.498470+00:00)

## What it is
A small JavaScript library implementing Constructive Solid Geometry (CSG) on 3D meshes using BSP trees. It supports Boolean operations like union, subtraction, and intersection between solids, with correct handling of coplanar polygons.

## Use cases
- perform boolean operations on 3d meshes in the browser
- subtract a sphere from a cube in javascript
- build 3d modeling tools with union and intersection of solids
- learn how CSG with BSP trees works
- generate combined solid geometry for webgl scenes

## When to choose
- you need simple, readable CSG operations in JavaScript
- you want a dependency-free library for boolean mesh operations
- you need correct handling of coplanar polygon edge cases

## When to avoid
- you need high-performance CSG on large or complex meshes
- you need maintained software with recent updates and releases
- you need full 3D modeling features beyond boolean operations

## Facets
- artifact type: library
- maturity: maintenance
- function: graphics, simulation, math
- domain: graphics, web-development
- platform: browser, cross-platform
- tags: constructive-solid-geometry, csg, bsp-trees, 3d-meshes, boolean-operations, javascript, game-development, algorithms, nodejs

## Member repositories
- evanw/csg.js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:45.498470+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:15:41.886542+00:00, confidence not recorded.
  - readme: https://github.com/evanw/csg.js (fetched 2026-08-28T04:05:45.498470+00:00, sha 48ded66614ff)
- Data as of 2026-08-30T08:39:29.467469+00:00.
