incanto 0.33.0 → 0.35.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.
Files changed (58) hide show
  1. package/dist/2d.d.ts +5 -5
  2. package/dist/2d.js +3 -3
  3. package/dist/3d.d.ts +122 -14
  4. package/dist/3d.js +5 -5
  5. package/dist/{audit-C4kmDK0o.js → audit-C5oZGAru.js} +37 -0
  6. package/dist/{behavior-CKwTCjfR.d.ts → behavior-CGSCWOHB.d.ts} +319 -22
  7. package/dist/{create-game-D2QU5x7S.js → create-game-B0Wfhi2-.js} +6 -5
  8. package/dist/{create-game-sFuTLqjD.js → create-game-BUD89Kqh.js} +20 -6
  9. package/dist/debug.d.ts +1 -1
  10. package/dist/{duplicate-BgnG1Lqz.js → duplicate-C716f-97.js} +1 -1
  11. package/dist/{editor-switch-BJb-CWfA.d.ts → editor-switch-DyXEtH36.d.ts} +1 -1
  12. package/dist/editor.js +1739 -1312
  13. package/dist/env.d.ts +1 -1
  14. package/dist/{environment-presets-CQtEGogB.js → environment-presets-TAGvmM3z.js} +240 -74
  15. package/dist/{errors-1dXlIwoR.d.ts → errors-BY2kL0hv.d.ts} +1 -1
  16. package/dist/{gameplay-BpQCbABv.js → gameplay-BvhcQbfJ.js} +75 -11
  17. package/dist/gameplay.d.ts +12 -5
  18. package/dist/gameplay.js +1 -1
  19. package/dist/index.d.ts +72 -7
  20. package/dist/index.js +6 -6
  21. package/dist/{loader-COn5fS0o.d.ts → loader-CUcj00M8.d.ts} +19 -2
  22. package/dist/{loader-Buk8Bu1h.js → loader-Mig5fY4n.js} +110 -18
  23. package/dist/net.d.ts +2 -2
  24. package/dist/net.js +3 -3
  25. package/dist/{particle-sim-CwJ5rI_P.d.ts → particle-sim-B-vZBF5R.d.ts} +1 -1
  26. package/dist/{pathfinding-DUw9mir9.d.ts → pathfinding-DgOo2KNF.d.ts} +1 -1
  27. package/dist/{physics-2d-DjXR5DMu.js → physics-2d-DqAclql-.js} +22 -9
  28. package/dist/{physics-3d-DF8npb1O.js → physics-3d-DxBH4sIF.js} +27 -11
  29. package/dist/react.d.ts +2 -2
  30. package/dist/react.js +1 -1
  31. package/dist/{register-CscIzJEO.js → register-BFLg0-_i.js} +697 -21
  32. package/dist/{register-CtI-itec.js → register-BjbPMA5B.js} +2 -2
  33. package/dist/{register-FIJtNbub.js → register-DSmIRAf7.js} +11 -5
  34. package/dist/{schema-CcoWb32N.d.ts → schema-3ywbdlrv.d.ts} +10 -0
  35. package/dist/{test-BRxLd2jH.js → test-9EokzbRd.js} +10 -10
  36. package/dist/test.d.ts +4 -4
  37. package/dist/test.js +2 -2
  38. package/dist/vite.js +1 -1
  39. package/editor/assets/{agent8-BdDP3xKW.js → agent8-D3_GWeuh.js} +1 -1
  40. package/editor/assets/{debug-DbjTyTlC.js → debug-CX0LDd1r.js} +1 -1
  41. package/editor/assets/index-CMlKFT0C.js +10773 -0
  42. package/editor/index.html +1 -1
  43. package/package.json +1 -1
  44. package/schemas/scene.schema.json +251 -6
  45. package/skills/incanto-assets.md +21 -0
  46. package/skills/incanto-behaviors-and-scripts.md +16 -0
  47. package/skills/incanto-editor.md +17 -1
  48. package/skills/incanto-gameplay-behaviors.md +6 -0
  49. package/skills/incanto-hud.md +73 -1
  50. package/skills/incanto-localization.md +132 -0
  51. package/skills/incanto-node-reference.md +78 -24
  52. package/skills/incanto-save-slots.md +152 -0
  53. package/templates-app/beacon-isle-3d/package.json +1 -1
  54. package/templates-app/tps-3d/package.json +1 -1
  55. package/templates-app/village-quest-3d/PROJECT/Context.md +16 -0
  56. package/templates-app/village-quest-3d/package.json +1 -1
  57. package/templates-app/village-quest-3d/src/village.scene.json +25 -3
  58. package/editor/assets/index-BWCudoz1.js +0 -10696
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
- import { m as diagnose } from "./loader-Buk8Bu1h.js";
2
+ import { h as diagnose } from "./loader-Mig5fY4n.js";
3
3
  import { t as IncantoError } from "./errors-BpWbnbb_.js";
4
- import { F as PhysicsBody3D, I as RigidBody3D, N as Area3D, P as CharacterBody3D, R as Node3D, z as validateCollider3D } from "./gameplay-BpQCbABv.js";
4
+ import { F as PhysicsBody3D, I as RigidBody3D, N as Area3D, P as CharacterBody3D, R as Node3D, z as validateCollider3D } from "./gameplay-BvhcQbfJ.js";
5
5
  import { n as registerDebugSource } from "./debug-draw-BM3DsvtT.js";
6
- import { A as Terrain3D, F as InstancedMesh3D, L as buildMeshGeometry, P as Joint3D } from "./environment-presets-CQtEGogB.js";
6
+ import { A as Terrain3D, F as InstancedMesh3D, L as buildMeshGeometry, P as Joint3D } from "./environment-presets-TAGvmM3z.js";
7
7
  import { Euler, Matrix4, Quaternion, Vector3 } from "three";
8
8
  //#region src/3d/physics/collider-lines.ts
9
9
  /**
@@ -528,17 +528,33 @@ var Physics3D = class {
528
528
  const scene = this.engine.scene;
529
529
  if (!scene) return;
530
530
  const version = scene.tree._structureVersion;
531
- const structureChanged = version !== this.lastStructure || scene.root !== this.lastRoot;
531
+ const sameRoot = scene.root === this.lastRoot;
532
+ const structureChanged = version !== this.lastStructure || !sameRoot;
532
533
  if (structureChanged) {
534
+ const delta = sameRoot ? scene.tree._structureSince(this.lastStructure) : null;
533
535
  this.lastStructure = version;
534
536
  this.lastRoot = scene.root;
535
- this.bodySet.clear();
536
- collectBodies(scene.root, this.bodySet);
537
- }
538
- if (structureChanged) {
539
- this.jointSet.clear();
540
- collectJoints(scene.root, this.jointSet);
541
- this.syncScatters(scene.root);
537
+ if (delta) {
538
+ let joints = false;
539
+ let scatters = false;
540
+ for (const { node, added } of delta) {
541
+ if (node instanceof PhysicsBody3D) if (added) this.bodySet.add(node);
542
+ else this.bodySet.delete(node);
543
+ if (node instanceof Joint3D) joints = true;
544
+ if (node instanceof InstancedMesh3D) scatters = true;
545
+ }
546
+ if (joints) {
547
+ this.jointSet.clear();
548
+ collectJoints(scene.root, this.jointSet);
549
+ }
550
+ if (scatters) this.syncScatters(scene.root);
551
+ } else {
552
+ this.bodySet.clear();
553
+ collectBodies(scene.root, this.bodySet);
554
+ this.jointSet.clear();
555
+ collectJoints(scene.root, this.jointSet);
556
+ this.syncScatters(scene.root);
557
+ }
542
558
  }
543
559
  const seen = this.bodySet;
544
560
  for (const node of seen) {
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { N as Scene, n as BehaviorCtor, v as Engine } from "./behavior-CKwTCjfR.js";
2
- import { c as JsonValue } from "./schema-CcoWb32N.js";
1
+ import { N as Scene, b as Engine, n as BehaviorCtor } from "./behavior-CGSCWOHB.js";
2
+ import { c as JsonValue } from "./schema-3ywbdlrv.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-sFuTLqjD.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-D2QU5x7S.js").then((n) => n.n)).createGame2D(o)))(opts);
159
+ const next = await (_gameFactory ?? (mode === "3d" ? async (o) => (await import("./create-game-BUD89Kqh.js").then((n) => n.n)).createGame3D(o) : async (o) => (await import("./create-game-B0Wfhi2-.js").then((n) => n.n)).createGame2D(o)))(opts);
160
160
  if (disposed) {
161
161
  next.dispose();
162
162
  return;