@bornengine/engine 0.4.16 → 0.5.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.
- package/README.md +24 -14
- package/native/android/Cargo.lock +577 -28
- package/native/android/Cargo.toml +2 -0
- package/native/android/src/lib.rs +39 -3
- package/native/ios/Cargo.lock +573 -24
- package/native/ios/Cargo.toml +2 -0
- package/native/ios/src/lib.rs +72 -9
- package/native/ios/src/text_input.rs +48 -0
- package/native/linux/Cargo.lock +623 -35
- package/native/linux/Cargo.toml +3 -0
- package/native/macos/Cargo.lock +630 -35
- package/native/macos/Cargo.toml +3 -0
- package/native/shared/Cargo.lock +430 -27
- package/native/shared/Cargo.toml +5 -0
- package/native/shared/build.rs +41 -1
- package/native/shared/src/engine.rs +54 -2
- package/native/shared/src/ffi.rs +54 -1
- package/native/shared/src/ffi_core/mod.rs +2 -0
- package/native/shared/src/ffi_core/ui.rs +182 -0
- package/native/shared/src/input.rs +317 -12
- package/native/shared/src/lib.rs +1 -0
- package/native/shared/src/renderer/mod.rs +47 -201
- package/native/shared/src/renderer/texture_store.rs +5 -0
- package/native/shared/src/renderer/ui_pass.rs +742 -0
- package/native/shared/src/textures.rs +2 -0
- package/native/shared/src/ui/commands.rs +213 -0
- package/native/shared/src/ui/egui.rs +1282 -0
- package/native/shared/src/ui/imgui.rs +1056 -0
- package/native/shared/src/ui/input.rs +173 -0
- package/native/shared/src/ui/mod.rs +252 -0
- package/native/shared/src/ui/responses.rs +61 -0
- package/native/tvos/Cargo.lock +576 -27
- package/native/tvos/Cargo.toml +2 -0
- package/native/visionos/Cargo.lock +571 -22
- package/native/visionos/Cargo.toml +2 -0
- package/native/watchos/src/ffi_stubs.rs +27 -0
- package/native/web/Cargo.lock +346 -11
- package/native/web/Cargo.toml +6 -0
- package/native/web/bloom_glue.js +84 -11
- package/native/web/build.sh +150 -34
- package/native/web/src/lib.rs +2 -0
- package/native/web/src/ui_ffi.rs +148 -0
- package/native/windows/Cargo.lock +638 -38
- package/native/windows/Cargo.toml +3 -0
- package/native/windows/src/lib.rs +50 -1
- package/native/windows/src/windows_text.rs +69 -0
- package/package.json +91 -2
- package/src/debug-ui/index.ts +4 -0
- package/src/debug-ui/types.ts +1 -0
- package/src/game/adapters/audio-source-component.ts +67 -0
- package/src/game/adapters/rigid-body-component.ts +69 -0
- package/src/game/adapters/scene-node-component.ts +49 -0
- package/src/game/game-component.ts +89 -0
- package/src/game/game-object.ts +338 -0
- package/src/game/game-scene.ts +303 -0
- package/src/game/index.ts +7 -0
- package/src/game/transform.ts +315 -0
- package/src/index.ts +27 -0
- package/src/ui/api.ts +240 -0
- package/src/ui/index.ts +5 -0
- package/src/ui/opcodes.ts +66 -0
- package/src/ui/types.ts +82 -0
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# BornEngine
|
|
2
2
|
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="webpage/public/brand/bornengine-mark.png" alt="BornEngine mark" width="96">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
3
7
|
**Native games from TypeScript.**
|
|
4
8
|
|
|
5
9
|
Write TypeScript. Ship native games — and now the web too.
|
|
@@ -71,13 +75,15 @@ drawText("Hello, BornEngine!", 190, 200, 20, Colors.DARKGRAY);
|
|
|
71
75
|
Build for web:
|
|
72
76
|
|
|
73
77
|
```bash
|
|
74
|
-
./native/web/build.sh main.ts
|
|
78
|
+
./native/web/build.sh --dev main.ts
|
|
75
79
|
cd dist/web && python3 -m http.server 8080
|
|
76
80
|
```
|
|
77
81
|
|
|
82
|
+
Use `--release` (the default) for optimized builds.
|
|
83
|
+
|
|
78
84
|
## Features
|
|
79
85
|
|
|
80
|
-
- **
|
|
86
|
+
- **Two gameplay styles** — Use the flat function-and-handle API directly, or build with the optional class-based GameObject runtime. ([design rationale](docs/design-api.md), [game objects](docs/game-objects.md))
|
|
81
87
|
- **True native** — Compiles to Metal, DirectX 12, Vulkan, OpenGL, and WebGPU via wgpu.
|
|
82
88
|
- **Ship everywhere** — macOS, Windows, Linux, iOS, tvOS, Android, and Web from one codebase.
|
|
83
89
|
- **Unified 2D/3D** — Shapes, textures, text, 3D models, and audio in one engine.
|
|
@@ -85,10 +91,11 @@ cd dist/web && python3 -m http.server 8080
|
|
|
85
91
|
|
|
86
92
|
## How BornEngine relates to raylib
|
|
87
93
|
|
|
88
|
-
BornEngine's
|
|
94
|
+
BornEngine's low-level modules are heavily inspired by [raylib](https://github.com/raysan5/raylib).
|
|
89
95
|
raylib's API is, in our opinion, one of the best in the gamedev space — a flat library
|
|
90
|
-
of plain functions,
|
|
91
|
-
|
|
96
|
+
of plain functions, small enough to learn from a cheatsheet — so those modules follow
|
|
97
|
+
that shape. The optional game module adds class-based gameplay objects. You'll recognize
|
|
98
|
+
the low-level API immediately: `initWindow`, `beginDrawing`,
|
|
92
99
|
`clearBackground`, `drawText`, and modules named core / shapes / textures / text /
|
|
93
100
|
audio / models.
|
|
94
101
|
|
|
@@ -105,6 +112,7 @@ setting the bar. ([full design rationale](docs/design-api.md))
|
|
|
105
112
|
| Module | Import | Description |
|
|
106
113
|
|--------|--------|-------------|
|
|
107
114
|
| **Core** | `@bornengine/engine/core` | Window, game loop, input, timing |
|
|
115
|
+
| **Game** | `@bornengine/engine/game` | GameObjects, components, transforms, scenes, and native-handle adapters ([docs](docs/game-objects.md)) |
|
|
108
116
|
| **Shapes** | `@bornengine/engine/shapes` | 2D drawing + collision detection |
|
|
109
117
|
| **Textures** | `@bornengine/engine/textures` | Image loading, sprite batching |
|
|
110
118
|
| **Text** | `@bornengine/engine/text` | TTF/OTF font loading and rendering |
|
|
@@ -135,6 +143,7 @@ setting the bar. ([full design rationale](docs/design-api.md))
|
|
|
135
143
|
```
|
|
136
144
|
src/ TypeScript API
|
|
137
145
|
core/ Window, input, game loop
|
|
146
|
+
game/ GameObjects, components, transforms, adapters
|
|
138
147
|
shapes/ 2D shapes + collision
|
|
139
148
|
textures/ Image loading, sprites
|
|
140
149
|
text/ Font rendering
|
|
@@ -156,9 +165,9 @@ examples/
|
|
|
156
165
|
pong/ Complete working example (~170 lines)
|
|
157
166
|
```
|
|
158
167
|
|
|
159
|
-
##
|
|
168
|
+
## Core data types
|
|
160
169
|
|
|
161
|
-
|
|
170
|
+
The native function modules use plain data interfaces and numeric resource handles:
|
|
162
171
|
|
|
163
172
|
```typescript
|
|
164
173
|
interface Vec2 { x: number; y: number }
|
|
@@ -215,17 +224,18 @@ Key functions:
|
|
|
215
224
|
|
|
216
225
|
For the full pipeline (Blender export, pitfalls, architecture), see [docs/skeletal-animation.md](docs/skeletal-animation.md).
|
|
217
226
|
|
|
218
|
-
##
|
|
227
|
+
## Built with the original Bloom Engine
|
|
219
228
|
|
|
220
|
-
**[Bloom Jump](https://apps.apple.com/us/app/bloom-jump/id6761447092)**
|
|
229
|
+
**[Bloom Jump](https://apps.apple.com/us/app/bloom-jump/id6761447092)** was released under the original Bloom Engine name before this fork continued as BornEngine. It remains a historical Bloom-branded release, not a BornEngine-branded game. It's a free retro pixel platformer with five hand-crafted levels, 60 FPS, and an original chiptune soundtrack, built from one TypeScript codebase.
|
|
221
230
|
|
|
222
231
|
- [App Store](https://apps.apple.com/us/app/bloom-jump/id6761447092) — iOS, macOS, tvOS, and visionOS
|
|
223
232
|
- [App Store (watchOS)](https://apps.apple.com/us/app/bloom-jump-watch/id6779528549) — Apple Watch
|
|
224
233
|
- [Google Play](https://play.google.com/store/apps/details?id=com.bloom.jump) — Android
|
|
225
234
|
|
|
226
|
-
##
|
|
235
|
+
## BornEngine links
|
|
227
236
|
|
|
228
|
-
- [
|
|
229
|
-
- [
|
|
230
|
-
- [
|
|
231
|
-
- [
|
|
237
|
+
- [Source repository](https://github.com/RuanFernandes/BornEngine)
|
|
238
|
+
- [npm package](https://www.npmjs.com/package/@bornengine/engine)
|
|
239
|
+
- [Documentation](docs/)
|
|
240
|
+
- [Website and guides](https://ruanfernandes.github.io/BornEngine/)
|
|
241
|
+
- [BornEngine CLI](https://github.com/RuanFernandes/bornengine-cli)
|