incanto 0.12.0 → 0.13.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/README.md +22 -0
- package/bin/incanto-new.mjs +87 -0
- package/dist/2d.d.ts +2 -2
- package/dist/2d.js +3 -3
- package/dist/3d.d.ts +194 -71
- package/dist/3d.js +74 -4
- package/dist/{behavior-Bod1AyJS.d.ts → behavior-CPibUfnH.d.ts} +4 -2
- package/dist/{create-game-C_xf4gm9.js → create-game-Ct86zczq.js} +5 -5
- package/dist/{create-game-B2fewJUy.js → create-game-J6g4QInv.js} +5 -5
- package/dist/debug.d.ts +1 -1
- package/dist/{duplicate-BEvGBtb_.js → duplicate-BINwP0WG.js} +1 -1
- package/dist/{gameplay-Dn3yidJw.js → gameplay-sSqrUcnz.js} +75 -3
- package/dist/gameplay.d.ts +37 -2
- package/dist/gameplay.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/{loader-B4OEXDZ8.js → loader-BZqOKfI2.js} +3 -1
- package/dist/{loader-BcUDfNHn.d.ts → loader-DILt9PGC.d.ts} +1 -1
- package/dist/net.d.ts +1 -1
- package/dist/net.js +3 -3
- package/dist/{pathfinding-BSiXjd6W.d.ts → pathfinding-RWYkNKx9.d.ts} +1 -1
- package/dist/{physics-2d-B6D864oZ.js → physics-2d-BiIdl51r.js} +2 -2
- package/dist/{physics-3d-RLNaxRyw.js → physics-3d-DhaAaKJo.js} +2 -2
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/{register-Cwc-yCYx.js → register-BFFE1Mh1.js} +2 -2
- package/dist/{register-ysLR3WQS.js → register-BFw4c83z.js} +508 -123
- package/dist/{register-BD6zgrv_.js → register-Djwckzgx.js} +2 -2
- package/dist/{register-DJZXxwAn.js → register-nObreUQR.js} +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +10 -10
- package/editor/assets/{agent8-D_4QY8Aq.js → agent8-BF8Jfbkl.js} +1 -1
- package/editor/assets/{index-s0DZuroe.js → index-DSq0gdhE.js} +74 -74
- package/editor/index.html +1 -1
- package/package.json +4 -2
- package/schemas/scene.schema.json +263 -0
- package/skills/incanto-3d-character.md +35 -0
- package/skills/incanto-building-3d-games.md +48 -0
- package/skills/incanto-gameplay-behaviors.md +23 -1
- package/skills/incanto-node-reference.md +51 -0
- package/templates-app/beacon-isle-3d/PROJECT/Context.md +44 -0
- package/templates-app/beacon-isle-3d/PROJECT/Requirements.md +16 -0
- package/templates-app/beacon-isle-3d/PROJECT/Status.md +38 -0
- package/templates-app/beacon-isle-3d/PROJECT/Structure.md +24 -0
- package/templates-app/beacon-isle-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/beacon-isle-3d/generate-world.ts +814 -0
- package/templates-app/beacon-isle-3d/index.html +68 -0
- package/templates-app/beacon-isle-3d/package.json +26 -0
- package/templates-app/beacon-isle-3d/src/behaviors.ts +570 -0
- package/templates-app/beacon-isle-3d/src/game.scene.json +2992 -0
- package/templates-app/beacon-isle-3d/src/main.ts +33 -0
- package/templates-app/beacon-isle-3d/tsconfig.json +13 -0
- package/templates-app/beacon-isle-3d/verify.ts +285 -0
- package/templates-app/beacon-isle-3d/vite.config.ts +5 -0
- package/templates-app/tps-3d/PROJECT/Context.md +49 -0
- package/templates-app/tps-3d/PROJECT/Requirements.md +38 -0
- package/templates-app/tps-3d/PROJECT/Status.md +41 -0
- package/templates-app/tps-3d/PROJECT/Structure.md +44 -0
- package/templates-app/tps-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/tps-3d/index.html +244 -0
- package/templates-app/tps-3d/package.json +25 -0
- package/templates-app/tps-3d/src/behaviors.ts +405 -0
- package/templates-app/tps-3d/src/game.scene.json +677 -0
- package/templates-app/tps-3d/src/main.ts +64 -0
- package/templates-app/tps-3d/tsconfig.json +13 -0
- package/templates-app/tps-3d/verify.ts +167 -0
- package/templates-app/tps-3d/vite.config.ts +5 -0
- package/templates-app/village-quest-3d/PROJECT/Context.md +39 -0
- package/templates-app/village-quest-3d/PROJECT/Requirements.md +36 -0
- package/templates-app/village-quest-3d/PROJECT/Status.md +26 -0
- package/templates-app/village-quest-3d/PROJECT/Structure.md +30 -0
- package/templates-app/village-quest-3d/docs/project-3d-rules.md +38 -0
- package/templates-app/village-quest-3d/index.html +68 -0
- package/templates-app/village-quest-3d/package.json +25 -0
- package/templates-app/village-quest-3d/src/behaviors.ts +529 -0
- package/templates-app/village-quest-3d/src/grove.scene.json +826 -0
- package/templates-app/village-quest-3d/src/main.ts +35 -0
- package/templates-app/village-quest-3d/src/quest.ts +18 -0
- package/templates-app/village-quest-3d/src/village.scene.json +680 -0
- package/templates-app/village-quest-3d/tsconfig.json +13 -0
- package/templates-app/village-quest-3d/verify.ts +254 -0
- package/templates-app/village-quest-3d/vite.config.ts +5 -0
package/README.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
**Vibe-coding-first web game engine SDK.** Every scene, character, event, and multiplayer
|
|
4
4
|
rule is JSON an AI agent can read, diff, and rewrite — rendered by three.js.
|
|
5
5
|
|
|
6
|
+
## Start with a whole game
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
bunx incanto-new my-game # Beacon Isle — the flagship 3D template
|
|
10
|
+
cd my-game && bun install && bun run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
One command scaffolds a complete island action-adventure: a **generated
|
|
14
|
+
golden-hour world** (terrain, sea, groves, grass — `bun run world` re-rolls the
|
|
15
|
+
whole island deterministically), a quest NPC with dialogue and choices, enemies
|
|
16
|
+
that **hunt you across the terrain** via grid navigation, melee with a sword
|
|
17
|
+
riding the character's hand bone, bloom + color-grade, touch controls on
|
|
18
|
+
phones, win fireworks and a death/respawn loop — in ~2 files of game code, the
|
|
19
|
+
rest declared in JSON. `bun run verify` plays the entire quest **headlessly**
|
|
20
|
+
and replays recorded input bit-identically: the agent loop is author → verify →
|
|
21
|
+
fix, no browser needed.
|
|
22
|
+
|
|
23
|
+
`bunx incanto-new --list` shows the other starters (third-person shooter,
|
|
24
|
+
quest vignette).
|
|
25
|
+
|
|
26
|
+
## Or wire the engine yourself
|
|
27
|
+
|
|
6
28
|
```bash
|
|
7
29
|
bun add incanto three
|
|
8
30
|
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* incanto-new — scaffold a ready-to-run incanto game from a shipped template:
|
|
4
|
+
*
|
|
5
|
+
* bunx incanto-new my-game # Beacon Isle (3D flagship)
|
|
6
|
+
* bunx incanto-new my-game --template tps-3d # third-person shooter
|
|
7
|
+
* bunx incanto-new --list
|
|
8
|
+
*
|
|
9
|
+
* Copies the template, names the package after the directory, prints the
|
|
10
|
+
* three commands that get you playing. Templates are real npm consumers —
|
|
11
|
+
* no monorepo, no aliases.
|
|
12
|
+
*/
|
|
13
|
+
import { cpSync, existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
14
|
+
import { basename, dirname, join, resolve } from 'node:path';
|
|
15
|
+
import { fileURLToPath } from 'node:url';
|
|
16
|
+
|
|
17
|
+
const PKG = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
18
|
+
const TEMPLATES_DIR = join(PKG, 'templates-app');
|
|
19
|
+
|
|
20
|
+
const DESCRIPTIONS = {
|
|
21
|
+
'beacon-isle-3d':
|
|
22
|
+
'3D island action-adventure (the flagship): generated world, quest NPC, terrain-nav enemies, melee',
|
|
23
|
+
'village-quest-3d': '3D quest vignette: dialogue, scene transitions, patrol AI, sword combat',
|
|
24
|
+
'tps-3d': 'third-person arena shooter: GLB soldier, hitscan rifle, enemy waves',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function listTemplates() {
|
|
28
|
+
if (!existsSync(TEMPLATES_DIR)) return [];
|
|
29
|
+
return readdirSync(TEMPLATES_DIR, { withFileTypes: true })
|
|
30
|
+
.filter((e) => e.isDirectory())
|
|
31
|
+
.map((e) => e.name)
|
|
32
|
+
.sort();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const argv = process.argv.slice(2);
|
|
36
|
+
if (argv.includes('--list') || argv.includes('-l')) {
|
|
37
|
+
for (const t of listTemplates()) {
|
|
38
|
+
console.log(` ${t.padEnd(20)} ${DESCRIPTIONS[t] ?? ''}`);
|
|
39
|
+
}
|
|
40
|
+
process.exit(0);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
let target;
|
|
44
|
+
let template = 'beacon-isle-3d';
|
|
45
|
+
for (let i = 0; i < argv.length; i++) {
|
|
46
|
+
if (argv[i] === '--template' || argv[i] === '-t') template = argv[++i];
|
|
47
|
+
else if (!argv[i].startsWith('-') && !target) target = argv[i];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (!target) {
|
|
51
|
+
console.error('usage: incanto-new <dir> [--template <name>] | --list');
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const templates = listTemplates();
|
|
56
|
+
if (!templates.includes(template)) {
|
|
57
|
+
console.error(`unknown template '${template}'. Available: ${templates.join(', ')}`);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const dest = resolve(process.cwd(), target);
|
|
62
|
+
if (existsSync(dest)) {
|
|
63
|
+
console.error(`refusing to scaffold: '${dest}' already exists.`);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
cpSync(join(TEMPLATES_DIR, template), dest, { recursive: true });
|
|
68
|
+
|
|
69
|
+
const pkgPath = join(dest, 'package.json');
|
|
70
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
71
|
+
pkg.name = basename(dest)
|
|
72
|
+
.toLowerCase()
|
|
73
|
+
.replace(/[^a-z0-9-]/g, '-');
|
|
74
|
+
writeFileSync(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
75
|
+
|
|
76
|
+
console.log(`
|
|
77
|
+
${template} → ${target}
|
|
78
|
+
|
|
79
|
+
cd ${target}
|
|
80
|
+
bun install # or: npm install
|
|
81
|
+
bun run dev # play it
|
|
82
|
+
bun run verify # prove it plays, headlessly
|
|
83
|
+
bun run check # validate the scene JSON
|
|
84
|
+
|
|
85
|
+
Vibe-coding? Install the agent skills too:
|
|
86
|
+
bunx incanto-skills claude # or: opencode
|
|
87
|
+
`);
|
package/dist/2d.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as JsonObject } from "./schema-CcoWb32N.js";
|
|
2
|
-
import { $ as Node, C as RendererStats, S as GameStats, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-
|
|
3
|
-
import { t as LoadSceneOptions } from "./loader-
|
|
2
|
+
import { $ as Node, C as RendererStats, S as GameStats, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-CPibUfnH.js";
|
|
3
|
+
import { t as LoadSceneOptions } from "./loader-DILt9PGC.js";
|
|
4
4
|
import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
|
|
5
5
|
import { Group, Mesh, Object3D, Scene, Texture } from "three";
|
|
6
6
|
import * as RapierNs from "@dimforge/rapier2d-compat";
|
package/dist/2d.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
2
|
-
import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-
|
|
3
|
-
import { _ as RigidBody2D, a as parseCells, c as ColorRect2D, d as AnimatedSprite2D, f as Sprite2D, g as PhysicsBody2D, h as CharacterBody2D, i as mergeSolidRects, l as CharacterController2D, m as Area2D, n as UILayer, o as Particles2D, p as Joint2D, r as TileMap2D, s as Label, t as registerNodes2D, u as Camera2D, v as StaticBody2D, y as Node2D } from "./register-
|
|
4
|
-
import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-
|
|
2
|
+
import { a as AssetStore2D, i as syncTree2D, r as Renderer2D, t as createGame2D } from "./create-game-Ct86zczq.js";
|
|
3
|
+
import { _ as RigidBody2D, a as parseCells, c as ColorRect2D, d as AnimatedSprite2D, f as Sprite2D, g as PhysicsBody2D, h as CharacterBody2D, i as mergeSolidRects, l as CharacterController2D, m as Area2D, n as UILayer, o as Particles2D, p as Joint2D, r as TileMap2D, s as Label, t as registerNodes2D, u as Camera2D, v as StaticBody2D, y as Node2D } from "./register-Djwckzgx.js";
|
|
4
|
+
import { n as enablePhysics2D, t as Physics2D } from "./physics-2d-BiIdl51r.js";
|
|
5
5
|
//#region src/2d/library-sprite.ts
|
|
6
6
|
/**
|
|
7
7
|
* Turn a library sprite-animation JSON into a scene-ready spritesheet asset
|
package/dist/3d.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as JsonObject } from "./schema-CcoWb32N.js";
|
|
2
|
-
import { $ as Node, C as RendererStats, S as GameStats, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-
|
|
3
|
-
import { t as LoadSceneOptions } from "./loader-
|
|
2
|
+
import { $ as Node, C as RendererStats, S as GameStats, b as Scheduler, l as PropSchema, n as BehaviorCtor, v as Engine, w as Scene$1 } from "./behavior-CPibUfnH.js";
|
|
3
|
+
import { t as LoadSceneOptions } from "./loader-DILt9PGC.js";
|
|
4
4
|
import { t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
|
|
5
|
-
import { n as PathGrid, s as SpatialPose } from "./pathfinding-
|
|
5
|
+
import { n as PathGrid, s as SpatialPose } from "./pathfinding-RWYkNKx9.js";
|
|
6
6
|
import { AnimationClip, BufferGeometry, Color, DirectionalLight, InstancedMesh, MeshPhysicalMaterial, Object3D, PerspectiveCamera, Scene, Vector3, WebGLRenderer } from "three";
|
|
7
7
|
import { VRM } from "@pixiv/three-vrm";
|
|
8
8
|
import { Sky } from "three/examples/jsm/objects/Sky.js";
|
|
@@ -618,6 +618,21 @@ declare class Environment3D {
|
|
|
618
618
|
dispose(): void;
|
|
619
619
|
}
|
|
620
620
|
//#endregion
|
|
621
|
+
//#region src/3d/environment-runtime.d.ts
|
|
622
|
+
/**
|
|
623
|
+
* Live environment editing — the renderer re-applies `scene.environment`
|
|
624
|
+
* every frame (cheap when unchanged), so changing the LOOK at runtime is
|
|
625
|
+
* just writing that object. This helper does it safely:
|
|
626
|
+
*
|
|
627
|
+
* setEnvironment3D(engine, { sky: { elevationDeg: 4 }, exposure: 0.8 });
|
|
628
|
+
* setEnvironment3D(engine, { fog: null }); // null DELETES a key
|
|
629
|
+
*
|
|
630
|
+
* - one-level deep merge (patching `sky.elevationDeg` keeps the other sky keys)
|
|
631
|
+
* - hard-validates the merged result NOW (in your call stack), so a bad patch
|
|
632
|
+
* throws where you wrote it — never inside the render loop
|
|
633
|
+
*/
|
|
634
|
+
declare function setEnvironment3D(engine: Engine, patch: JsonObject): void;
|
|
635
|
+
//#endregion
|
|
621
636
|
//#region src/3d/nodes/billboard-3d.d.ts
|
|
622
637
|
/** Valid `Billboard3D.mode` values — drives the prop options AND validateJson. */
|
|
623
638
|
declare const BILLBOARD_GROUP_MODES: readonly ["screen", "y", "none"];
|
|
@@ -692,6 +707,37 @@ declare class BoneAttachment3D extends Node3D {
|
|
|
692
707
|
override free(): void;
|
|
693
708
|
}
|
|
694
709
|
//#endregion
|
|
710
|
+
//#region src/3d/nodes/bone-look-at-3d.d.ts
|
|
711
|
+
/**
|
|
712
|
+
* Look-at IK for one bone — the character's head (or chest, or turret) turns
|
|
713
|
+
* toward a target node ON TOP of whatever the animation is doing. Runs after
|
|
714
|
+
* the mixer each rendered frame, blends in/out smoothly, and DISENGAGES when
|
|
715
|
+
* the target leaves the comfort cone (no owl necks).
|
|
716
|
+
*
|
|
717
|
+
* { "name": "HeadTrack", "type": "BoneLookAt3D",
|
|
718
|
+
* "props": { "target": "../Skin", "bone": "Head", "lookAt": "%Player" } }
|
|
719
|
+
*
|
|
720
|
+
* `forwardAxis` names the bone's local facing axis (mixamo heads face +z,
|
|
721
|
+
* the default). Purely visual — headless it's a no-op.
|
|
722
|
+
*/
|
|
723
|
+
declare class BoneLookAt3D extends Node3D {
|
|
724
|
+
static override readonly typeName: string;
|
|
725
|
+
static override readonly props: PropSchema;
|
|
726
|
+
target: string;
|
|
727
|
+
bone: string;
|
|
728
|
+
lookAt: string;
|
|
729
|
+
maxAngleDeg: number;
|
|
730
|
+
weight: number;
|
|
731
|
+
forwardAxis: string;
|
|
732
|
+
private boneObj;
|
|
733
|
+
private lookedUpFor;
|
|
734
|
+
/** 0..1 engage blend — eases in/out so tracking never snaps. */
|
|
735
|
+
private engage;
|
|
736
|
+
/** Test hook. */
|
|
737
|
+
get attachedBone(): Object3D | null;
|
|
738
|
+
_onRender3D(_ctx: RenderContext3D): void;
|
|
739
|
+
}
|
|
740
|
+
//#endregion
|
|
695
741
|
//#region src/3d/nodes/camera-3d.d.ts
|
|
696
742
|
/**
|
|
697
743
|
* A perspective camera. Mark exactly one camera `current: true`; with none
|
|
@@ -1076,73 +1122,6 @@ declare class Foliage3D extends Node3D implements SunConsumer3D {
|
|
|
1076
1122
|
override free(): void;
|
|
1077
1123
|
}
|
|
1078
1124
|
//#endregion
|
|
1079
|
-
//#region src/3d/nodes/joint-3d.d.ts
|
|
1080
|
-
type JointType3D = "fixed" | "spherical" | "rope" | "spring";
|
|
1081
|
-
/**
|
|
1082
|
-
* A physics joint linking its PARENT body to `target` (a node path to the
|
|
1083
|
-
* other body). Godot-style placement: the joint lives as a child of body A.
|
|
1084
|
-
*
|
|
1085
|
-
* { "name": "Hinge", "type": "Joint3D",
|
|
1086
|
-
* "props": { "type": "spherical", "target": "%Anchor", "anchor": [0, -20] } }
|
|
1087
|
-
*
|
|
1088
|
-
* Types: `fixed` welds the bodies rigidly · `spherical` is a ball joint at the
|
|
1089
|
-
* anchors · `rope` caps the anchor distance at `length` (m; 0 = measured at
|
|
1090
|
-
* creation) · `spring` pulls toward `length` with `stiffness`/`damping`.
|
|
1091
|
-
* Anchors are LOCAL meter offsets on each body.
|
|
1092
|
-
*/
|
|
1093
|
-
declare class Joint3D extends Node3D {
|
|
1094
|
-
static override readonly typeName: string;
|
|
1095
|
-
static override readonly props: PropSchema;
|
|
1096
|
-
type: JointType3D;
|
|
1097
|
-
target: string;
|
|
1098
|
-
anchor: number[];
|
|
1099
|
-
targetAnchor: number[];
|
|
1100
|
-
/** rope/spring rest length in m; 0 = measure body distance at creation. */
|
|
1101
|
-
length: number;
|
|
1102
|
-
stiffness: number;
|
|
1103
|
-
damping: number;
|
|
1104
|
-
override onEnterTree(): void;
|
|
1105
|
-
/** @internal The two bodies, resolved (throws on a bad target at step time). */
|
|
1106
|
-
_resolveBodies(): {
|
|
1107
|
-
a: PhysicsBody3D;
|
|
1108
|
-
b: PhysicsBody3D;
|
|
1109
|
-
};
|
|
1110
|
-
}
|
|
1111
|
-
//#endregion
|
|
1112
|
-
//#region src/3d/nodes/lights-3d.d.ts
|
|
1113
|
-
/** Sun-style light. Direction comes from the node's rotation. */
|
|
1114
|
-
declare class DirectionalLight3D extends Node3D {
|
|
1115
|
-
static override readonly typeName: string;
|
|
1116
|
-
static override readonly props: PropSchema;
|
|
1117
|
-
color: string;
|
|
1118
|
-
intensity: number;
|
|
1119
|
-
castShadow: boolean;
|
|
1120
|
-
/** Half-extent of the directional shadow frustum (template default ±75). */
|
|
1121
|
-
shadowArea: number;
|
|
1122
|
-
shadowMapSize: number;
|
|
1123
|
-
/**
|
|
1124
|
-
* Re-center the shadow frustum on the camera every frame. A directional sun's
|
|
1125
|
-
* shadow map covers a fixed ortho box; in a big roaming world that box must be
|
|
1126
|
-
* huge (and so low-resolution that the player's own shadow nearly vanishes).
|
|
1127
|
-
* With this on, a SMALL `shadowArea` tracks the camera, so contact shadows stay
|
|
1128
|
-
* crisp wherever you go. The renderer supplies the camera position.
|
|
1129
|
-
*/
|
|
1130
|
-
shadowFollowsCamera: boolean;
|
|
1131
|
-
protected override _createObject3D(): Object3D;
|
|
1132
|
-
override _syncObject3D(): void;
|
|
1133
|
-
}
|
|
1134
|
-
/** Point light with a range (Godot's OmniLight3D). */
|
|
1135
|
-
declare class OmniLight3D extends Node3D {
|
|
1136
|
-
static override readonly typeName: string;
|
|
1137
|
-
static override readonly props: PropSchema;
|
|
1138
|
-
color: string;
|
|
1139
|
-
intensity: number;
|
|
1140
|
-
/** 0 = unlimited (three `distance` semantics). */
|
|
1141
|
-
range: number;
|
|
1142
|
-
protected override _createObject3D(): Object3D;
|
|
1143
|
-
override _syncObject3D(): void;
|
|
1144
|
-
}
|
|
1145
|
-
//#endregion
|
|
1146
1125
|
//#region src/3d/nodes/mesh-instance-3d.d.ts
|
|
1147
1126
|
type MeshKind = "box" | "sphere" | "capsule" | "plane" | "cylinder" | "gem";
|
|
1148
1127
|
interface MeshMaterialProps {
|
|
@@ -1220,6 +1199,109 @@ declare class MeshInstance3D extends Node3D {
|
|
|
1220
1199
|
override free(): void;
|
|
1221
1200
|
}
|
|
1222
1201
|
//#endregion
|
|
1202
|
+
//#region src/3d/nodes/instanced-mesh-3d.d.ts
|
|
1203
|
+
/**
|
|
1204
|
+
* Hundreds of copies of one mesh in ONE draw call — scattered rocks, fence
|
|
1205
|
+
* posts, pillars, crates, gravestones. Same `mesh`/`size`/`material` surface
|
|
1206
|
+
* as MeshInstance3D; `transforms` places the copies:
|
|
1207
|
+
*
|
|
1208
|
+
* { "name": "Rocks", "type": "InstancedMesh3D",
|
|
1209
|
+
* "props": { "mesh": "gem", "size": [0.7, 0.5, 0.7],
|
|
1210
|
+
* "material": { "color": "#8a8f98", "roughness": 0.9, "flatShading": true },
|
|
1211
|
+
* "transforms": [[12, 0.2, -8, 40, 1.3], [-6, 0.1, 14, 210, 0.8]] } }
|
|
1212
|
+
*
|
|
1213
|
+
* Each row is `[x, y, z, yawDeg?, scale?]` (yaw 0 and scale 1 when omitted) —
|
|
1214
|
+
* dense enough to generate hundreds inline. REPLACE the array to update
|
|
1215
|
+
* (mutations are not watched).
|
|
1216
|
+
*/
|
|
1217
|
+
declare class InstancedMesh3D extends Node3D {
|
|
1218
|
+
static override readonly typeName: string;
|
|
1219
|
+
static override readonly props: PropSchema;
|
|
1220
|
+
mesh: string;
|
|
1221
|
+
size: number[];
|
|
1222
|
+
material: MeshMaterialProps;
|
|
1223
|
+
castShadow: boolean;
|
|
1224
|
+
receiveShadow: boolean;
|
|
1225
|
+
private _transforms;
|
|
1226
|
+
private transformsDirty;
|
|
1227
|
+
get transforms(): number[][];
|
|
1228
|
+
set transforms(value: number[][]);
|
|
1229
|
+
private instanced;
|
|
1230
|
+
private builtKey;
|
|
1231
|
+
static validateJson(node: Node): void;
|
|
1232
|
+
/** Test hook: the live instance count. */
|
|
1233
|
+
get instanceCount(): number;
|
|
1234
|
+
override _syncObject3D(alpha?: number): void;
|
|
1235
|
+
override free(): void;
|
|
1236
|
+
}
|
|
1237
|
+
//#endregion
|
|
1238
|
+
//#region src/3d/nodes/joint-3d.d.ts
|
|
1239
|
+
type JointType3D = "fixed" | "spherical" | "rope" | "spring";
|
|
1240
|
+
/**
|
|
1241
|
+
* A physics joint linking its PARENT body to `target` (a node path to the
|
|
1242
|
+
* other body). Godot-style placement: the joint lives as a child of body A.
|
|
1243
|
+
*
|
|
1244
|
+
* { "name": "Hinge", "type": "Joint3D",
|
|
1245
|
+
* "props": { "type": "spherical", "target": "%Anchor", "anchor": [0, -20] } }
|
|
1246
|
+
*
|
|
1247
|
+
* Types: `fixed` welds the bodies rigidly · `spherical` is a ball joint at the
|
|
1248
|
+
* anchors · `rope` caps the anchor distance at `length` (m; 0 = measured at
|
|
1249
|
+
* creation) · `spring` pulls toward `length` with `stiffness`/`damping`.
|
|
1250
|
+
* Anchors are LOCAL meter offsets on each body.
|
|
1251
|
+
*/
|
|
1252
|
+
declare class Joint3D extends Node3D {
|
|
1253
|
+
static override readonly typeName: string;
|
|
1254
|
+
static override readonly props: PropSchema;
|
|
1255
|
+
type: JointType3D;
|
|
1256
|
+
target: string;
|
|
1257
|
+
anchor: number[];
|
|
1258
|
+
targetAnchor: number[];
|
|
1259
|
+
/** rope/spring rest length in m; 0 = measure body distance at creation. */
|
|
1260
|
+
length: number;
|
|
1261
|
+
stiffness: number;
|
|
1262
|
+
damping: number;
|
|
1263
|
+
override onEnterTree(): void;
|
|
1264
|
+
/** @internal The two bodies, resolved (throws on a bad target at step time). */
|
|
1265
|
+
_resolveBodies(): {
|
|
1266
|
+
a: PhysicsBody3D;
|
|
1267
|
+
b: PhysicsBody3D;
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/3d/nodes/lights-3d.d.ts
|
|
1272
|
+
/** Sun-style light. Direction comes from the node's rotation. */
|
|
1273
|
+
declare class DirectionalLight3D extends Node3D {
|
|
1274
|
+
static override readonly typeName: string;
|
|
1275
|
+
static override readonly props: PropSchema;
|
|
1276
|
+
color: string;
|
|
1277
|
+
intensity: number;
|
|
1278
|
+
castShadow: boolean;
|
|
1279
|
+
/** Half-extent of the directional shadow frustum (template default ±75). */
|
|
1280
|
+
shadowArea: number;
|
|
1281
|
+
shadowMapSize: number;
|
|
1282
|
+
/**
|
|
1283
|
+
* Re-center the shadow frustum on the camera every frame. A directional sun's
|
|
1284
|
+
* shadow map covers a fixed ortho box; in a big roaming world that box must be
|
|
1285
|
+
* huge (and so low-resolution that the player's own shadow nearly vanishes).
|
|
1286
|
+
* With this on, a SMALL `shadowArea` tracks the camera, so contact shadows stay
|
|
1287
|
+
* crisp wherever you go. The renderer supplies the camera position.
|
|
1288
|
+
*/
|
|
1289
|
+
shadowFollowsCamera: boolean;
|
|
1290
|
+
protected override _createObject3D(): Object3D;
|
|
1291
|
+
override _syncObject3D(): void;
|
|
1292
|
+
}
|
|
1293
|
+
/** Point light with a range (Godot's OmniLight3D). */
|
|
1294
|
+
declare class OmniLight3D extends Node3D {
|
|
1295
|
+
static override readonly typeName: string;
|
|
1296
|
+
static override readonly props: PropSchema;
|
|
1297
|
+
color: string;
|
|
1298
|
+
intensity: number;
|
|
1299
|
+
/** 0 = unlimited (three `distance` semantics). */
|
|
1300
|
+
range: number;
|
|
1301
|
+
protected override _createObject3D(): Object3D;
|
|
1302
|
+
override _syncObject3D(): void;
|
|
1303
|
+
}
|
|
1304
|
+
//#endregion
|
|
1223
1305
|
//#region src/3d/nodes/loft-mesh-3d.d.ts
|
|
1224
1306
|
/**
|
|
1225
1307
|
* One station of a loft: the hull's cross-section at local `z`.
|
|
@@ -1293,6 +1375,16 @@ declare class ModelInstance3D extends Node3D {
|
|
|
1293
1375
|
castShadow: boolean;
|
|
1294
1376
|
/** false = play the clip once, then emit `animationFinished`. */
|
|
1295
1377
|
animationLoop: boolean;
|
|
1378
|
+
/**
|
|
1379
|
+
* Two-layer animation: play this clip on the UPPER BODY ONLY (the
|
|
1380
|
+
* `upperBodyRoot` bone subtree) while `animation` keeps driving the rest —
|
|
1381
|
+
* attack while running, wave while walking. One-shot by default
|
|
1382
|
+
* (`animationUpperLoop: false`): finishes, emits `animationFinished` with
|
|
1383
|
+
* this key, and auto-clears back to ''.
|
|
1384
|
+
*/
|
|
1385
|
+
animationUpper: string;
|
|
1386
|
+
animationUpperLoop: boolean;
|
|
1387
|
+
upperBodyRoot: string;
|
|
1296
1388
|
receiveShadow: boolean;
|
|
1297
1389
|
/** Hex colour multiplied into every material — RESKIN one shared GLB into many
|
|
1298
1390
|
* variants (e.g. a sickly-green zombie from the base human). '' = untinted. */
|
|
@@ -1311,6 +1403,12 @@ declare class ModelInstance3D extends Node3D {
|
|
|
1311
1403
|
private mixer;
|
|
1312
1404
|
private playing;
|
|
1313
1405
|
private currentAction;
|
|
1406
|
+
private playingUpper;
|
|
1407
|
+
private upperAction;
|
|
1408
|
+
/** Which variant the BASE action is playing ('lower' while a layer is on). */
|
|
1409
|
+
private baseMode;
|
|
1410
|
+
/** Masked-clip cache: source clip uuid + layer root → {upper, lower}. */
|
|
1411
|
+
private readonly maskCache;
|
|
1314
1412
|
/** action → the `animation` key that played it, so `animationFinished` reports
|
|
1315
1413
|
* the clip that ACTUALLY finished (a crossfaded-away one-shot can finish a few
|
|
1316
1414
|
* frames after `this.animation` already moved on). */
|
|
@@ -1352,7 +1450,15 @@ declare class ModelInstance3D extends Node3D {
|
|
|
1352
1450
|
private applyMaterialMods;
|
|
1353
1451
|
/** Re-apply every queued named-node pose onto the mounted instance. */
|
|
1354
1452
|
private applyPoses;
|
|
1453
|
+
/** Resolve a clip ref: embedded name → '$asset' / URL (VRM-retargeted when
|
|
1454
|
+
* needed). 'loading' = asset still fetching, try again next frame. */
|
|
1455
|
+
private resolveClip;
|
|
1456
|
+
/** Masked upper/lower variants of a clip for two-layer playback (cached). */
|
|
1457
|
+
private layerVariants;
|
|
1458
|
+
private upperLayerActive;
|
|
1355
1459
|
private syncAnimation;
|
|
1460
|
+
/** The upper-body layer: masked clip on the `upperBodyRoot` subtree. */
|
|
1461
|
+
private syncUpperAnimation;
|
|
1356
1462
|
override update(dt: number): void;
|
|
1357
1463
|
override onExitTree(): void;
|
|
1358
1464
|
private unmount;
|
|
@@ -2259,4 +2365,21 @@ interface TerrainNavOptions {
|
|
|
2259
2365
|
}
|
|
2260
2366
|
declare function buildTerrainNav(terrain: HeightSampler, opts?: TerrainNavOptions): TerrainNav;
|
|
2261
2367
|
//#endregion
|
|
2262
|
-
|
|
2368
|
+
//#region src/3d/terrain-nav-debug.d.ts
|
|
2369
|
+
/**
|
|
2370
|
+
* See what the enemies see: one node that paints every WALKABLE nav cell as a
|
|
2371
|
+
* translucent quad hugging the terrain surface. Add it while tuning
|
|
2372
|
+
* `cellSize`/`maxSlopeDeg`, drop it when the routes look right:
|
|
2373
|
+
*
|
|
2374
|
+
* if (DEBUG_NAV) this.node.addChild(createNavDebugNode(this.nav));
|
|
2375
|
+
*
|
|
2376
|
+
* One InstancedMesh — a few thousand cells render as a single draw call.
|
|
2377
|
+
*/
|
|
2378
|
+
declare function createNavDebugNode(nav: TerrainNav, opts?: {
|
|
2379
|
+
color?: string;
|
|
2380
|
+
opacity?: number;
|
|
2381
|
+
lift?: number;
|
|
2382
|
+
name?: string;
|
|
2383
|
+
}): InstancedMesh3D;
|
|
2384
|
+
//#endregion
|
|
2385
|
+
export { Area3D, AssetStore3D, Billboard3D, type BillboardGroupMode, BoneAttachment3D, BoneLookAt3D, Camera3D, CharacterBody3D, CharacterController3D, type CreateGame3DOptions, DEFAULT_TERRAIN_TEXTURE_BASE, DirectionalLight3D, Environment3D, type Environment3DConfig, DENSITY_PRESETS as FLOWER_DENSITY_PRESETS, FLOWER_VARIETIES, type FlowerVariety, Flowers3D, type FogEnvironment, Foliage3D, type FoliageKind, type FoliageStyle, type Game3D, type HeightSampler, type Heightmap, type HeightmapOptions, InstancedMesh3D, Joint3D, type JointType3D, LoftMesh3D, type LoftSection, MeshInstance3D, type MeshKind, type MeshMaterialProps, type ModelEntry, ModelInstance3D, Node3D, OmniLight3D, Particles3D, Physics3D, type Physics3DOptions, PhysicsBody3D, QUARTER_PITCH, type RenderContext3D, type RenderHook3D, Renderer3D, type Renderer3DOptions, type RigView, RigidBody3D, type Ripple, type ShadowsEnvironment, type SkyEnvironment, StaticBody3D, type SunConsumer3D, type SyncOptions, type SyncResult, TERRAIN_THEMES, Terrain3D, type TerrainLayer, type TerrainNav, type TerrainNavOptions, type TerrainTheme, Trail3D, Tree3D, type TreeTier, type TreeType, VOXEL_PALETTE, type VoxelBlock, VoxelGrid3D, WATER_MAX_RIPPLES, Water3D, buildHeightmap, buildTerrainNav, cameraRelative, createGame3D, createNavDebugNode, enablePhysics3D, horizonColorFromSky, keyboardIntensity, movementState, parseEnvironment3D, registerNodes3D, resolveFlowerDensity, rigPose, setEnvironment3D, splatWeights, sunDirectionFromElevationAzimuth, sunDirectionFromSky, syncTree, terrainThemeLayers };
|
package/dist/3d.js
CHANGED
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
2
|
+
import { a as Environment3D, c as sunDirectionFromElevationAzimuth, i as syncTree, l as sunDirectionFromSky, o as horizonColorFromSky, r as Renderer3D, s as parseEnvironment3D, t as createGame3D, u as AssetStore3D } from "./create-game-J6g4QInv.js";
|
|
3
|
+
import { A as Area3D, B as movementState, C as BoneAttachment3D, D as TERRAIN_THEMES, E as DEFAULT_TERRAIN_TEXTURE_BASE, F as Node3D, L as QUARTER_PITCH, M as PhysicsBody3D, N as RigidBody3D, O as terrainThemeLayers, P as StaticBody3D, R as cameraRelative, S as BoneLookAt3D, T as Terrain3D, V as rigPose, _ as Flowers3D, a as VoxelGrid3D, b as CharacterController3D, c as Particles3D, d as DirectionalLight3D, f as OmniLight3D, g as DENSITY_PRESETS, h as Foliage3D, i as VOXEL_PALETTE, j as CharacterBody3D, k as Joint3D, l as ModelInstance3D, m as MeshInstance3D, n as Water3D, o as Tree3D, p as InstancedMesh3D, r as WATER_MAX_RIPPLES, s as Trail3D, t as registerNodes3D, u as LoftMesh3D, v as resolveFlowerDensity, w as Billboard3D, x as Camera3D, y as FLOWER_VARIETIES, z as keyboardIntensity } from "./register-BFw4c83z.js";
|
|
3
4
|
import { n as splatWeights, t as buildHeightmap } from "./heightmap-CroQPEER.js";
|
|
4
|
-
import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-
|
|
5
|
+
import { n as enablePhysics3D, t as Physics3D } from "./physics-3d-DhaAaKJo.js";
|
|
6
|
+
//#region src/3d/environment-runtime.ts
|
|
7
|
+
/**
|
|
8
|
+
* Live environment editing — the renderer re-applies `scene.environment`
|
|
9
|
+
* every frame (cheap when unchanged), so changing the LOOK at runtime is
|
|
10
|
+
* just writing that object. This helper does it safely:
|
|
11
|
+
*
|
|
12
|
+
* setEnvironment3D(engine, { sky: { elevationDeg: 4 }, exposure: 0.8 });
|
|
13
|
+
* setEnvironment3D(engine, { fog: null }); // null DELETES a key
|
|
14
|
+
*
|
|
15
|
+
* - one-level deep merge (patching `sky.elevationDeg` keeps the other sky keys)
|
|
16
|
+
* - hard-validates the merged result NOW (in your call stack), so a bad patch
|
|
17
|
+
* throws where you wrote it — never inside the render loop
|
|
18
|
+
*/
|
|
19
|
+
function setEnvironment3D(engine, patch) {
|
|
20
|
+
const scene = engine.scene;
|
|
21
|
+
if (!scene) throw new IncantoError("BAD_FORMAT", "setEnvironment3D: the engine has no scene.");
|
|
22
|
+
const merged = { ...scene.environment ?? {} };
|
|
23
|
+
for (const [key, value] of Object.entries(patch)) if (value === null) delete merged[key];
|
|
24
|
+
else if (typeof value === "object" && !Array.isArray(value) && typeof merged[key] === "object" && merged[key] !== null && !Array.isArray(merged[key])) merged[key] = {
|
|
25
|
+
...merged[key],
|
|
26
|
+
...value
|
|
27
|
+
};
|
|
28
|
+
else merged[key] = value;
|
|
29
|
+
parseEnvironment3D(merged);
|
|
30
|
+
scene.environment = merged;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
5
33
|
//#region src/3d/terrain-nav.ts
|
|
6
34
|
function buildTerrainNav(terrain, opts) {
|
|
7
35
|
const cellSize = opts?.cellSize ?? 2;
|
|
@@ -71,4 +99,46 @@ const CORNERS = [
|
|
|
71
99
|
[-1, -1]
|
|
72
100
|
];
|
|
73
101
|
//#endregion
|
|
74
|
-
|
|
102
|
+
//#region src/3d/terrain-nav-debug.ts
|
|
103
|
+
/**
|
|
104
|
+
* See what the enemies see: one node that paints every WALKABLE nav cell as a
|
|
105
|
+
* translucent quad hugging the terrain surface. Add it while tuning
|
|
106
|
+
* `cellSize`/`maxSlopeDeg`, drop it when the routes look right:
|
|
107
|
+
*
|
|
108
|
+
* if (DEBUG_NAV) this.node.addChild(createNavDebugNode(this.nav));
|
|
109
|
+
*
|
|
110
|
+
* One InstancedMesh — a few thousand cells render as a single draw call.
|
|
111
|
+
*/
|
|
112
|
+
function createNavDebugNode(nav, opts) {
|
|
113
|
+
const node = new InstancedMesh3D(opts?.name ?? "__navDebug");
|
|
114
|
+
node.mesh = "plane";
|
|
115
|
+
node.size = [
|
|
116
|
+
nav.cellSize * .9,
|
|
117
|
+
1,
|
|
118
|
+
nav.cellSize * .9
|
|
119
|
+
];
|
|
120
|
+
node.material = {
|
|
121
|
+
color: opts?.color ?? "#37ff8b",
|
|
122
|
+
emissive: opts?.color ?? "#37ff8b",
|
|
123
|
+
emissiveIntensity: .5,
|
|
124
|
+
opacity: opts?.opacity ?? .3,
|
|
125
|
+
roughness: 1,
|
|
126
|
+
depthWrite: false
|
|
127
|
+
};
|
|
128
|
+
node.renderOrder = 50;
|
|
129
|
+
const lift = opts?.lift ?? .08;
|
|
130
|
+
const rows = [];
|
|
131
|
+
for (let cy = 0; cy < nav.grid.height; cy++) for (let cx = 0; cx < nav.grid.width; cx++) {
|
|
132
|
+
if (nav.grid.solid(cx, cy)) continue;
|
|
133
|
+
const [x, y, z] = nav.toWorld(cx, cy);
|
|
134
|
+
rows.push([
|
|
135
|
+
x,
|
|
136
|
+
y + lift,
|
|
137
|
+
z
|
|
138
|
+
]);
|
|
139
|
+
}
|
|
140
|
+
node.transforms = rows;
|
|
141
|
+
return node;
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
export { Area3D, AssetStore3D, Billboard3D, BoneAttachment3D, BoneLookAt3D, Camera3D, CharacterBody3D, CharacterController3D, DEFAULT_TERRAIN_TEXTURE_BASE, DirectionalLight3D, Environment3D, DENSITY_PRESETS as FLOWER_DENSITY_PRESETS, FLOWER_VARIETIES, Flowers3D, Foliage3D, InstancedMesh3D, Joint3D, LoftMesh3D, MeshInstance3D, ModelInstance3D, Node3D, OmniLight3D, Particles3D, Physics3D, PhysicsBody3D, QUARTER_PITCH, Renderer3D, RigidBody3D, StaticBody3D, TERRAIN_THEMES, Terrain3D, Trail3D, Tree3D, VOXEL_PALETTE, VoxelGrid3D, WATER_MAX_RIPPLES, Water3D, buildHeightmap, buildTerrainNav, cameraRelative, createGame3D, createNavDebugNode, enablePhysics3D, horizonColorFromSky, keyboardIntensity, movementState, parseEnvironment3D, registerNodes3D, resolveFlowerDensity, rigPose, setEnvironment3D, splatWeights, sunDirectionFromElevationAzimuth, sunDirectionFromSky, syncTree, terrainThemeLayers };
|
|
@@ -693,8 +693,10 @@ declare class Scene {
|
|
|
693
693
|
readonly dimension: "2d" | "3d" | undefined;
|
|
694
694
|
readonly root: Node;
|
|
695
695
|
readonly tree: SceneTree;
|
|
696
|
-
/** Scene-level rendering environment (read by renderer adapters
|
|
697
|
-
|
|
696
|
+
/** Scene-level rendering environment (read by renderer adapters EVERY
|
|
697
|
+
* frame, cheap when unchanged) — mutable so runtime look changes
|
|
698
|
+
* (setEnvironment3D, DayNight) are just writes to this object. */
|
|
699
|
+
environment: JsonObject | undefined;
|
|
698
700
|
/** Asset declarations (consumed by renderer/asset layers, `$key` references). */
|
|
699
701
|
readonly assets: Record<string, JsonObject> | undefined;
|
|
700
702
|
/** Named constant values (`{"@const": "NAME"}` prop references resolve to these). */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { _ as registerBehavior, n as loadScene, o as computeViewport, s as resolveViewport } from "./loader-
|
|
3
|
-
import { l as AudioPlayer, u as Engine } from "./register-
|
|
2
|
+
import { _ as registerBehavior, n as loadScene, o as computeViewport, s as resolveViewport } from "./loader-BZqOKfI2.js";
|
|
3
|
+
import { l as AudioPlayer, u as Engine } from "./register-nObreUQR.js";
|
|
4
4
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
5
5
|
import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
|
|
6
|
-
import { n as registerGameplayBehaviors } from "./gameplay-
|
|
7
|
-
import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-
|
|
6
|
+
import { n as registerGameplayBehaviors } from "./gameplay-sSqrUcnz.js";
|
|
7
|
+
import { g as PhysicsBody2D, n as UILayer, t as registerNodes2D, u as Camera2D, y as Node2D } from "./register-Djwckzgx.js";
|
|
8
8
|
import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
|
|
9
|
-
import { n as enablePhysics2D } from "./physics-2d-
|
|
9
|
+
import { n as enablePhysics2D } from "./physics-2d-BiIdl51r.js";
|
|
10
10
|
import { Box3, BufferAttribute, BufferGeometry, Color, LineBasicMaterial, LineSegments, LinearFilter, NearestFilter, OrthographicCamera, Raycaster, SRGBColorSpace, Scene, TextureLoader, Vector2, Vector3, WebGLRenderer } from "three";
|
|
11
11
|
//#region src/2d/assets.ts
|
|
12
12
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
-
import { _ as registerBehavior, n as loadScene } from "./loader-
|
|
3
|
-
import { l as AudioPlayer, u as Engine } from "./register-
|
|
2
|
+
import { _ as registerBehavior, n as loadScene } from "./loader-BZqOKfI2.js";
|
|
3
|
+
import { l as AudioPlayer, u as Engine } from "./register-nObreUQR.js";
|
|
4
4
|
import { t as IncantoError } from "./errors-BpWbnbb_.js";
|
|
5
5
|
import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
|
|
6
|
-
import { n as registerGameplayBehaviors } from "./gameplay-
|
|
6
|
+
import { n as registerGameplayBehaviors } from "./gameplay-sSqrUcnz.js";
|
|
7
7
|
import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
|
|
8
|
-
import {
|
|
9
|
-
import { n as enablePhysics3D } from "./physics-3d-
|
|
8
|
+
import { F as Node3D, M as PhysicsBody3D, d as DirectionalLight3D, l as ModelInstance3D, t as registerNodes3D, x as Camera3D } from "./register-BFw4c83z.js";
|
|
9
|
+
import { n as enablePhysics3D } from "./physics-3d-DhaAaKJo.js";
|
|
10
10
|
import { ACESFilmicToneMapping, AmbientLight, Box3, BufferAttribute, BufferGeometry, Color, DepthTexture, EquirectangularReflectionMapping, FloatType, Fog, HalfFloatType, LineBasicMaterial, LineSegments, Matrix4, Mesh, PCFShadowMap, PMREMGenerator, PerspectiveCamera, PlaneGeometry, Quaternion, Raycaster, Scene, ShaderMaterial, Vector2, Vector3, WebGLRenderTarget, WebGLRenderer } from "three";
|
|
11
11
|
import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
|
|
12
12
|
import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
|
package/dist/debug.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as RendererStats, E as LogLevel, v as Engine } from "./behavior-
|
|
1
|
+
import { C as RendererStats, E as LogLevel, v as Engine } from "./behavior-CPibUfnH.js";
|
|
2
2
|
|
|
3
3
|
//#region src/debug/panel.d.ts
|
|
4
4
|
/** Minimal document surface the overlay needs (injectable for tests). */
|