@ringozz/godot 4.7.2-646 → 4.7.2-652

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ringozz/godot",
3
3
  "author": "Vladimir Davidovich",
4
- "version": "4.7.2-646",
4
+ "version": "4.7.2-652",
5
5
  "description": "Node-API bindings for Godot Engine — call Godot classes from JavaScript",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -66,9 +66,9 @@
66
66
  "precision": "single"
67
67
  },
68
68
  "optionalDependencies": {
69
- "@ringozz/godot-macos-arm64": "^4.7.2-646",
70
- "@ringozz/godot-windows-x86_64": "^4.7.2-646",
71
- "@ringozz/godot-web-wasm32": "^4.7.2-646"
69
+ "@ringozz/godot-macos-arm64": "^4.7.2-652",
70
+ "@ringozz/godot-windows-x86_64": "^4.7.2-652",
71
+ "@ringozz/godot-web-wasm32": "^4.7.2-652"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@types/bun": "*"
package/src/assets.d.ts CHANGED
@@ -52,6 +52,13 @@ declare module '*.gltf' {
52
52
  export const materialize: Promise<unknown>;
53
53
  }
54
54
 
55
+ declare module '*.gltfx' {
56
+ import type { PackedScene } from '@ringozz/godot/PackedScene';
57
+ const asset: Promise<PackedScene>;
58
+ export default asset;
59
+ export const materialize: Promise<unknown>;
60
+ }
61
+
55
62
  declare module '*.tscn' {
56
63
  import type { PackedScene } from '@ringozz/godot/PackedScene';
57
64
  const asset: Promise<PackedScene>;
package/src/dump-deps.gd CHANGED
@@ -16,7 +16,11 @@ extends SceneTree
16
16
  ## GODOT_DUMP_OUT – output res:// path (default res://.godot/packs/deps.json)
17
17
  ## GODOT_DUMP_ROOTS – comma-separated res:// roots to scan (default res://)
18
18
 
19
- const PACKED := ["tscn", "tres", "gltf", "obj", "gd", "gdshader", "gdshaderinc", "ttf", "otf", "po"]
19
+ ## Imported source extensions: `_classify` recurses into these (an imported source's own deps are
20
+ ## empty — its *product* carries the refs) where any other extension with a sidecar is a loose texture.
21
+ ## `gltfx` is a scene-composition source and `gltfxmesh` a shared-mesh one: their products reference the
22
+ ## meshes and textures they compose.
23
+ const PACKED := ["tscn", "tres", "gltf", "gltfx", "gltfxmesh", "obj", "gd", "gdshader", "gdshaderinc", "ttf", "otf", "po"]
20
24
  const SCANNED := ["tscn", "tres", "gd", "gdshader", "gdshaderinc", "gltf", "obj"]
21
25
 
22
26
 
package/src/preload.ts CHANGED
@@ -31,6 +31,9 @@ const NS = 'godot';
31
31
  /** Extension -> class. `loose` = WebP-backed texture excluded from the pack, staged/transcoded per-file. */
32
32
  const FORMATS: Record<string, { cls?: string; loose?: boolean }> = {
33
33
  gltf: { cls: 'PackedScene' },
34
+ // A scene-composition document (a glTF External Reference): an imported source whose product is a
35
+ // `PackedScene`, like a `.gltf`'s — and whose product is where its meshes/textures are referenced.
36
+ gltfx: { cls: 'PackedScene' },
34
37
  tscn: { cls: 'PackedScene' },
35
38
  obj: { cls: 'PackedScene' },
36
39
  gd: { cls: 'GDScript' },