@kirknock/node-openxr-babylonjs 0.3.1 → 0.3.5
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 +19 -2
- package/dist/babylon-fixes.d.ts +51 -0
- package/dist/babylon-fixes.js +82 -0
- package/dist/babylon-fixes.js.map +1 -0
- package/dist/babylon-namespace.d.ts +31 -0
- package/dist/babylon-namespace.js +42 -0
- package/dist/babylon-namespace.js.map +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,8 +6,25 @@
|
|
|
6
6
|
Plain browser-style Babylon.js WebXR helpers the node-openxr demo app is
|
|
7
7
|
built from: `create-engine`, `xr` (WebXRDefaultExperience setup),
|
|
8
8
|
`list-files`, `load-asset`, `asset-slideshow`, `dot-grid-floor`,
|
|
9
|
-
`controller-visuals`, `controller-log
|
|
10
|
-
|
|
9
|
+
`controller-visuals`, `controller-log`, and `babylon-namespace` (the UMD
|
|
10
|
+
bundles' `BABYLON` global, `BABYLON.Debug` and `BABYLON.GLTF2.Loader.Extensions`
|
|
11
|
+
included, built from the ES modules for snippet-style code). Imports only
|
|
12
|
+
`@babylonjs/*` (peer dependencies), so it runs in a browser unchanged.
|
|
13
|
+
|
|
14
|
+
`babylon-fixes` fixes bugs in Babylon.js itself until a Babylon.js release has
|
|
15
|
+
them. Each one is described in `src/babylon-fixes.ts`:
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import * as core from "@babylonjs/core";
|
|
19
|
+
import { installBabylonFixes } from "@kirknock/node-openxr-babylonjs/babylon-fixes.js";
|
|
20
|
+
installBabylonFixes(core); // once, before engines render
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- **`setAlphaMode(-1)` blends additively on WebGPU** (9.33.2, still in 9.38.1).
|
|
24
|
+
Restoring a saved alpha mode that was never set (−1, as IBL shadows'
|
|
25
|
+
voxelization does) turned on blending without blend factors, which WebGPU
|
|
26
|
+
maps to ONE + ONE, so IBL shadows washed the frame out to white. With the
|
|
27
|
+
fix, a negative mode means `ALPHA_DISABLE`.
|
|
11
28
|
|
|
12
29
|
## Install
|
|
13
30
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixes for bugs in Babylon.js itself (not in the node-openxr platform),
|
|
3
|
+
* applied to the app's copy of @babylonjs/core until Babylon.js has them.
|
|
4
|
+
*
|
|
5
|
+
* import * as core from "@babylonjs/core";
|
|
6
|
+
* installBabylonFixes(core);
|
|
7
|
+
*
|
|
8
|
+
* Call it once, after @babylonjs/core is loaded and before engines render.
|
|
9
|
+
* Each fix patches a prototype, so it reaches every engine, including those
|
|
10
|
+
* created earlier. Calling it again does nothing.
|
|
11
|
+
*
|
|
12
|
+
* ## setAlphaMode(-1) turns blending on without blend factors (Babylon.js 9.33.2, still in 9.38.1)
|
|
13
|
+
*
|
|
14
|
+
* An engine's alpha mode starts as -1, "never set" (AbstractEngine._alphaMode
|
|
15
|
+
* is Array(8).fill(-1)), and getAlphaMode() returns it as it is. Code that
|
|
16
|
+
* saves the mode and restores it afterwards therefore calls setAlphaMode(-1)
|
|
17
|
+
* on an engine where nothing set a mode before. One such place is
|
|
18
|
+
* IblShadowsVoxelRenderer._copyMipMap, after every voxelization of the IBL
|
|
19
|
+
* shadows:
|
|
20
|
+
*
|
|
21
|
+
* const previousAlphaMode = this._engine.getAlphaMode(); // -1
|
|
22
|
+
* this._engine.setAlphaMode(Constants.ALPHA_DISABLE);
|
|
23
|
+
* ... copy the voxel grid's mips ...
|
|
24
|
+
* this._engine.setAlphaMode(previousAlphaMode); // setAlphaMode(-1)
|
|
25
|
+
*
|
|
26
|
+
* setAlphaMode() treats every mode other than ALPHA_DISABLE (0) as "blending
|
|
27
|
+
* on" (alphaBlend = mode !== 0), and AlphaState.setAlphaMode() sets blend
|
|
28
|
+
* factors only for the known modes, so after -1 blending is on and the factors
|
|
29
|
+
* are still null.
|
|
30
|
+
*
|
|
31
|
+
* - **WebGPU:** WebGPUCacheRenderPipeline._GetAphaBlendFactor maps a null
|
|
32
|
+
* factor to "one", so every following pass blends ONE + ONE. Babylon's IBL
|
|
33
|
+
* shadows then wash the frame out to white: the voxel tracing output
|
|
34
|
+
* saturates to "no shadow", the shadow accumulation (a half-float texture
|
|
35
|
+
* that isn't cleared) grows by one every frame, and the materials multiply
|
|
36
|
+
* their lighting by it. Babylon's tests "IBL Voxel Shadowing" (three of them)
|
|
37
|
+
* and "IBL Screen-space Shadowing" (two) fail by 85-88 % of pixels.
|
|
38
|
+
* - **WebGL:** nothing shows, because gl.blendFunc keeps its default (ONE,
|
|
39
|
+
* ZERO), which replaces the target as if blending were off.
|
|
40
|
+
*
|
|
41
|
+
* The fix: setAlphaMode() takes a negative mode as ALPHA_DISABLE, so that
|
|
42
|
+
* restoring a mode that was never set leaves blending off, as it was before.
|
|
43
|
+
* Every save-and-restore of getAlphaMode() is covered, not only _copyMipMap.
|
|
44
|
+
* With it the five tests pass on WebGPU (0.00-1.29 %).
|
|
45
|
+
*
|
|
46
|
+
* Remove the fix once the Babylon.js version in use has its own.
|
|
47
|
+
*/
|
|
48
|
+
type Namespace = Record<string, unknown>;
|
|
49
|
+
/** Applies the fixes above to `core`, the @babylonjs/core module. Returns the names of the fixes applied. */
|
|
50
|
+
export declare function installBabylonFixes(core: Namespace): string[];
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fixes for bugs in Babylon.js itself (not in the node-openxr platform),
|
|
3
|
+
* applied to the app's copy of @babylonjs/core until Babylon.js has them.
|
|
4
|
+
*
|
|
5
|
+
* import * as core from "@babylonjs/core";
|
|
6
|
+
* installBabylonFixes(core);
|
|
7
|
+
*
|
|
8
|
+
* Call it once, after @babylonjs/core is loaded and before engines render.
|
|
9
|
+
* Each fix patches a prototype, so it reaches every engine, including those
|
|
10
|
+
* created earlier. Calling it again does nothing.
|
|
11
|
+
*
|
|
12
|
+
* ## setAlphaMode(-1) turns blending on without blend factors (Babylon.js 9.33.2, still in 9.38.1)
|
|
13
|
+
*
|
|
14
|
+
* An engine's alpha mode starts as -1, "never set" (AbstractEngine._alphaMode
|
|
15
|
+
* is Array(8).fill(-1)), and getAlphaMode() returns it as it is. Code that
|
|
16
|
+
* saves the mode and restores it afterwards therefore calls setAlphaMode(-1)
|
|
17
|
+
* on an engine where nothing set a mode before. One such place is
|
|
18
|
+
* IblShadowsVoxelRenderer._copyMipMap, after every voxelization of the IBL
|
|
19
|
+
* shadows:
|
|
20
|
+
*
|
|
21
|
+
* const previousAlphaMode = this._engine.getAlphaMode(); // -1
|
|
22
|
+
* this._engine.setAlphaMode(Constants.ALPHA_DISABLE);
|
|
23
|
+
* ... copy the voxel grid's mips ...
|
|
24
|
+
* this._engine.setAlphaMode(previousAlphaMode); // setAlphaMode(-1)
|
|
25
|
+
*
|
|
26
|
+
* setAlphaMode() treats every mode other than ALPHA_DISABLE (0) as "blending
|
|
27
|
+
* on" (alphaBlend = mode !== 0), and AlphaState.setAlphaMode() sets blend
|
|
28
|
+
* factors only for the known modes, so after -1 blending is on and the factors
|
|
29
|
+
* are still null.
|
|
30
|
+
*
|
|
31
|
+
* - **WebGPU:** WebGPUCacheRenderPipeline._GetAphaBlendFactor maps a null
|
|
32
|
+
* factor to "one", so every following pass blends ONE + ONE. Babylon's IBL
|
|
33
|
+
* shadows then wash the frame out to white: the voxel tracing output
|
|
34
|
+
* saturates to "no shadow", the shadow accumulation (a half-float texture
|
|
35
|
+
* that isn't cleared) grows by one every frame, and the materials multiply
|
|
36
|
+
* their lighting by it. Babylon's tests "IBL Voxel Shadowing" (three of them)
|
|
37
|
+
* and "IBL Screen-space Shadowing" (two) fail by 85-88 % of pixels.
|
|
38
|
+
* - **WebGL:** nothing shows, because gl.blendFunc keeps its default (ONE,
|
|
39
|
+
* ZERO), which replaces the target as if blending were off.
|
|
40
|
+
*
|
|
41
|
+
* The fix: setAlphaMode() takes a negative mode as ALPHA_DISABLE, so that
|
|
42
|
+
* restoring a mode that was never set leaves blending off, as it was before.
|
|
43
|
+
* Every save-and-restore of getAlphaMode() is covered, not only _copyMipMap.
|
|
44
|
+
* With it the five tests pass on WebGPU (0.00-1.29 %).
|
|
45
|
+
*
|
|
46
|
+
* Remove the fix once the Babylon.js version in use has its own.
|
|
47
|
+
*/
|
|
48
|
+
/** Babylon's ALPHA_DISABLE (Constants.ALPHA_DISABLE). */
|
|
49
|
+
const ALPHA_DISABLE = 0;
|
|
50
|
+
/** Marks a setAlphaMode() this module has already wrapped. */
|
|
51
|
+
const FIXED = Symbol.for("node-openxr-babylonjs.setAlphaModeNegativeIsDisable");
|
|
52
|
+
/**
|
|
53
|
+
* The engine classes whose prototype chains hold a setAlphaMode(): ThinEngine's
|
|
54
|
+
* for WebGL, ThinWebGPUEngine's for WebGPU (not exported, so reached through
|
|
55
|
+
* WebGPUEngine), NullEngine's own.
|
|
56
|
+
*/
|
|
57
|
+
const ENGINE_CLASSES = ["ThinEngine", "Engine", "WebGPUEngine", "NullEngine", "AbstractEngine"];
|
|
58
|
+
/** Applies the fixes above to `core`, the @babylonjs/core module. Returns the names of the fixes applied. */
|
|
59
|
+
export function installBabylonFixes(core) {
|
|
60
|
+
const applied = [];
|
|
61
|
+
const seen = new Set();
|
|
62
|
+
for (const name of ENGINE_CLASSES) {
|
|
63
|
+
const engineClass = core[name];
|
|
64
|
+
for (let proto = engineClass?.prototype; proto && proto !== Object.prototype; proto = Object.getPrototypeOf(proto)) {
|
|
65
|
+
if (seen.has(proto) || !Object.prototype.hasOwnProperty.call(proto, "setAlphaMode"))
|
|
66
|
+
continue;
|
|
67
|
+
seen.add(proto);
|
|
68
|
+
const original = proto.setAlphaMode;
|
|
69
|
+
if (typeof original !== "function" || original[FIXED])
|
|
70
|
+
continue;
|
|
71
|
+
const fixed = function (mode, ...rest) {
|
|
72
|
+
// -1 is "never set", what getAlphaMode() returns on a new engine: restoring it means no blending.
|
|
73
|
+
return original.call(this, mode < 0 ? ALPHA_DISABLE : mode, ...rest);
|
|
74
|
+
};
|
|
75
|
+
fixed[FIXED] = true;
|
|
76
|
+
proto.setAlphaMode = fixed;
|
|
77
|
+
applied.push(`setAlphaMode(-1) is ALPHA_DISABLE (${proto.constructor.name})`);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return applied;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=babylon-fixes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babylon-fixes.js","sourceRoot":"","sources":["../src/babylon-fixes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAIH,yDAAyD;AACzD,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,8DAA8D;AAC9D,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;AAIhF;;;;GAIG;AACH,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAEhG,6GAA6G;AAC7G,MAAM,UAAU,mBAAmB,CAAC,IAAe;IACjD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAuC,CAAC;QACrE,KAAK,IAAI,KAAK,GAAG,WAAW,EAAE,SAAS,EAAE,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAW,EAAE,CAAC;YAC7H,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC;gBAAE,SAAS;YAC9F,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAChB,MAAM,QAAQ,GAAI,KAAwC,CAAC,YAAY,CAAC;YACxE,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,QAAQ,CAAC,KAAK,CAAC;gBAAE,SAAS;YAChE,MAAM,KAAK,GAAiB,UAAyB,IAAY,EAAE,GAAG,IAAe;gBACnF,kGAAkG;gBAClG,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;YACvE,CAAC,CAAC;YACF,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;YACnB,KAAwC,CAAC,YAAY,GAAG,KAAK,CAAC;YAC/D,OAAO,CAAC,IAAI,CAAC,sCAAsC,KAAK,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC;QAChF,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `BABYLON` global of Babylon.js's UMD bundles (babylon.js plus
|
|
3
|
+
* babylonjs.loaders, .gui, .materials, ...), built from the ES module
|
|
4
|
+
* packages, for code written against the global: playground snippets,
|
|
5
|
+
* Babylon's own test scenes, older samples.
|
|
6
|
+
*
|
|
7
|
+
* Most of it is the packages' exports merged into one object. What the UMD
|
|
8
|
+
* entry points add on top, and the ES modules export flat instead:
|
|
9
|
+
* - BABYLON.Debug: AxesViewer, BoneAxesViewer, PhysicsViewer, RayHelper,
|
|
10
|
+
* SkeletonViewer, DirectionalLightFrustumViewer, ... (core Legacy/legacy.ts)
|
|
11
|
+
* - BABYLON.GLTF2.Loader and BABYLON.GLTF2.Loader.Extensions: the glTF 2.0
|
|
12
|
+
* loader's extension classes (loaders legacy/legacy-glTF2.ts)
|
|
13
|
+
* - BABYLON.GUI: @babylonjs/gui, when given
|
|
14
|
+
*
|
|
15
|
+
* Plain Babylon.js, usable in a browser as well. Pass the module namespaces:
|
|
16
|
+
*
|
|
17
|
+
* const BABYLON = createBabylonNamespace({ core, loaders, gui, materials, ... });
|
|
18
|
+
*/
|
|
19
|
+
type Namespace = Record<string, unknown>;
|
|
20
|
+
export interface BabylonModules {
|
|
21
|
+
/** `import * as core from "@babylonjs/core"` */
|
|
22
|
+
core: Namespace;
|
|
23
|
+
/** `@babylonjs/loaders`: its GLTF2 namespace gains Loader and Loader.Extensions. */
|
|
24
|
+
loaders?: Namespace;
|
|
25
|
+
/** `@babylonjs/gui`, as BABYLON.GUI */
|
|
26
|
+
gui?: Namespace;
|
|
27
|
+
/** Packages merged flat, as their UMD bundles add to BABYLON: materials, procedural-textures, post-processes, serializers, ... */
|
|
28
|
+
others?: Namespace[];
|
|
29
|
+
}
|
|
30
|
+
export declare function createBabylonNamespace({ core, loaders, gui, others }: BabylonModules): Namespace;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `BABYLON` global of Babylon.js's UMD bundles (babylon.js plus
|
|
3
|
+
* babylonjs.loaders, .gui, .materials, ...), built from the ES module
|
|
4
|
+
* packages, for code written against the global: playground snippets,
|
|
5
|
+
* Babylon's own test scenes, older samples.
|
|
6
|
+
*
|
|
7
|
+
* Most of it is the packages' exports merged into one object. What the UMD
|
|
8
|
+
* entry points add on top, and the ES modules export flat instead:
|
|
9
|
+
* - BABYLON.Debug: AxesViewer, BoneAxesViewer, PhysicsViewer, RayHelper,
|
|
10
|
+
* SkeletonViewer, DirectionalLightFrustumViewer, ... (core Legacy/legacy.ts)
|
|
11
|
+
* - BABYLON.GLTF2.Loader and BABYLON.GLTF2.Loader.Extensions: the glTF 2.0
|
|
12
|
+
* loader's extension classes (loaders legacy/legacy-glTF2.ts)
|
|
13
|
+
* - BABYLON.GUI: @babylonjs/gui, when given
|
|
14
|
+
*
|
|
15
|
+
* Plain Babylon.js, usable in a browser as well. Pass the module namespaces:
|
|
16
|
+
*
|
|
17
|
+
* const BABYLON = createBabylonNamespace({ core, loaders, gui, materials, ... });
|
|
18
|
+
*/
|
|
19
|
+
/** The names core's Debug namespace holds in the UMD bundle (Debug/index.ts). */
|
|
20
|
+
const DEBUG_NAMES = ["AxesViewer", "BoneAxesViewer", "DebugLayer", "DebugLayerTab", "PhysicsViewer", "RayHelper", "SkeletonViewer", "DirectionalLightFrustumViewer"];
|
|
21
|
+
export function createBabylonNamespace({ core, loaders, gui, others = [] }) {
|
|
22
|
+
const BABYLON = { ...core, ...(loaders ?? {}) };
|
|
23
|
+
for (const module of others)
|
|
24
|
+
Object.assign(BABYLON, module);
|
|
25
|
+
if (gui !== undefined)
|
|
26
|
+
BABYLON.GUI = { ...gui };
|
|
27
|
+
const debug = {};
|
|
28
|
+
for (const name of DEBUG_NAMES)
|
|
29
|
+
if (core[name] !== undefined)
|
|
30
|
+
debug[name] = core[name];
|
|
31
|
+
BABYLON.Debug = debug;
|
|
32
|
+
const gltf2 = loaders?.GLTF2;
|
|
33
|
+
if (gltf2 !== undefined) {
|
|
34
|
+
// The UMD bundle's GLTF2.Loader.Extensions holds the extension classes
|
|
35
|
+
// (KHR_*, EXT_*, MSFT_*, ExtrasAsMetadata, ...); GLTF2 itself has them too,
|
|
36
|
+
// so the whole namespace serves for both lookups.
|
|
37
|
+
const extensions = { ...gltf2 };
|
|
38
|
+
BABYLON.GLTF2 = { ...gltf2, Loader: { ...gltf2, Extensions: extensions } };
|
|
39
|
+
}
|
|
40
|
+
return BABYLON;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=babylon-namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"babylon-namespace.js","sourceRoot":"","sources":["../src/babylon-namespace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,iFAAiF;AACjF,MAAM,WAAW,GAAG,CAAC,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,+BAA+B,CAAC,CAAC;AAarK,MAAM,UAAU,sBAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,EAAE,EAAkB;IACxF,MAAM,OAAO,GAAc,EAAE,GAAG,IAAI,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;IAC3D,KAAK,MAAM,MAAM,IAAI,MAAM;QAAE,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5D,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;IAEhD,MAAM,KAAK,GAAc,EAAE,CAAC;IAC5B,KAAK,MAAM,IAAI,IAAI,WAAW;QAAE,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACvF,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;IAEtB,MAAM,KAAK,GAAG,OAAO,EAAE,KAA8B,CAAC;IACtD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,uEAAuE;QACvE,4EAA4E;QAC5E,kDAAkD;QAClD,MAAM,UAAU,GAAc,EAAE,GAAG,KAAK,EAAE,CAAC;QAC3C,OAAO,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;IAC7E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirknock/node-openxr-babylonjs",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Plain browser-style Babylon.js WebXR helpers (engine, default XR experience, asset loading and slideshow, floor, controller visuals and logging). Imports only @babylonjs/*.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"exports": {
|
|
26
26
|
"./*.js": {
|
|
27
|
+
"source": "./src/*.ts",
|
|
27
28
|
"types": "./dist/*.d.ts",
|
|
28
29
|
"default": "./dist/*.js"
|
|
29
30
|
},
|
|
@@ -42,7 +43,6 @@
|
|
|
42
43
|
"lint": "eslint src tests",
|
|
43
44
|
"test": "nodexr-test all",
|
|
44
45
|
"test:pure": "nodexr-test pure",
|
|
45
|
-
"push": "npm run build && npx --yes yalc@1.0.0-pre.53 publish --push",
|
|
46
46
|
"smoke:controller-log": "tsx tests/controller-log-smoke.ts",
|
|
47
47
|
"prepack": "npm run build"
|
|
48
48
|
},
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@babylonjs/core": "9.33.2",
|
|
55
55
|
"@babylonjs/loaders": "9.33.2",
|
|
56
|
-
"@kirknock/node-openxr-core": "^0.3.
|
|
56
|
+
"@kirknock/node-openxr-core": "^0.3.3",
|
|
57
57
|
"@napi-rs/canvas": "1.0.11",
|
|
58
58
|
"@types/node": "^24.0.0",
|
|
59
59
|
"@types/webxr": "^0.5.14",
|