# Bloom Engine dành cho tác nhân lập trình

Bloom là engine trò chơi TypeScript. Perry biên dịch bản chạy native. Bản web dùng WebAssembly.

Giấy phép của engine · [MIT](https://github.com/Bloom-Engine/engine/blob/main/LICENSE)

## Cài đặt trên macOS

Node.js · Rust · Xcode Command Line Tools

```
npm init -y
npm install -D @perryts/perry@0.5.1665
npm install @bloomengine/engine@0.4.19
npm pkg set 'perry.allow.nativeLibrary[0]=@bloomengine/*'
```

[main.ts](https://bloomengine.dev/docs#quick-start)

```
npx perry compile main.ts -o game && ./game
```

## Nền tảng và API đồ họa

**macOS**
 Metal

**Windows**
 DirectX 12

**Linux**
 Vulkan / OpenGL

**iOS**
 Metal

**tvOS**
 Metal

**watchOS**
 SwiftUI Canvas / SceneKit

**visionOS**
 Metal

**Android**
 Vulkan / OpenGL ES

**Web**
 WebGPU / WebGL

## Mô-đun API · 0.4.19

**[`core`](https://bloomengine.dev/docs#core)**
 Tạo cửa sổ, vòng lặp game, xử lý đầu vào, định thời và điều khiển khung hình.

**[`shapes`](https://bloomengine.dev/docs#shapes)**
 Vẽ hình khối 2D — đường, hình chữ nhật, hình tròn, đa giác — cùng phát hiện va chạm.

**[`textures`](https://bloomengine.dev/docs#textures)**
 Tải hình ảnh, quản lý texture, gộp sprite và render-to-texture.

**[`text`](https://bloomengine.dev/docs#text)**
 Tải font TTF và OTF, kết xuất chữ và đo kích thước.

**[`audio`](https://bloomengine.dev/docs#audio)**
 Hiệu ứng âm thanh, phát nhạc dạng stream, âm thanh định vị 3D, WAV / OGG / MP3.

**[`models`](https://bloomengine.dev/docs#models)**
 Tải glTF 2.0, hoạt hình xương trên GPU, vật liệu PBR, các mesh nguyên mẫu.

**[`math`](https://bloomengine.dev/docs#math)**
 Vector, ma trận, quaternion, hàm easing và sinh số ngẫu nhiên.

**[`physics`](https://bloomengine.dev/docs#physics)**
 Vật thể cứng và mềm bằng Jolt, bộ điều khiển nhân vật, phương tiện, raycast, ràng buộc.

**[`scene`](https://bloomengine.dev/docs#scene)**
 Đồ thị scene retained-mode — biến đổi, hiển thị, đổ bóng, gắn vật liệu.

**[`mobile`](https://bloomengine.dev/docs#mobile)**
 Điều khiển ảo, vùng an toàn và trợ giúp nhập liệu cảm ứng.

**[`world`](https://bloomengine.dev/docs#world)**
 Tải và xác thực world có phiên bản, prefab và khởi tạo lúc chạy.

**[`vfx`](https://bloomengine.dev/docs#vfx)**
 Hệ thống hạt GPU, bộ phát và decal.

**[`quality`](https://bloomengine.dev/docs#quality)**
 Chạy kiểm thử chất lượng xác định, chụp ảnh và telemetry.

## Mục lục tài liệu

[Tài liệu](https://bloomengine.dev/docs) · [Mẫu trò chơi](https://bloomengine.dev/vi/templates) · [llms-full.txt](https://bloomengine.dev/llms-full.txt)
