Version 2.0.0 - Modern JavaScript Isometric HTML5 Display Engine
An isometric 3D graphics engine for HTML5 Canvas, completely refactored with modern ES6 modules.
This is a complete refactoring of the original SheetEngine library:
- Modern ES6 Modules - Clean, modular architecture split into 14 focused modules
- Simple JavaScript - No TypeScript, just clean, readable ES6+ code
- Tree-Shakeable - Import only what you need
- Better Developer Experience - Clear module boundaries and dependencies
- Backward Compatible - Same API as version 1.x
npm install# Build for production
npm run build
# Build and watch for changes
npm run devThis creates two builds:
dist/sheetengine.js- UMD build (works everywhere)dist/sheetengine.esm.js- ES Module build (for modern bundlers)
<script src="dist/sheetengine.js"></script>
<script>
const canvas = document.getElementById('mycanvas');
sheetengine.scene.init(canvas, {w: 900, h: 500});
// Create a base sheet
const basesheet = new sheetengine.BaseSheet(
{x:0, y:0, z:0},
{alphaD:90, betaD:0, gammaD:0},
{w:200, h:200}
);
basesheet.color = '#5D7E36';
// Calculate and draw
sheetengine.calc.calculateAllSheets();
sheetengine.drawing.drawScene(true);
</script>import sheetengine, { BaseSheet, Sheet, SheetObject } from './dist/sheetengine.esm.js';
// Or import individual modules
import * as geometry from './src/geometry.js';
import * as transforms from './src/transforms.js';const sheetengine = require('./dist/sheetengine.js');sheetengine/
├── src/
│ ├── core.js # Global state management
│ ├── geometry.js # 3D math utilities
│ ├── transforms.js # Coordinate transformations
│ ├── shadows.js # Shadow calculation
│ ├── drawing.js # Canvas rendering
│ ├── intersections.js # Sheet intersection detection
│ ├── z-ordering.js # Depth sorting
│ ├── calc.js # Main calculation engine
│ ├── scene.js # Scene management
│ ├── objhelpers.js # Object helper utilities
│ ├── BaseSheet.js # BaseSheet class
│ ├── Sheet.js # Sheet class
│ ├── SheetObject.js # SheetObject class
│ ├── DensityMap.js # Collision detection
│ └── index.js # Main entry point
├── dist/ # Built files
├── examples/ # Example HTML files
└── package.json
- BaseSheet - Static background rectangles
- Sheet - Drawable 3D sheets with canvases
- SheetObject - Complex objects with multiple sheets
- DensityMap - Collision detection grid
- scene - Canvas initialization, scene management
- calc - Sheet calculations and transformations
- drawing - Rendering functions
- geometry - Vector math, rotations, transformations
- shadows - Shadow and lighting effects
Check out the examples/ directory for working demos:
- Creating a scene
- Custom textures
- Moving and rotating objects
- Animations
- Collision detection
- Shadows and lighting
- And more...
To view examples:
npm run serve
# Open http://localhost:8080/examples/The codebase is organized into clean ES6 modules:
- Core modules - geometry, transforms (no dependencies)
- Rendering modules - shadows, drawing, intersections
- Engine modules - calc, scene, z-ordering
- Class modules - BaseSheet, Sheet, SheetObject, DensityMap
Each module has clear responsibilities and minimal dependencies.
For detailed API documentation and tutorials, see: https://normanzb.github.io/sheetengine/
MIT License - Copyright (C) 2012 Levente Dobson