@bloomengine/engine 0.3.1 → 0.3.2

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.
package/README.md CHANGED
@@ -5,11 +5,33 @@
5
5
  Write TypeScript. Ship native games — and now the web too.
6
6
  Bloom compiles your game to Metal, DirectX 12, Vulkan, OpenGL, and WebGPU — one codebase for every platform.
7
7
 
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @bloomengine/engine
12
+ ```
13
+
14
+ Or with your preferred package manager:
15
+
16
+ ```bash
17
+ bun add @bloomengine/engine
18
+ pnpm add @bloomengine/engine
19
+ yarn add @bloomengine/engine
20
+ ```
21
+
22
+ The npm package ships the TypeScript API alongside the engine's Rust sources and the bundled [JoltPhysics](https://github.com/jrouwe/JoltPhysics) C++ shim, so a single `install` is enough — there's no separate native download step.
23
+
24
+ You'll also need:
25
+
26
+ - **Perry** — the TypeScript AOT compiler that turns your game into a native binary or WASM module. It also drives the engine's native build.
27
+ - **Rust toolchain** ([rustup.rs](https://rustup.rs)) — Perry invokes Cargo to compile the engine's platform crate the first time you build for each target.
28
+ - For web builds only: [wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) (`cargo install wasm-pack`).
29
+
8
30
  ## Quick Start
9
31
 
10
32
  ```typescript
11
33
  import { initWindow, windowShouldClose, beginDrawing,
12
- endDrawing, clearBackground, drawText, Colors } from "bloom";
34
+ endDrawing, clearBackground, drawText, Colors } from "@bloomengine/engine";
13
35
 
14
36
  initWindow(800, 450, "My Game");
15
37
 
@@ -26,7 +48,7 @@ while (!windowShouldClose()) {
26
48
  Use `runGame()` for code that works on both native and web:
27
49
 
28
50
  ```typescript
29
- import { initWindow, runGame, clearBackground, drawText, Colors } from "bloom";
51
+ import { initWindow, runGame, clearBackground, drawText, Colors } from "@bloomengine/engine";
30
52
 
31
53
  initWindow(800, 450, "My Game");
32
54
 
@@ -55,14 +77,14 @@ cd dist/web && python3 -m http.server 8080
55
77
 
56
78
  | Module | Import | Description |
57
79
  |--------|--------|-------------|
58
- | **Core** | `bloom/core` | Window, game loop, input, timing |
59
- | **Shapes** | `bloom/shapes` | 2D drawing + collision detection |
60
- | **Textures** | `bloom/textures` | Image loading, sprite batching |
61
- | **Text** | `bloom/text` | TTF/OTF font loading and rendering |
62
- | **Audio** | `bloom/audio` | Sound effects + music streaming |
63
- | **Models** | `bloom/models` | 3D model loading (glTF, OBJ), skeletal animation |
64
- | **Math** | `bloom/math` | Vectors, matrices, quaternions, easing |
65
- | **Physics** | `bloom/physics` | Jolt-backed rigid + soft bodies, character, vehicles ([docs](docs/physics.md)) |
80
+ | **Core** | `@bloomengine/engine/core` | Window, game loop, input, timing |
81
+ | **Shapes** | `@bloomengine/engine/shapes` | 2D drawing + collision detection |
82
+ | **Textures** | `@bloomengine/engine/textures` | Image loading, sprite batching |
83
+ | **Text** | `@bloomengine/engine/text` | TTF/OTF font loading and rendering |
84
+ | **Audio** | `@bloomengine/engine/audio` | Sound effects + music streaming |
85
+ | **Models** | `@bloomengine/engine/models` | 3D model loading (glTF, OBJ), skeletal animation |
86
+ | **Math** | `@bloomengine/engine/math` | Vectors, matrices, quaternions, easing |
87
+ | **Physics** | `@bloomengine/engine/physics` | Jolt-backed rigid + soft bodies, character, vehicles ([docs](docs/physics.md)) |
66
88
 
67
89
  ## Platforms
68
90
 
@@ -143,7 +165,7 @@ Bloom supports GPU-accelerated skeletal animation via glTF/GLB models. The pipel
143
165
 
144
166
  ```typescript
145
167
  import { loadModel, loadModelAnimation, updateModelAnimation, drawModel,
146
- getTime, Colors } from "bloom";
168
+ getTime, Colors } from "@bloomengine/engine";
147
169
 
148
170
  const character = loadModel("assets/models/character.glb");
149
171
  const anim = loadModelAnimation("assets/models/character.glb");