Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Game Engine Development
  3. three-csgmesh

three-csgmesh

JavaScript

A library for performing Constructive Solid Geometry (CSG) operations on Three.js meshes.

GitHubGitHub
492 stars60 forks0 contributors

What is three-csgmesh?

THREE-CSGMesh is a JavaScript library that brings Constructive Solid Geometry (CSG) capabilities to Three.js. It allows developers to perform Boolean operations like union, subtraction, and intersection on 3D meshes programmatically. This enables dynamic creation of complex geometries by combining simpler shapes directly in the browser.

Target Audience

Three.js developers and web-based 3D application creators who need to generate or modify 3D geometries at runtime without external modeling tools.

Value Proposition

It provides a straightforward, programmatic way to perform CSG operations within Three.js, eliminating the need for pre-modeled assets or external software for certain geometry combinations.

Overview

Conversion of a CSG library for use with modern THREE.js

Use Cases

Best For

  • Generating complex 3D shapes by combining primitive geometries in Three.js
  • Creating custom 3D modeling tools within web applications
  • Performing runtime mesh modifications for interactive 3D experiences
  • Implementing Boolean operations similar to those in 3D modeling software
  • Educational projects demonstrating CSG algorithms in WebGL
  • Prototyping 3D designs directly in the browser without external tools

Not Ideal For

  • Applications requiring real-time rendering of highly detailed meshes with frequent CSG operations, due to performance bottlenecks.
  • Professional CAD or 3D printing workflows that demand watertight, manifold geometry without artifacts.
  • Projects needing an intuitive, visual interface for 3D modeling rather than programmatic control.
  • Scenes with thousands of dynamic objects where per-frame CSG calculations would be prohibitive.

Pros & Cons

Pros

Efficient BSP Core

Implements Binary Space Partitioning trees for reliable CSG operations, ensuring accurate geometry combinations as described in the README.

Material and Color Faithfulness

Preserves material assignments and vertex color channels from input meshes, demonstrated in the CSGMulti demo with multiple material groups.

Modern Three.js Compatibility

Adapted for use with contemporary Three.js versions, preventing integration issues with newer releases as highlighted in the documentation.

Multiple Material Handling

Supports complex meshes with multiple material groups during CSG operations, allowing for richer visual results without data loss.

Cons

Performance Intensive Operations

CSG calculations, especially on complex meshes, can be slow and may cause frame rate drops in interactive applications, a common trade-off with BSP-based approaches.

Potential Geometry Artifacts

Can produce non-manifold edges or inefficient triangulation, requiring post-processing for clean meshes suitable for rendering or export.

Limited Feature Set

Only provides basic union, subtract, and intersect operations; lacks advanced features like edge beveling, smoothing, or parametric controls found in full 3D suites.

Frequently Asked Questions

Quick Stats

Stars492
Forks60
Contributors0
Open Issues1
Last commit2 years ago
CreatedSince 2019

Tags

#geometry-processing#boolean-operations#threejs#three-js#3d-graphics#javascript-library#mesh-operations#webgl#constructive-solid-geometry

Built With

t
three.js
J
JavaScript

Included in

Game Engine Development1.3k
Auto-fetched 1 day ago

Related Projects

csg.jscsg.js

Constructive solid geometry on meshes using BSP trees in JavaScript

Stars1,861
Forks265
Last commit7 years ago
three-bvh-csgthree-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh

Stars947
Forks87
Last commit10 days ago
Constructive Solid GeometryConstructive Solid Geometry

Technique using boolean operations to combine primitive objects

Stars0
Forks0
Last commit
Mesh TransformsMesh Transforms

Apple's private API for manipulation of UIView meshes. [Source]

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub