@holoscript/engine 1.0.0
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/LICENSE +21 -0
- package/README.md +51 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/package.json +49 -0
- package/src/index.ts +13 -0
- package/tsconfig.json +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 HoloScript Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @holoscript/engine
|
|
2
|
+
|
|
3
|
+
> Spatial engine powering HoloScript's 3D runtime — rendering, physics, particles, post-processing.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The engine package provides the spatial computation layer for HoloScript. It bridges parsed HoloScript compositions to live 3D rendering via React Three Fiber, WebGPU, and native platform renderers.
|
|
8
|
+
|
|
9
|
+
## Key Components
|
|
10
|
+
|
|
11
|
+
| Component | Purpose |
|
|
12
|
+
|-----------|---------|
|
|
13
|
+
| **RuntimeRenderer** | Base renderer with particle systems, PBR materials |
|
|
14
|
+
| **SceneRunner** | AST walker that spawns entities and runs compositions |
|
|
15
|
+
| **RuntimeBridge** | Connects SceneRunner to platform-specific renderers |
|
|
16
|
+
| **HeadlessRuntime** | No-GUI execution for testing, servers, CI |
|
|
17
|
+
| **ECS** | Entity-Component-System architecture |
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- **PBR Materials** — `pbr_material`, `glass_material`, `toon_material`, `subsurface_material`
|
|
22
|
+
- **Particle Systems** — Sub-emitters, color/size over lifetime, emission shapes
|
|
23
|
+
- **Post-Processing** — Bloom, DOF, SSAO, color grading, motion blur, tone mapping
|
|
24
|
+
- **Weather Systems** — Rain, snow, fog, time-of-day, wind
|
|
25
|
+
- **Physics** — Rigidbodies, colliders, joints, force fields, articulation
|
|
26
|
+
- **Navigation** — Navmesh, behavior trees, crowd management
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { SceneRunner, HeadlessRuntime } from '@holoscript/engine';
|
|
32
|
+
|
|
33
|
+
// Run a composition headlessly
|
|
34
|
+
const runtime = new HeadlessRuntime();
|
|
35
|
+
const runner = new SceneRunner(composition);
|
|
36
|
+
await runner.run();
|
|
37
|
+
|
|
38
|
+
// Access spawned entities
|
|
39
|
+
console.log(runner.spawnedEntities);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Related
|
|
43
|
+
|
|
44
|
+
- [`@holoscript/core`](../core/) — Parsers and compilers
|
|
45
|
+
- [`@holoscript/runtime`](../runtime/) — Runtime profiles
|
|
46
|
+
- [`@holoscript/r3f-renderer`](../r3f-renderer/) — React Three Fiber renderer
|
|
47
|
+
- [`@holoscript/spatial-engine`](../spatial-engine/) — Native spatial computation
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@holoscript/core';
|
package/dist/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@holoscript/engine",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "HoloScript spatial engine — runtime, ECS, networking, rendering, physics",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/brianonbased-dev/HoloScript.git",
|
|
18
|
+
"directory": "packages/engine"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"three": "^0.182.0",
|
|
22
|
+
"ws": "^8.16.0",
|
|
23
|
+
"@holoscript/core": "5.1.1"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/three": "^0.170.0",
|
|
27
|
+
"@types/ws": "^8.5.10",
|
|
28
|
+
"tsup": "^8.0.1",
|
|
29
|
+
"typescript": "~5.9.3",
|
|
30
|
+
"vitest": "^4.1.0"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/brianonbased-dev/HoloScript#readme",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/brianonbased-dev/HoloScript/issues"
|
|
35
|
+
},
|
|
36
|
+
"author": "Brian X Base Team",
|
|
37
|
+
"keywords": [
|
|
38
|
+
"holoscript",
|
|
39
|
+
"xr",
|
|
40
|
+
"webxr",
|
|
41
|
+
"vr",
|
|
42
|
+
"ar",
|
|
43
|
+
"spatial-computing"
|
|
44
|
+
],
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup src/index.ts --format esm --dts",
|
|
47
|
+
"test": "vitest run"
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @holoscript/engine — Spatial Runtime Engine
|
|
3
|
+
*
|
|
4
|
+
* Re-exports runtime, networking, rendering, physics, spatial, ECS from @holoscript/core.
|
|
5
|
+
* ~84K LOC combined.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* import { World, Entity, System } from '@holoscript/engine';
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Re-export from the core package entrypoint.
|
|
12
|
+
// DTS build cannot resolve private subpath imports like '@holoscript/core/runtime'.
|
|
13
|
+
export * from '@holoscript/core';
|