🔺 Common Core Geometry

WebAssembly Bindings - Interactive Examples

📐

Basic Usage

Explore fundamental geometric primitives and their operations.

  • Point3D operations
  • Vector3D calculations
  • Sphere properties
  • Triangle computations
Beginner Friendly
🎯

Ray Casting

Demonstrate ray intersection algorithms with various geometric primitives.

  • Ray-Sphere intersections
  • Ray-Plane intersections
  • Ray-Triangle intersections
  • Hit/Miss detection
Intermediate
🎨

SVG Rendering

Interactive 3D scene rendered to SVG with camera controls.

  • Perspective & orthographic cameras
  • Real-time scene updates
  • Customizable objects
  • SVG export
Advanced

📚 About This Library

Common Core Geometry is a high-performance 3D geometry engine written in Rust and compiled to WebAssembly. It provides a comprehensive set of primitives and operations for computational geometry tasks.

Features:

🚀 Quick Start

Build the package from source:

bun run build:web

Use it in your project:

import init, { Point3D, Vector3D } from 'path/to/geometry';

await init();

const p1 = new Point3D(0, 0, 0);
const p2 = new Point3D(3, 4, 0);
const distance = p1.distanceTo(p2); // 5.0

🛠️ Build Targets

This library supports multiple build targets: