@guinetik/gcanvas 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/demos/fluid-simple.html +22 -0
  2. package/demos/fluid.html +37 -0
  3. package/demos/index.html +2 -0
  4. package/demos/js/blob.js +18 -5
  5. package/demos/js/fluid-simple.js +253 -0
  6. package/demos/js/fluid.js +527 -0
  7. package/demos/js/tde/accretiondisk.js +64 -11
  8. package/demos/js/tde/blackholescene.js +2 -2
  9. package/demos/js/tde/config.js +2 -2
  10. package/demos/js/tde/index.js +152 -27
  11. package/demos/js/tde/lensedstarfield.js +32 -25
  12. package/demos/js/tde/tdestar.js +78 -98
  13. package/demos/js/tde/tidalstream.js +23 -7
  14. package/docs/README.md +230 -222
  15. package/docs/api/FluidSystem.md +173 -0
  16. package/docs/concepts/architecture-overview.md +204 -204
  17. package/docs/concepts/rendering-pipeline.md +279 -279
  18. package/docs/concepts/two-layer-architecture.md +229 -229
  19. package/docs/fluid-dynamics.md +97 -0
  20. package/docs/getting-started/first-game.md +354 -354
  21. package/docs/getting-started/installation.md +175 -157
  22. package/docs/modules/collision/README.md +2 -2
  23. package/docs/modules/fluent/README.md +6 -6
  24. package/docs/modules/game/README.md +303 -303
  25. package/docs/modules/isometric-camera.md +2 -2
  26. package/docs/modules/isometric.md +1 -1
  27. package/docs/modules/painter/README.md +328 -328
  28. package/docs/modules/particle/README.md +3 -3
  29. package/docs/modules/shapes/README.md +221 -221
  30. package/docs/modules/shapes/base/euclidian.md +123 -123
  31. package/docs/modules/shapes/base/shape.md +262 -262
  32. package/docs/modules/shapes/base/transformable.md +243 -243
  33. package/docs/modules/state/README.md +2 -2
  34. package/docs/modules/util/README.md +1 -1
  35. package/docs/modules/util/camera3d.md +3 -3
  36. package/docs/modules/util/scene3d.md +1 -1
  37. package/package.json +3 -1
  38. package/readme.md +19 -5
  39. package/src/collision/collision.js +75 -0
  40. package/src/game/index.js +2 -1
  41. package/src/game/pipeline.js +3 -3
  42. package/src/game/systems/FluidSystem.js +835 -0
  43. package/src/game/systems/index.js +11 -0
  44. package/src/game/ui/button.js +39 -18
  45. package/src/game/ui/cursor.js +14 -0
  46. package/src/game/ui/fps.js +12 -4
  47. package/src/game/ui/index.js +2 -0
  48. package/src/game/ui/stepper.js +549 -0
  49. package/src/game/ui/theme.js +121 -0
  50. package/src/game/ui/togglebutton.js +9 -3
  51. package/src/game/ui/tooltip.js +11 -4
  52. package/src/math/fluid.js +507 -0
  53. package/src/math/index.js +2 -0
  54. package/src/mixins/anchor.js +17 -7
  55. package/src/motion/tweenetik.js +16 -0
  56. package/src/shapes/index.js +1 -0
  57. package/src/util/camera3d.js +218 -12
  58. package/types/fluent.d.ts +361 -0
  59. package/types/game.d.ts +303 -0
  60. package/types/index.d.ts +144 -5
  61. package/types/math.d.ts +361 -0
  62. package/types/motion.d.ts +271 -0
  63. package/types/particle.d.ts +373 -0
  64. package/types/shapes.d.ts +107 -9
  65. package/types/util.d.ts +353 -0
  66. package/types/webgl.d.ts +109 -0
  67. package/disk_example.png +0 -0
  68. package/tde.png +0 -0
@@ -13,8 +13,8 @@ import { applyGravitationalLensing } from "../../../src/math/gr.js";
13
13
  // Stream-specific config
14
14
  const STREAM_CONFIG = {
15
15
  gravity: 120000, // Strong gravity (linear falloff G/r)
16
- maxParticles: 5000,
17
- particleLifetime: 12, // Seconds - long lifetime so particles can orbit the BH
16
+ maxParticles: 6000,
17
+ particleLifetime: 20, // Seconds - long lifetime so particles can orbit the BH
18
18
 
19
19
  // Velocity inheritance - how much of star's velocity particles get
20
20
  // Lower = particles emit more "from" the star, not ahead of it
@@ -259,6 +259,12 @@ export class TidalStream extends GameObject {
259
259
  // Build render list with projection
260
260
  const renderList = [];
261
261
 
262
+ // Project black hole position once for all particles
263
+ // This is crucial when camera has moved (e.g., following the star)
264
+ const bhProjected = this.camera.project(0, 0, 0);
265
+ const bhScreenX = bhProjected.x;
266
+ const bhScreenY = bhProjected.y;
267
+
262
268
  // Young particles stay invisible (appear to emerge from star)
263
269
  const fadeInTime = 0.05; // seconds before particles become visible
264
270
  const fadeInDuration = 0.1; // seconds to fade from invisible to full opacity
@@ -299,24 +305,34 @@ export class TidalStream extends GameObject {
299
305
  let screenY = projected.y;
300
306
 
301
307
  if (STREAM_CONFIG.lensing.enabled && this.bhRadius > 0) {
308
+ // Calculate particle position RELATIVE to black hole's screen position
309
+ const relX = screenX - bhScreenX;
310
+ const relY = screenY - bhScreenY;
311
+
302
312
  const effectRadius = this.bhRadius * STREAM_CONFIG.lensing.effectRadiusMult;
303
313
  const strength = this.bhRadius * STREAM_CONFIG.lensing.strengthMult;
304
314
  const minDist = this.bhRadius * STREAM_CONFIG.lensing.minDistanceMult;
305
315
 
316
+ // Apply lensing in BH-relative space (lensing curves toward origin)
306
317
  const lensed = applyGravitationalLensing(
307
- screenX, screenY,
318
+ relX, relY,
308
319
  effectRadius,
309
320
  strength,
310
321
  STREAM_CONFIG.lensing.falloff,
311
322
  minDist
312
323
  );
313
- screenX = lensed.x;
314
- screenY = lensed.y;
324
+
325
+ // Transform back to screen space
326
+ screenX = lensed.x + bhScreenX;
327
+ screenY = lensed.y + bhScreenY;
315
328
  }
316
329
 
317
330
  // Check if particle is visually inside the black hole
318
- const screenDist = Math.sqrt(screenX * screenX + screenY * screenY);
319
- const insideBH = screenDist < this.bhRadius;
331
+ // Use pre-calculated BH screen position
332
+ const dxBH = screenX - bhScreenX;
333
+ const dyBH = screenY - bhScreenY;
334
+ const screenDistFromBH = Math.sqrt(dxBH * dxBH + dyBH * dyBH);
335
+ const insideBH = screenDistFromBH < this.bhRadius;
320
336
 
321
337
  // Screen position = center + lensed offset
322
338
  renderList.push({
package/docs/README.md CHANGED
@@ -1,222 +1,230 @@
1
- # GCanvas Documentation
2
-
3
- > A minimalist 2D canvas rendering library built for learning, expression, and creative coding.
4
-
5
- GCanvas is a modular 2D rendering and game framework built on top of the HTML5 Canvas API. Inspired by the simplicity of p5.js and the composability of game engines.
6
-
7
- ## Quick Navigation
8
-
9
- | Section | Description |
10
- |---------|-------------|
11
- | [Getting Started](./getting-started/installation.md) | Installation and first steps |
12
- | [Concepts](./concepts/architecture-overview.md) | Core architecture and design |
13
- | [Shapes Module](./modules/shapes/README.md) | Drawing primitives and hierarchy |
14
- | [Game Module](./modules/game/README.md) | Game loop and GameObjects |
15
- | [Particle Module](./modules/particle/README.md) | High-performance particle systems |
16
- | [Util Module](./modules/util/README.md) | Camera3D, Scene3D, layouts |
17
- | [Collision Module](./modules/collision/README.md) | Collision detection and management |
18
- | [State Module](./modules/state/README.md) | State machines for entities and games |
19
- | [Painter Module](./modules/painter/README.md) | Low-level canvas API |
20
-
21
- ## Architecture Overview
22
-
23
- ```
24
- ┌─────────────────────────────────────────────────────────────┐
25
- │ GCanvas │
26
- ├─────────────────────────────────────────────────────────────┤
27
- │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
28
- │ │ Shapes │ │ Game │ │ Painter │ │
29
- │ │ (Drawing) │ │ (Lifecycle) │ │ (Canvas API) │ │
30
- │ └─────────────┘ └─────────────┘ └─────────────────────┘ │
31
- ├─────────────────────────────────────────────────────────────┤
32
- │ ┌───────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
33
- │ │ Collision │ │ State │ │ Motion │ │ IO │ ... │
34
- │ │ (Physics) │ │ (FSM) │ │ (Anim) │ │ (Input) │ │
35
- │ └───────────┘ └─────────┘ └─────────┘ └─────────┘ │
36
- └─────────────────────────────────────────────────────────────┘
37
- ```
38
-
39
- GCanvas is organized into **12 core modules**:
40
-
41
- | Module | Purpose |
42
- |--------|---------|
43
- | **[shapes](./modules/shapes/README.md)** | 40+ drawable primitives and shape classes |
44
- | **[game](./modules/game/README.md)** | Core game loop, Pipeline, GameObjects, Scenes |
45
- | **[particle](./modules/particle/README.md)** | High-performance particle systems with pooling |
46
- | **[collision](./modules/collision/README.md)** | Collision detection algorithms and group management |
47
- | **[state](./modules/state/README.md)** | State machines with lifecycle callbacks |
48
- | **[painter](./modules/painter/README.md)** | Low-level canvas drawing API |
49
- | **[util](./modules/util/README.md)** | Camera3D, Scene3D, Layout, Position utilities |
50
- | **motion** | Animation with Tweenetik and Motion patterns |
51
- | **io** | Input handling (Mouse, Keyboard, Touch, Events) |
52
- | **math** | Random, Noise, Fractals, Patterns |
53
- | **mixins** | Draggable, Anchor behaviors |
54
- | **logger** | Debug logging system |
55
-
56
- ## Two-Layer Architecture
57
-
58
- GCanvas provides two complementary ways to work:
59
-
60
- ### Shape Layer (Declarative Drawing)
61
-
62
- For static visuals and simple graphics. Use shapes directly without a game loop:
63
-
64
- ```js
65
- import { Circle, Rectangle, Painter } from 'gcanvas';
66
-
67
- Painter.init(ctx);
68
-
69
- const circle = new Circle(100, { x: 200, y: 150, color: 'red' });
70
- circle.draw();
71
- ```
72
-
73
- ### Game Layer (Interactive Entities)
74
-
75
- For games, simulations, and interactive applications:
76
-
77
- ```js
78
- import { Game, Scene, GameObject, Circle } from 'gcanvas';
79
-
80
- class Player extends GameObject {
81
- constructor(game) {
82
- super(game);
83
- this.shape = new Circle(40, { color: 'blue' });
84
- this.enableInteractivity(this.shape);
85
- }
86
-
87
- update(dt) {
88
- // Game logic here
89
- }
90
-
91
- render() {
92
- this.shape.draw();
93
- }
94
- }
95
- ```
96
-
97
- [Learn more about the Two-Layer Architecture](./concepts/two-layer-architecture.md)
98
-
99
- ## The Rendering Pipeline
100
-
101
- Every visual element inherits from a chain of base classes:
102
-
103
- ```
104
- Euclidian ─── Position (x, y) and size (width, height)
105
-
106
- Geometry2d ─── Bounding boxes and constraints
107
-
108
- Traceable ─── Debug visualization
109
-
110
- Renderable ─── Visibility, opacity, shadows
111
-
112
- Transformable ─── Rotation and scaling
113
-
114
- Shape ─── Fill color, stroke, line styling
115
-
116
- [Circle, Rectangle, Star, Cube, ...] ─── Concrete implementations
117
- ```
118
-
119
- [Learn more about the Rendering Pipeline](./concepts/rendering-pipeline.md)
120
-
121
- ## Quick Start
122
-
123
- ### Installation
124
-
125
- ```bash
126
- git clone https://github.com/guinetik/gcanvas.git
127
- cd gcanvas
128
- npm install
129
- npm run dev
130
- ```
131
-
132
- ### Hello World
133
-
134
- ```html
135
- <canvas id="game"></canvas>
136
- <script type="module">
137
- import { Game, Scene, Rectangle, TextShape, Group } from 'gcanvas';
138
-
139
- class HelloWorld extends Game {
140
- init() {
141
- this.enableFluidSize();
142
- this.backgroundColor = 'black';
143
-
144
- const box = new Rectangle(200, 80, {
145
- color: '#111',
146
- stroke: '#0f0',
147
- lineWidth: 2
148
- });
149
-
150
- const label = new TextShape('Hello World!', {
151
- font: '18px monospace',
152
- color: '#0f0',
153
- align: 'center',
154
- baseline: 'middle'
155
- });
156
-
157
- const group = new Group({ x: this.width / 2, y: this.height / 2 });
158
- group.add(box);
159
- group.add(label);
160
-
161
- const scene = new Scene(this);
162
- scene.add(group);
163
- this.pipeline.add(scene);
164
- }
165
- }
166
-
167
- const game = new HelloWorld(document.getElementById('game'));
168
- game.start();
169
- </script>
170
- ```
171
-
172
- [Full getting started guide](./getting-started/hello-world.md)
173
-
174
- ## Features
175
-
176
- - **40+ Shape Primitives** - Circle, Rectangle, Star, Polygon, Heart, and more
177
- - **2.5D Shapes** - Cube, Cylinder, Sphere, Cone, Prism with pseudo-3D rendering
178
- - **Groups** - Composite shapes with collective transforms
179
- - **Transforms** - Rotation, scale, opacity, constraints
180
- - **Painter API** - Direct canvas control when needed
181
- - **GameObjects** - Interactive entities with lifecycle methods
182
- - **Scenes & Scene3D** - Hierarchical organization with optional 3D projection
183
- - **Camera3D** - Pseudo-3D projection with mouse-controlled rotation
184
- - **Particle Systems** - High-performance particles with object pooling and composable updaters
185
- - **Collision Detection** - AABB, circles, lines, sweep tests, and group management
186
- - **State Machines** - FSM with enter/update/exit lifecycle, timed transitions
187
- - **UI Components** - Button, ToggleButton, Cursor, Layout managers
188
- - **Motion System** - Stateless animation patterns (orbit, bounce, spiral...)
189
- - **Tweenetik** - Property-based tweening with easing
190
- - **Event System** - Mouse, touch, keyboard with unified input
191
- - **Zero Dependencies** - Pure JavaScript, works everywhere
192
-
193
- ## Demo
194
-
195
- See GCanvas in action: [gcanvas.guinetik.com](https://gcanvas.guinetik.com)
196
-
197
- Or run locally:
198
-
199
- ```bash
200
- npm run dev
201
- ```
202
-
203
- ## API Documentation
204
-
205
- - [Shapes Module](./modules/shapes/README.md) - All drawable primitives
206
- - [Game Module](./modules/game/README.md) - Game loop and objects
207
- - [Particle Module](./modules/particle/README.md) - Particle systems
208
- - [Util Module](./modules/util/README.md) - Camera3D, Scene3D, layouts
209
- - [Collision Module](./modules/collision/README.md) - Collision detection
210
- - [State Module](./modules/state/README.md) - State machines
211
- - [Painter Module](./modules/painter/README.md) - Canvas abstraction
212
-
213
- ## Learn More
214
-
215
- - [Architecture Overview](./concepts/architecture-overview.md)
216
- - [Rendering Pipeline](./concepts/rendering-pipeline.md)
217
- - [Game Lifecycle](./concepts/lifecycle.md)
218
- - [Installation Guide](./getting-started/installation.md)
219
-
220
- ---
221
-
222
- **Source:** [github.com/guinetik/gcanvas](https://github.com/guinetik/gcanvas)
1
+ # GCanvas Documentation
2
+
3
+ > A minimalist 2D canvas rendering library built for learning, expression, and creative coding.
4
+
5
+ GCanvas is a modular 2D rendering and game framework built on top of the HTML5 Canvas API. Inspired by the simplicity of p5.js and the composability of game engines.
6
+
7
+ ## Quick Navigation
8
+
9
+ | Section | Description |
10
+ |---------|-------------|
11
+ | [Getting Started](./getting-started/installation.md) | Installation and first steps |
12
+ | [Concepts](./concepts/architecture-overview.md) | Core architecture and design |
13
+ | [Shapes Module](./modules/shapes/README.md) | Drawing primitives and hierarchy |
14
+ | [Game Module](./modules/game/README.md) | Game loop and GameObjects |
15
+ | [Particle Module](./modules/particle/README.md) | High-performance particle systems |
16
+ | [Util Module](./modules/util/README.md) | Camera3D, Scene3D, layouts |
17
+ | [Collision Module](./modules/collision/README.md) | Collision detection and management |
18
+ | [State Module](./modules/state/README.md) | State machines for entities and games |
19
+ | [Painter Module](./modules/painter/README.md) | Low-level canvas API |
20
+
21
+ ## Architecture Overview
22
+
23
+ ```
24
+ ┌─────────────────────────────────────────────────────────────┐
25
+ │ GCanvas │
26
+ ├─────────────────────────────────────────────────────────────┤
27
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
28
+ │ │ Shapes │ │ Game │ │ Painter │ │
29
+ │ │ (Drawing) │ │ (Lifecycle) │ │ (Canvas API) │ │
30
+ │ └─────────────┘ └─────────────┘ └─────────────────────┘ │
31
+ ├─────────────────────────────────────────────────────────────┤
32
+ │ ┌───────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
33
+ │ │ Collision │ │ State │ │ Motion │ │ IO │ ... │
34
+ │ │ (Physics) │ │ (FSM) │ │ (Anim) │ │ (Input) │ │
35
+ │ └───────────┘ └─────────┘ └─────────┘ └─────────┘ │
36
+ └─────────────────────────────────────────────────────────────┘
37
+ ```
38
+
39
+ GCanvas is organized into **12 core modules**:
40
+
41
+ | Module | Purpose |
42
+ |--------|---------|
43
+ | **[shapes](./modules/shapes/README.md)** | 40+ drawable primitives and shape classes |
44
+ | **[game](./modules/game/README.md)** | Core game loop, Pipeline, GameObjects, Scenes |
45
+ | **[particle](./modules/particle/README.md)** | High-performance particle systems with pooling |
46
+ | **[collision](./modules/collision/README.md)** | Collision detection algorithms and group management |
47
+ | **[state](./modules/state/README.md)** | State machines with lifecycle callbacks |
48
+ | **[painter](./modules/painter/README.md)** | Low-level canvas drawing API |
49
+ | **[util](./modules/util/README.md)** | Camera3D, Scene3D, Layout, Position utilities |
50
+ | **motion** | Animation with Tweenetik and Motion patterns |
51
+ | **io** | Input handling (Mouse, Keyboard, Touch, Events) |
52
+ | **math** | Random, Noise, Fractals, Patterns |
53
+ | **mixins** | Draggable, Anchor behaviors |
54
+ | **logger** | Debug logging system |
55
+
56
+ ## Two-Layer Architecture
57
+
58
+ GCanvas provides two complementary ways to work:
59
+
60
+ ### Shape Layer (Declarative Drawing)
61
+
62
+ For static visuals and simple graphics. Use shapes directly without a game loop:
63
+
64
+ ```js
65
+ import { Circle, Rectangle, Painter } from '@guinetik/gcanvas';
66
+
67
+ Painter.init(ctx);
68
+
69
+ const circle = new Circle(100, { x: 200, y: 150, color: 'red' });
70
+ circle.draw();
71
+ ```
72
+
73
+ ### Game Layer (Interactive Entities)
74
+
75
+ For games, simulations, and interactive applications:
76
+
77
+ ```js
78
+ import { Game, Scene, GameObject, Circle } from '@guinetik/gcanvas';
79
+
80
+ class Player extends GameObject {
81
+ constructor(game) {
82
+ super(game);
83
+ this.shape = new Circle(40, { color: 'blue' });
84
+ this.enableInteractivity(this.shape);
85
+ }
86
+
87
+ update(dt) {
88
+ // Game logic here
89
+ }
90
+
91
+ render() {
92
+ this.shape.draw();
93
+ }
94
+ }
95
+ ```
96
+
97
+ [Learn more about the Two-Layer Architecture](./concepts/two-layer-architecture.md)
98
+
99
+ ## The Rendering Pipeline
100
+
101
+ Every visual element inherits from a chain of base classes:
102
+
103
+ ```
104
+ Euclidian ─── Position (x, y) and size (width, height)
105
+
106
+ Geometry2d ─── Bounding boxes and constraints
107
+
108
+ Traceable ─── Debug visualization
109
+
110
+ Renderable ─── Visibility, opacity, shadows
111
+
112
+ Transformable ─── Rotation and scaling
113
+
114
+ Shape ─── Fill color, stroke, line styling
115
+
116
+ [Circle, Rectangle, Star, Cube, ...] ─── Concrete implementations
117
+ ```
118
+
119
+ [Learn more about the Rendering Pipeline](./concepts/rendering-pipeline.md)
120
+
121
+ ## Quick Start
122
+
123
+ ### Installation
124
+
125
+ **NPM (Recommended):**
126
+
127
+ ```bash
128
+ npm install @guinetik/gcanvas
129
+ ```
130
+
131
+ **Or clone the repository:**
132
+
133
+ ```bash
134
+ git clone https://github.com/guinetik/gcanvas.git
135
+ cd gcanvas
136
+ npm install
137
+ npm run dev
138
+ ```
139
+
140
+ ### Hello World
141
+
142
+ ```html
143
+ <canvas id="game"></canvas>
144
+ <script type="module">
145
+ import { Game, Scene, Rectangle, TextShape, Group } from '@guinetik/gcanvas';
146
+
147
+ class HelloWorld extends Game {
148
+ init() {
149
+ this.enableFluidSize();
150
+ this.backgroundColor = 'black';
151
+
152
+ const box = new Rectangle(200, 80, {
153
+ color: '#111',
154
+ stroke: '#0f0',
155
+ lineWidth: 2
156
+ });
157
+
158
+ const label = new TextShape('Hello World!', {
159
+ font: '18px monospace',
160
+ color: '#0f0',
161
+ align: 'center',
162
+ baseline: 'middle'
163
+ });
164
+
165
+ const group = new Group({ x: this.width / 2, y: this.height / 2 });
166
+ group.add(box);
167
+ group.add(label);
168
+
169
+ const scene = new Scene(this);
170
+ scene.add(group);
171
+ this.pipeline.add(scene);
172
+ }
173
+ }
174
+
175
+ const game = new HelloWorld(document.getElementById('game'));
176
+ game.start();
177
+ </script>
178
+ ```
179
+
180
+ [Full getting started guide](./getting-started/hello-world.md)
181
+
182
+ ## Features
183
+
184
+ - **40+ Shape Primitives** - Circle, Rectangle, Star, Polygon, Heart, and more
185
+ - **2.5D Shapes** - Cube, Cylinder, Sphere, Cone, Prism with pseudo-3D rendering
186
+ - **Groups** - Composite shapes with collective transforms
187
+ - **Transforms** - Rotation, scale, opacity, constraints
188
+ - **Painter API** - Direct canvas control when needed
189
+ - **GameObjects** - Interactive entities with lifecycle methods
190
+ - **Scenes & Scene3D** - Hierarchical organization with optional 3D projection
191
+ - **Camera3D** - Pseudo-3D projection with mouse-controlled rotation
192
+ - **Particle Systems** - High-performance particles with object pooling and composable updaters
193
+ - **Collision Detection** - AABB, circles, lines, sweep tests, and group management
194
+ - **State Machines** - FSM with enter/update/exit lifecycle, timed transitions
195
+ - **UI Components** - Button, ToggleButton, Cursor, Layout managers
196
+ - **Motion System** - Stateless animation patterns (orbit, bounce, spiral...)
197
+ - **Tweenetik** - Property-based tweening with easing
198
+ - **Event System** - Mouse, touch, keyboard with unified input
199
+ - **Zero Dependencies** - Pure JavaScript, works everywhere
200
+
201
+ ## Demo
202
+
203
+ See GCanvas in action: [gcanvas.guinetik.com](https://gcanvas.guinetik.com)
204
+
205
+ Or run locally:
206
+
207
+ ```bash
208
+ npm run dev
209
+ ```
210
+
211
+ ## API Documentation
212
+
213
+ - [Shapes Module](./modules/shapes/README.md) - All drawable primitives
214
+ - [Game Module](./modules/game/README.md) - Game loop and objects
215
+ - [Particle Module](./modules/particle/README.md) - Particle systems
216
+ - [Util Module](./modules/util/README.md) - Camera3D, Scene3D, layouts
217
+ - [Collision Module](./modules/collision/README.md) - Collision detection
218
+ - [State Module](./modules/state/README.md) - State machines
219
+ - [Painter Module](./modules/painter/README.md) - Canvas abstraction
220
+
221
+ ## Learn More
222
+
223
+ - [Architecture Overview](./concepts/architecture-overview.md)
224
+ - [Rendering Pipeline](./concepts/rendering-pipeline.md)
225
+ - [Game Lifecycle](./concepts/lifecycle.md)
226
+ - [Installation Guide](./getting-started/installation.md)
227
+
228
+ ---
229
+
230
+ **Source:** [github.com/guinetik/gcanvas](https://github.com/guinetik/gcanvas)