incanto 0.7.0 → 0.7.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.
@@ -1,14 +1,14 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { _ as registerBehavior, n as loadScene } from "./loader-B4OEXDZ8.js";
3
- import { s as Engine } from "./particle-sim-CrTE7c02.js";
3
+ import { s as Engine } from "./particle-sim-m3CdTGSl.js";
4
4
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
5
5
  import { s as AudioPlayer } from "./register-Dl_ixIJe.js";
6
6
  import { i as resolveRendering, n as attachTouchControls } from "./touch-031PxtCR.js";
7
7
  import { n as registerGameplayBehaviors } from "./gameplay-CDFgSG6z.js";
8
8
  import { t as debugSources } from "./debug-draw-CZmOYjL2.js";
9
- import { O as PhysicsBody3D, c as ModelInstance3D, d as DirectionalLight3D, j as Node3D, t as registerNodes3D, y as Camera3D } from "./register-CscQqB7V.js";
10
- import { n as enablePhysics3D } from "./physics-3d-CDjuhtt_.js";
11
- import { ACESFilmicToneMapping, AmbientLight, 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";
9
+ import { O as PhysicsBody3D, c as ModelInstance3D, d as DirectionalLight3D, j as Node3D, t as registerNodes3D, y as Camera3D } from "./register-CpXcMiEk.js";
10
+ import { n as enablePhysics3D } from "./physics-3d-DT5e8izo.js";
11
+ 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";
12
12
  import { VRMLoaderPlugin, VRMUtils } from "@pixiv/three-vrm";
13
13
  import { GLTFLoader } from "three/addons/loaders/GLTFLoader.js";
14
14
  import { RGBELoader } from "three/examples/jsm/loaders/RGBELoader.js";
@@ -1073,6 +1073,54 @@ function parseIblIntensity(value) {
1073
1073
  return value;
1074
1074
  }
1075
1075
  //#endregion
1076
+ //#region src/3d/selection-outline.ts
1077
+ /**
1078
+ * Where IS the node the dev-overlay selected? — world-space outline segments
1079
+ * for the renderer's highlight pass. A renderable node gets its actual
1080
+ * bounding box (children included); a node with no visual extent gets a
1081
+ * small marker cube at its world position so it is still findable.
1082
+ */
1083
+ const box = new Box3();
1084
+ const size = new Vector3();
1085
+ const MARKER_HALF = .4;
1086
+ /** 12 box edges = 24 points × xyz. */
1087
+ const OUT = new Float32Array(72);
1088
+ function selectionOutline3D(node) {
1089
+ if (!(node instanceof Node3D)) return null;
1090
+ const obj = node._ensureObject3D();
1091
+ obj.updateWorldMatrix(true, true);
1092
+ box.setFromObject(obj);
1093
+ box.getSize(size);
1094
+ if (!Number.isFinite(size.x) || size.x === 0 && size.y === 0 && size.z === 0) {
1095
+ const p = new Vector3().setFromMatrixPosition(obj.matrixWorld);
1096
+ box.min.set(p.x - MARKER_HALF, p.y - MARKER_HALF, p.z - MARKER_HALF);
1097
+ box.max.set(p.x + MARKER_HALF, p.y + MARKER_HALF, p.z + MARKER_HALF);
1098
+ } else box.expandByScalar(.02);
1099
+ const { min, max } = box;
1100
+ let i = 0;
1101
+ const seg = (x1, y1, z1, x2, y2, z2) => {
1102
+ OUT[i++] = x1;
1103
+ OUT[i++] = y1;
1104
+ OUT[i++] = z1;
1105
+ OUT[i++] = x2;
1106
+ OUT[i++] = y2;
1107
+ OUT[i++] = z2;
1108
+ };
1109
+ seg(min.x, min.y, min.z, max.x, min.y, min.z);
1110
+ seg(max.x, min.y, min.z, max.x, min.y, max.z);
1111
+ seg(max.x, min.y, max.z, min.x, min.y, max.z);
1112
+ seg(min.x, min.y, max.z, min.x, min.y, min.z);
1113
+ seg(min.x, max.y, min.z, max.x, max.y, min.z);
1114
+ seg(max.x, max.y, min.z, max.x, max.y, max.z);
1115
+ seg(max.x, max.y, max.z, min.x, max.y, max.z);
1116
+ seg(min.x, max.y, max.z, min.x, max.y, min.z);
1117
+ seg(min.x, min.y, min.z, min.x, max.y, min.z);
1118
+ seg(max.x, min.y, min.z, max.x, max.y, min.z);
1119
+ seg(max.x, min.y, max.z, max.x, max.y, max.z);
1120
+ seg(min.x, min.y, max.z, min.x, max.y, max.z);
1121
+ return OUT;
1122
+ }
1123
+ //#endregion
1076
1124
  //#region src/3d/sync.ts
1077
1125
  function isSpatialConsumer(node) {
1078
1126
  return node.spatial === true && typeof node._setSpatialPose === "function";
@@ -1449,9 +1497,31 @@ var Renderer3D = class {
1449
1497
  this.debugLines.renderOrder = 9999;
1450
1498
  this.debugLines.visible = false;
1451
1499
  this.threeScene.add(this.debugLines);
1500
+ this.selectionLines = new LineSegments(new BufferGeometry(), new LineBasicMaterial({
1501
+ color: "#ffb020",
1502
+ transparent: true,
1503
+ depthTest: false
1504
+ }));
1505
+ this.selectionLines.frustumCulled = false;
1506
+ this.selectionLines.renderOrder = 1e4;
1507
+ this.selectionLines.visible = false;
1508
+ this.threeScene.add(this.selectionLines);
1452
1509
  this.disconnect = this.engine.updated.connect(() => this.render());
1453
1510
  }
1454
1511
  debugLines;
1512
+ selectionLines;
1513
+ syncSelectionOutline() {
1514
+ const node = this.engine.debugSelection;
1515
+ if (node && node.tree !== this.engine.scene?.tree) this.engine.debugSelection = null;
1516
+ const current = this.engine.debugSelection;
1517
+ const vertices = current ? selectionOutline3D(current) : null;
1518
+ this.selectionLines.visible = vertices !== null;
1519
+ if (vertices) {
1520
+ this.selectionLines.geometry.setAttribute("position", new BufferAttribute(vertices, 3));
1521
+ const attr = this.selectionLines.geometry.getAttribute("position");
1522
+ attr.needsUpdate = true;
1523
+ }
1524
+ }
1455
1525
  syncDebugLines() {
1456
1526
  let vertices = null;
1457
1527
  for (const source of debugSources("3d")) {
@@ -1465,6 +1535,7 @@ var Renderer3D = class {
1465
1535
  const scene = this.engine.scene;
1466
1536
  if (!scene) return;
1467
1537
  this.syncDebugLines();
1538
+ this.syncSelectionOutline();
1468
1539
  if (scene.assets && !this.loadedAssetScenes.has(scene)) {
1469
1540
  this.assets.load(scene.assets);
1470
1541
  this.loadedAssetScenes.add(scene);
package/dist/debug.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as RendererStats, k as LogLevel, v as Engine } from "./behavior-e3kAmPGC.js";
1
+ import { C as RendererStats, E as LogLevel, v as Engine } from "./behavior-q3cejJgs.js";
2
2
 
3
3
  //#region src/debug/panel.d.ts
4
4
  /** Minimal document surface the overlay needs (injectable for tests). */
package/dist/debug.js CHANGED
@@ -328,6 +328,7 @@ var DebugOverlay = class {
328
328
  }
329
329
  }
330
330
  dispose() {
331
+ this.engine.debugSelection = null;
331
332
  this.setConsoleCapture(false);
332
333
  for (const cleanup of this.cleanups) cleanup();
333
334
  for (const id of [...this.panels.keys()]) this.close(id);
@@ -471,6 +472,7 @@ var DebugOverlay = class {
471
472
  }
472
473
  row.addEventListener("click", () => {
473
474
  this.selected = node;
475
+ this.engine.debugSelection = node;
474
476
  this.open("inspector");
475
477
  this.renderExplorer();
476
478
  this.renderInspector();
@@ -496,6 +498,7 @@ var DebugOverlay = class {
496
498
  let node = this.selected;
497
499
  if (node && node.tree === null) {
498
500
  this.selected = null;
501
+ this.engine.debugSelection = null;
499
502
  node = null;
500
503
  }
501
504
  if (!node) {
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue } from "./schema-CcoWb32N.js";
2
- import { T as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-e3kAmPGC.js";
2
+ import { Z as Node, l as PropSchema, n as BehaviorCtor, t as Behavior, v as Engine } from "./behavior-q3cejJgs.js";
3
3
 
4
4
  //#region src/gameplay/chase.d.ts
5
5
  /**
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as Rng, c as JsonValue, d as jsonKind, i as SceneJson, l as jsonClone, n as NodeJson, o as JsonKind, r as SCENE_FORMAT, s as JsonObject, t as ConnectionJson, u as jsonEquals } from "./schema-CcoWb32N.js";
2
- import { $ as BusName, A as LogManager, B as spatialGain, C as RendererStats, D as SceneTree, E as NodeLifecycle, F as Listener, G as SfxWave, H as SFX_PRESETS, I as ROLLOFF_MODELS, J as MusicBackend, K as SynthOptions, L as RolloffModel, M as SfxEngine, N as SfxPlayOptions, O as LogEntry, P as isAudioContextAvailable, Q as AudioBuses, R as SpatialParams, S as GameStats, T as Node, U as SFX_PRESET_NAMES, V as spatialPan, W as SfxParams, X as MusicTrack, Y as MusicManager, Z as PlayMusicOptions, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as Signal, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as InputMap, k as LogLevel, l as PropSchema, m as getNodeType, n as BehaviorCtor, o as registeredBehaviors, p as getNodeSignals, q as synthSfx, r as clearBehaviors, s as NodeCtor, t as Behavior, tt as SignalListener, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as Vec3 } from "./behavior-e3kAmPGC.js";
3
- import { n as loadScene, t as LoadSceneOptions } from "./loader-y_X4zYO0.js";
2
+ import { $ as Signal, A as SfxPlayOptions, B as SFX_PRESET_NAMES, C as RendererStats, D as LogManager, E as LogLevel, F as SpatialParams, G as MusicBackend, H as SfxWave, I as Vec3, J as PlayMusicOptions, K as MusicManager, L as spatialGain, M as Listener, N as ROLLOFF_MODELS, O as InputMap, P as RolloffModel, Q as NodeLifecycle, R as spatialPan, S as GameStats, T as LogEntry, U as SynthOptions, V as SfxParams, W as synthSfx, X as BusName, Y as AudioBuses, Z as Node, _ as registeredTypes, a as registerBehavior, b as Scheduler, c as PropDef, d as createNode, et as SignalListener, f as getNodeSchema, g as registerNode, h as mergeStaticSignals, i as getBehavior, j as isAudioContextAvailable, k as SfxEngine, l as PropSchema, m as getNodeType, n as BehaviorCtor, o as registeredBehaviors, p as getNodeSignals, q as MusicTrack, r as clearBehaviors, s as NodeCtor, t as Behavior, tt as SceneTree, u as clearRegistry, v as Engine, w as Scene, x as EngineStats, y as EngineOptions, z as SFX_PRESETS } from "./behavior-q3cejJgs.js";
3
+ import { n as loadScene, t as LoadSceneOptions } from "./loader-DnLMMRy8.js";
4
4
  import { n as ParticleSimConfig, r as ParticleView, t as ParticleSim } from "./particle-sim-CwJ5rI_P.js";
5
- import { n as AudioPlayer, t as AudioElementLike } from "./audio-player-VSjk_vG8.js";
5
+ import { n as AudioPlayer, t as AudioElementLike } from "./audio-player-C3bH_eZ5.js";
6
6
  import { n as IncantoErrorCode, r as IncantoErrorDetails, t as IncantoError } from "./errors-BMFaY68Q.js";
7
7
 
8
8
  //#region src/core/audio/crossfade.d.ts
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { _ as registerBehavior, a as SCENE_FORMAT, c as SceneTree, d as resolveConstants, f as Node, g as getBehavior, h as clearBehaviors, i as serializeNode, l as CONST_REF_KEY, m as Behavior, n as loadScene, o as computeViewport, p as parseNodePath, r as Scene, s as resolveViewport, u as isConstRef, v as registeredBehaviors, y as Signal } from "./loader-B4OEXDZ8.js";
2
- import { a as ORDER_GROUP_BASE, c as LogManager, d as isAudioContextAvailable, f as MusicManager, g as AudioBuses, h as fadeGain, i as applyParticlePreset, l as InputMap, m as crossfadeGains, n as PARTICLE_PRESETS, o as effectiveOrder, p as WebAudioMusicBackend, r as PARTICLE_PRESET_NAMES, s as Engine, t as ParticleSim, u as SfxEngine } from "./particle-sim-CrTE7c02.js";
2
+ import { a as ORDER_GROUP_BASE, c as LogManager, d as isAudioContextAvailable, f as MusicManager, g as AudioBuses, h as fadeGain, i as applyParticlePreset, l as InputMap, m as crossfadeGains, n as PARTICLE_PRESETS, o as effectiveOrder, p as WebAudioMusicBackend, r as PARTICLE_PRESET_NAMES, s as Engine, t as ParticleSim, u as SfxEngine } from "./particle-sim-m3CdTGSl.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as Rng } from "./rng-DP-SR7eg.js";
5
5
  import { a as UiBar, c as ROLLOFF_MODELS, d as SFX_PRESETS, f as SFX_PRESET_NAMES, i as UiBanner, l as spatialGain, n as Timer, o as UiText, p as synthSfx, r as HudLayer, s as AudioPlayer, t as registerCoreNodes, u as spatialPan } from "./register-Dl_ixIJe.js";
@@ -110,6 +110,6 @@ function newUid() {
110
110
  //#endregion
111
111
  //#region src/index.ts
112
112
  /** Engine version. Kept in sync with package.json by the release pipeline. */
113
- const VERSION = "0.7.0";
113
+ const VERSION = "0.7.1";
114
114
  //#endregion
115
115
  export { AudioBuses, AudioPlayer, Behavior, CONST_REF_KEY, Engine, HudLayer, IncantoError, InputMap, LogManager, MusicManager, Node, ORDER_GROUP_BASE, PARTICLE_PRESETS, PARTICLE_PRESET_NAMES, ParticleSim, ROLLOFF_MODELS, Rng, SCENE_FORMAT, SFX_PRESETS, SFX_PRESET_NAMES, Scene, SceneTree, SfxEngine, Signal, Timer, TouchControls, UiBanner, UiBar, UiText, VERSION, WebAudioMusicBackend, applyParticlePreset, assetUrls, attachTouchControls, clearBehaviors, clearRegistry, computeViewport, createNode, createNoise2D, createSaveStore, crossfadeGains, duplicateNode, effectiveOrder, fadeGain, getBehavior, getNodeSchema, getNodeSignals, getNodeType, isAudioContextAvailable, isConstRef, joystickVector, jsonClone, jsonEquals, jsonKind, loadScene, mergeStaticSignals, newUid, parseNodePath, preloadUrls, registerBehavior, registerCoreNodes, registerNode, registeredBehaviors, registeredTypes, resolveConstants, resolveRendering, resolveViewport, serializeNode, spatialGain, spatialPan, synthSfx };
@@ -1,5 +1,5 @@
1
1
  import { i as SceneJson } from "./schema-CcoWb32N.js";
2
- import { v as Engine, w as Scene } from "./behavior-e3kAmPGC.js";
2
+ import { v as Engine, w as Scene } from "./behavior-q3cejJgs.js";
3
3
 
4
4
  //#region src/core/scene/loader.d.ts
5
5
  interface LoadSceneOptions {
package/dist/net.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue, i as SceneJson, s as JsonObject } from "./schema-CcoWb32N.js";
2
- import { T as Node, et as Signal, l as PropSchema, v as Engine } from "./behavior-e3kAmPGC.js";
2
+ import { $ as Signal, Z as Node, l as PropSchema, v as Engine } from "./behavior-q3cejJgs.js";
3
3
 
4
4
  //#region src/net/types.d.ts
5
5
  type Unsubscribe = () => void;
@@ -1011,6 +1011,13 @@ var Engine = class {
1011
1011
  * timers, behaviors all breathe together. See `gameplay` `hitStop()`.
1012
1012
  */
1013
1013
  timeScale = 1;
1014
+ /**
1015
+ * The node the dev overlay has selected (renderers draw its bounding box
1016
+ * as an orange outline in the game view so you can SEE what you picked).
1017
+ * Null when nothing is selected; cleared automatically when it leaves the
1018
+ * tree. Set by the debug overlay — games normally never touch this.
1019
+ */
1020
+ debugSelection = null;
1014
1021
  _time = 0;
1015
1022
  _unscaledTime = 0;
1016
1023
  /**
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
- import { _ as validateCollider2D, d as Area2D, f as CharacterBody2D, g as Node2D, m as RigidBody2D, p as PhysicsBody2D, u as Joint2D } from "./register-ClKnoILk.js";
3
+ import { _ as validateCollider2D, d as Area2D, f as CharacterBody2D, g as Node2D, m as RigidBody2D, p as PhysicsBody2D, u as Joint2D } from "./register-Cl3pAxX-.js";
4
4
  import { n as registerDebugSource } from "./debug-draw-CZmOYjL2.js";
5
5
  //#region src/2d/physics/physics-2d.ts
6
6
  var physics_2d_exports = /* @__PURE__ */ __exportAll({
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
2
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
3
3
  import { n as registerDebugSource } from "./debug-draw-CZmOYjL2.js";
4
- import { D as CharacterBody3D, E as Area3D, M as validateCollider3D, O as PhysicsBody3D, T as Joint3D, j as Node3D, k as RigidBody3D, x as Terrain3D } from "./register-CscQqB7V.js";
4
+ import { D as CharacterBody3D, E as Area3D, M as validateCollider3D, O as PhysicsBody3D, T as Joint3D, j as Node3D, k as RigidBody3D, x as Terrain3D } from "./register-CpXcMiEk.js";
5
5
  import { Euler, Quaternion } from "three";
6
6
  //#region src/3d/physics/physics-3d.ts
7
7
  var physics_3d_exports = /* @__PURE__ */ __exportAll({
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { c as JsonValue } from "./schema-CcoWb32N.js";
2
- import { n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-e3kAmPGC.js";
2
+ import { n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-q3cejJgs.js";
3
3
  import { CSSProperties, ReactNode } from "react";
4
4
 
5
5
  //#region src/react/index.d.ts
package/dist/react.js CHANGED
@@ -156,7 +156,7 @@ function IncantoCanvas(props) {
156
156
  pointer: latest.pointer,
157
157
  ...keyboard !== void 0 ? { keyboard } : {}
158
158
  };
159
- const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-CEFoFN8d.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-X5iRu6pf.js").then((n) => n.n)).createGame2D(o)))(opts);
159
+ const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-rFulaS3s.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-DuDkqnjl.js").then((n) => n.n)).createGame2D(o)))(opts);
160
160
  if (disposed) {
161
161
  next.dispose();
162
162
  return;
@@ -1,5 +1,5 @@
1
1
  import { f as Node } from "./loader-B4OEXDZ8.js";
2
- import { i as applyParticlePreset, o as effectiveOrder, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-CrTE7c02.js";
2
+ import { i as applyParticlePreset, o as effectiveOrder, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-m3CdTGSl.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as Rng } from "./rng-DP-SR7eg.js";
5
5
  import { t as registerCoreNodes } from "./register-Dl_ixIJe.js";
@@ -1,5 +1,5 @@
1
1
  import { f as Node } from "./loader-B4OEXDZ8.js";
2
- import { i as applyParticlePreset, o as effectiveOrder, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-CrTE7c02.js";
2
+ import { i as applyParticlePreset, o as effectiveOrder, r as PARTICLE_PRESET_NAMES, t as ParticleSim } from "./particle-sim-m3CdTGSl.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { t as Rng } from "./rng-DP-SR7eg.js";
5
5
  import { t as registerCoreNodes } from "./register-Dl_ixIJe.js";
package/dist/test.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as JsonValue, i as SceneJson } from "./schema-CcoWb32N.js";
2
- import { O as LogEntry, T as Node, n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-e3kAmPGC.js";
3
- import { t as LoadSceneOptions } from "./loader-y_X4zYO0.js";
2
+ import { T as LogEntry, Z as Node, n as BehaviorCtor, v as Engine, w as Scene } from "./behavior-q3cejJgs.js";
3
+ import { t as LoadSceneOptions } from "./loader-DnLMMRy8.js";
4
4
  import { t as IncantoError } from "./errors-BMFaY68Q.js";
5
5
 
6
6
  //#region src/test/index.d.ts
package/dist/test.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { _ as registerBehavior, n as loadScene } from "./loader-B4OEXDZ8.js";
2
- import { s as Engine } from "./particle-sim-CrTE7c02.js";
2
+ import { s as Engine } from "./particle-sim-m3CdTGSl.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
4
  import { n as jsonEquals, t as jsonClone } from "./json-BLk7H2Qa.js";
5
5
  import { i as getNodeSchema, s as mergeStaticProps } from "./registry-BVJ2HbCn.js";
6
6
  import { n as registerGameplayBehaviors } from "./gameplay-CDFgSG6z.js";
7
- import { t as registerNodes2D } from "./register-ClKnoILk.js";
8
- import { t as registerNodes3D } from "./register-CscQqB7V.js";
7
+ import { t as registerNodes2D } from "./register-Cl3pAxX-.js";
8
+ import { t as registerNodes3D } from "./register-CpXcMiEk.js";
9
9
  import { t as registerNodesNet } from "./register-C35HDZpm.js";
10
10
  //#region src/test/index.ts
11
11
  /**
@@ -129,10 +129,10 @@ async function runScript(json, opts) {
129
129
  engine.setScene(scene);
130
130
  const physics = opts.physics ?? "auto";
131
131
  if (physics === "2d" || physics === "auto" && scene.dimension === "2d") {
132
- const { enablePhysics2D } = await import("./physics-2d-DmQ540uR.js").then((n) => n.r);
132
+ const { enablePhysics2D } = await import("./physics-2d-CZM5Y90X.js").then((n) => n.r);
133
133
  await enablePhysics2D(engine);
134
134
  } else if (physics === "3d" || physics === "auto" && scene.dimension === "3d") {
135
- const { enablePhysics3D } = await import("./physics-3d-CDjuhtt_.js").then((n) => n.r);
135
+ const { enablePhysics3D } = await import("./physics-3d-DT5e8izo.js").then((n) => n.r);
136
136
  await enablePhysics3D(engine);
137
137
  }
138
138
  const failures = [];
@@ -234,10 +234,10 @@ async function createPlaySession(json, opts = {}) {
234
234
  engine.setScene(scene);
235
235
  const physics = opts.physics ?? "auto";
236
236
  if (physics === "2d" || physics === "auto" && scene.dimension === "2d") {
237
- const { enablePhysics2D } = await import("./physics-2d-DmQ540uR.js").then((n) => n.r);
237
+ const { enablePhysics2D } = await import("./physics-2d-CZM5Y90X.js").then((n) => n.r);
238
238
  await enablePhysics2D(engine);
239
239
  } else if (physics === "3d" || physics === "auto" && scene.dimension === "3d") {
240
- const { enablePhysics3D } = await import("./physics-3d-CDjuhtt_.js").then((n) => n.r);
240
+ const { enablePhysics3D } = await import("./physics-3d-DT5e8izo.js").then((n) => n.r);
241
241
  await enablePhysics3D(engine);
242
242
  }
243
243
  const stepMs = 1e3 / (opts.fixedHz ?? 60);
@@ -1 +1 @@
1
- import{t as e}from"./index-DzYFgZbl.js";async function t(t){return new n((await e(()=>import(`./GameServer-C56iOUgF.js`),[],import.meta.url)).GameServer,t)}var n=class{raw;active=new Map;reconnecting=!1;disposed=!1;constructor(e,t){this.raw=new e({...t})}get account(){return this.raw.account}get connected(){return this.raw.connected}connect(){return this.raw.connected?Promise.resolve(!0):(this.disposed=!1,this.rawConnect())}rawConnect(){return this.raw.connect({onDisconnect:()=>void this.reconnect()})}disconnect(){this.disposed=!0;for(let e of this.active.values())e.off();return this.active.clear(),this.raw.disconnect()}remoteFunction(e,t,n){return this.raw.remoteFunction(e,t,n)}track(e){let t=Symbol(`sub`),n={make:e,off:e()};return this.active.set(t,n),()=>{n.off(),this.active.delete(t)}}async reconnect(){if(!this.disposed&&!this.reconnecting){this.reconnecting=!0;try{await this.rawConnect();for(let e of this.active.values())e.off(),e.off=e.make()}finally{this.reconnecting=!1}}}subscribeRoomState(e,t){return this.track(()=>this.raw.subscribeRoomState(e,t))}subscribeRoomMyState(e,t){return this.track(()=>this.raw.subscribeRoomMyState(e,t))}subscribeRoomAllUserStates(e,t){return this.track(()=>this.raw.subscribeRoomAllUserStates(e,e=>{let n={};for(let t of e??[]){if(!t||typeof t.account!=`string`||t.__leaved)continue;let{account:e,__updated:r,__leaved:i,...a}=t;n[e]=a}t(n)}))}subscribeRoomCollection(e,t,n){return this.track(()=>this.raw.subscribeRoomCollection(e,t,({items:e})=>{let t={};for(let n of e??[])n&&typeof n.__id==`string`&&(t[n.__id]=n);n(t)}))}onRoomMessage(e,t,n){return this.track(()=>this.raw.onRoomMessage(e,t,n))}onRoomUserJoin(e,t){return this.track(()=>this.raw.onRoomUserJoin(e,t))}onRoomUserLeave(e,t){return this.track(()=>this.raw.onRoomUserLeave(e,t))}subscribeGlobalState(e){return this.track(()=>this.raw.subscribeGlobalState(e))}subscribeGlobalMyState(e){return this.track(()=>this.raw.subscribeGlobalMyState(e))}subscribeGlobalUserState(e,t){return this.track(()=>this.raw.subscribeGlobalUserState(e,t))}subscribeGlobalCollection(e,t){return this.track(()=>this.raw.subscribeGlobalCollection(e,({items:e})=>{let n={};for(let t of e??[])t&&typeof t.__id==`string`&&(n[t.__id]=t);t(n)}))}subscribeAsset(e,t){return this.track(()=>this.raw.subscribeAsset(e,t))}onGlobalMessage(e,t){return this.track(()=>this.raw.onGlobalMessage(e,t))}};export{t as createAgent8Server};
1
+ import{t as e}from"./index-CXFNanuR.js";async function t(t){return new n((await e(()=>import(`./GameServer-C56iOUgF.js`),[],import.meta.url)).GameServer,t)}var n=class{raw;active=new Map;reconnecting=!1;disposed=!1;constructor(e,t){this.raw=new e({...t})}get account(){return this.raw.account}get connected(){return this.raw.connected}connect(){return this.raw.connected?Promise.resolve(!0):(this.disposed=!1,this.rawConnect())}rawConnect(){return this.raw.connect({onDisconnect:()=>void this.reconnect()})}disconnect(){this.disposed=!0;for(let e of this.active.values())e.off();return this.active.clear(),this.raw.disconnect()}remoteFunction(e,t,n){return this.raw.remoteFunction(e,t,n)}track(e){let t=Symbol(`sub`),n={make:e,off:e()};return this.active.set(t,n),()=>{n.off(),this.active.delete(t)}}async reconnect(){if(!this.disposed&&!this.reconnecting){this.reconnecting=!0;try{await this.rawConnect();for(let e of this.active.values())e.off(),e.off=e.make()}finally{this.reconnecting=!1}}}subscribeRoomState(e,t){return this.track(()=>this.raw.subscribeRoomState(e,t))}subscribeRoomMyState(e,t){return this.track(()=>this.raw.subscribeRoomMyState(e,t))}subscribeRoomAllUserStates(e,t){return this.track(()=>this.raw.subscribeRoomAllUserStates(e,e=>{let n={};for(let t of e??[]){if(!t||typeof t.account!=`string`||t.__leaved)continue;let{account:e,__updated:r,__leaved:i,...a}=t;n[e]=a}t(n)}))}subscribeRoomCollection(e,t,n){return this.track(()=>this.raw.subscribeRoomCollection(e,t,({items:e})=>{let t={};for(let n of e??[])n&&typeof n.__id==`string`&&(t[n.__id]=n);n(t)}))}onRoomMessage(e,t,n){return this.track(()=>this.raw.onRoomMessage(e,t,n))}onRoomUserJoin(e,t){return this.track(()=>this.raw.onRoomUserJoin(e,t))}onRoomUserLeave(e,t){return this.track(()=>this.raw.onRoomUserLeave(e,t))}subscribeGlobalState(e){return this.track(()=>this.raw.subscribeGlobalState(e))}subscribeGlobalMyState(e){return this.track(()=>this.raw.subscribeGlobalMyState(e))}subscribeGlobalUserState(e,t){return this.track(()=>this.raw.subscribeGlobalUserState(e,t))}subscribeGlobalCollection(e,t){return this.track(()=>this.raw.subscribeGlobalCollection(e,({items:e})=>{let n={};for(let t of e??[])t&&typeof t.__id==`string`&&(n[t.__id]=t);t(n)}))}subscribeAsset(e,t){return this.track(()=>this.raw.subscribeAsset(e,t))}onGlobalMessage(e,t){return this.track(()=>this.raw.onGlobalMessage(e,t))}};export{t as createAgent8Server};