@babylonjs/lite-compat 1.21.0-preview → 1.22.0-preview
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/index.d.ts +22 -0
- package/index.js +19 -7
- package/index.js.map +1 -1
- package/{meshes-eNVvq5sm.js → meshes-CidWpEh8.js} +6 -6
- package/meshes-CidWpEh8.js.map +1 -0
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-eNVvq5sm.js.map +0 -1
package/index.d.ts
CHANGED
|
@@ -2061,6 +2061,19 @@ declare interface GroundOptions {
|
|
|
2061
2061
|
subdivisions?: number;
|
|
2062
2062
|
}
|
|
2063
2063
|
|
|
2064
|
+
/**
|
|
2065
|
+
* Namespace-like object used to manipulate GUIDs, matching Babylon.js `GUID`.
|
|
2066
|
+
* Babylon.js declares `GUID` as a `const` object literal rather than a class, so the
|
|
2067
|
+
* compat layer mirrors that shape: consumers call `GUID.RandomId()` without `new`.
|
|
2068
|
+
*/
|
|
2069
|
+
export declare const GUID: {
|
|
2070
|
+
/**
|
|
2071
|
+
* Generate a pseudo-random RFC4122 v4 UUID. Alias of {@link RandomGUID}.
|
|
2072
|
+
* @returns a pseudo random id
|
|
2073
|
+
*/
|
|
2074
|
+
RandomId: typeof RandomGUID;
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2064
2077
|
export declare class HandConstraintBehavior {
|
|
2065
2078
|
constructor();
|
|
2066
2079
|
}
|
|
@@ -3668,6 +3681,15 @@ export declare class QuinticEase extends EasingFunction {
|
|
|
3668
3681
|
easeInCore(gradient: number): number;
|
|
3669
3682
|
}
|
|
3670
3683
|
|
|
3684
|
+
/** Babylon.js-compatible GUID helpers (`@babylonjs/core` `Misc/guid`). */
|
|
3685
|
+
/**
|
|
3686
|
+
* Generate a pseudo-random RFC4122 v4 UUID, matching Babylon.js `RandomGUID`.
|
|
3687
|
+
* Be aware `Math.random()` could cause collisions, but all except 6 of the 128 bits are
|
|
3688
|
+
* randomly generated, so any two ids have a 1 in 2^122 chance of colliding.
|
|
3689
|
+
* @returns a pseudo random id
|
|
3690
|
+
*/
|
|
3691
|
+
export declare function RandomGUID(): string;
|
|
3692
|
+
|
|
3671
3693
|
/**
|
|
3672
3694
|
* Babylon.js `RawTexture` — a texture created from raw pixel bytes. Backed by
|
|
3673
3695
|
* Babylon Lite's `createTexture2DFromPixels`; the GPU handle is available
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { V as Vector3, u as unsupported, L as LiteCompatError, N as Node, M as Matrix, C as Color3, S as StandardMaterial, a as Color4, b as Mesh, T as TransformNode, l as liteBackedVector3, Q as Quaternion } from "./meshes-
|
|
5
|
-
import { A, B, c, d, e, f, g, h, i, j, k, m, n, o, p, q, G, I, r, s, t, P, v, w, x, y, z, D, E, F, H, J, K, O, R } from "./meshes-
|
|
4
|
+
import { V as Vector3, u as unsupported, L as LiteCompatError, N as Node, M as Matrix, C as Color3, S as StandardMaterial, a as Color4, b as Mesh, T as TransformNode, l as liteBackedVector3, Q as Quaternion } from "./meshes-CidWpEh8.js";
|
|
5
|
+
import { A, B, c, d, e, f, g, h, i, j, k, m, n, o, p, q, G, I, r, s, t, P, v, w, x, y, z, D, E, F, H, J, K, O, R } from "./meshes-CidWpEh8.js";
|
|
6
6
|
import { VERSION, createEngine, onBeforeRender, stopEngine, resizeEngine, setEngineSize, disposeEngine, uploadImageToArrayLayer, enableMirroredMeshes, registerSceneWithShadowSupport, registerScene, startEngine, createNullEngine, stepScene, setPhysicsTimestep, setPhysicsGravity, disposePhysics, createHavokWorld, createArcRotateCamera, attachControl, getCameraPosition, getViewMatrix, getProjectionMatrix, createGeospatialCamera, setGeospatialOrientation, attachGeospatialControls, createFreeCamera, attachFreeControl, setAnimationAdditive, playAnimation, pauseAnimation, goToFrame, stopAnimation, createSceneContext, updateAnimationManager, setFog, setClipPlane, loadHdrEnvironment, loadDdsEnvironment, loadEnvironment, createDefaultCamera, addToScene, createHemisphericLight, createAnimationManager, enableAnimationBlending, addAnimationGroup, disposeScene, createDirectionalLight, createPointLight, createSpotLight, createClusteredLightContainer, createClusteredPointLight, removeFromScene, addClusteredLightContainer, markClusteredLightContainerDirty, createCsgFromMesh, csgSubtract, csgIntersect, csgUnion, createMeshFromCsg, createCsg2FromMesh, csg2Subtract, csg2Intersect, csg2Add, createMeshesFromCsg2, disposeCsg2, initializeCsg2Async, createMorphTargets, setMorphTargetWeights, createTransformNode, bakeCurrentTransformIntoVertices, loadSOG, loadSPZ, loadSplat, createDynamicTexture, updateDynamicTexture, createTexture2DFromPixels, updateTexture2DFromPixels, createTexture3DFromPixels, loadBasisTexture2D, loadKtxTexture2D, loadTexture2D, createTexture2DArrayFromUrls, createTexture2DArrayFromKtx2, loadImageToArrayLayer, createTexture2DArray, createTexture2DArrayFromPixels, updateTexture2DArrayFromPixels, loadBabylon, loadGltf, resetVariant, getVariantNames, selectVariant, disposePicker, createGpuPicker, pickAsync, createAxisDragGizmo, attachAxisDragGizmoToNode, disposeAxisDragGizmo, createAxisScaleGizmo, attachAxisScaleGizmoToNode, disposeAxisScaleGizmo, createBoundingBoxGizmo, attachBoundingBoxGizmoToNode, disposeBoundingBoxGizmo, createCameraGizmo, attachCameraGizmoToCamera, disposeCameraGizmo, createLightGizmo, attachLightGizmoToLight, disposeLightGizmo, createPlaneDragGizmo, attachPlaneDragGizmoToNode, disposePlaneDragGizmo, createPlaneRotationGizmo, attachPlaneRotationGizmoToNode, disposePlaneRotationGizmo, createPositionGizmo, setPositionGizmoLocalCoordinates, attachPositionGizmoToNode, disposePositionGizmo, createRotationGizmo, setRotationGizmoLocalCoordinates, attachRotationGizmoToNode, disposeRotationGizmo, createScaleGizmo, setScaleGizmoLocalCoordinates, attachScaleGizmoToNode, disposeScaleGizmo, createUtilityLayer, registerUtilityLayer, disposeUtilityLayer, addBillboardSpriteIndex, updateBillboardSpriteIndex, loadSpriteAtlas, createFacingBillboardSystem, addFacingBillboardSystem, billboardBlendAdditive, billboardBlendAlpha, spriteBlendPremultiplied, spriteBlendAdditive, spriteBlendAlpha, createSprite2DLayer, addSprite2DIndex, createSpriteRenderer, registerSpriteRenderer, updateSprite2DIndex, createPcfSpotlightShadowGenerator, createPcfDirectionalShadowGenerator, createEsmDirectionalShadowGenerator, setShadowTaskCasterMeshes, parseNodeMaterialFromSnippet, createGridMaterial, getByteFrequencyData, getFloatFrequencyData, getByteTimeDomainData, getFloatTimeDomainData, enableAnalyzer, setSpatialPosition, setSpatialOrientation, enableSpatial, setSpatialListenerPosition, setSpatialListener, updateSpatialAudio, enableStereo, setStereoPan, disposeAudioBus, setBusVolume, getMasterVolume, setMasterVolume, unlockAudioEngineAsync, createSoundAsync, createSoundBufferAsync, createStreamingSoundAsync, createAudioBusAsync, createSoundSourceAsync, createMicrophoneSoundSourceAsync, disposeAudioEngine, createAudioEngineAsync, disposeSoundSource, setSoundSourceVolume, playSound, pauseSound, resumeSound, stopSound, disposeSound, setSoundVolume, playStreamingSound, pauseStreamingSound, resumeStreamingSound, stopStreamingSound, preloadStreamingInstanceAsync, preloadStreamingInstancesAsync, disposeStreamingSound, setStreamingSoundVolume, startParticleSystem, animateParticleSystem, stopParticleSystem, createParticleBillboard, syncParticleBillboard, parseNodeParticleSetFromSnippet, registerNodeParticleSet } from "@babylonjs/lite";
|
|
7
7
|
const Epsilon = 1e-3;
|
|
8
8
|
const ToRadians = Math.PI / 180;
|
|
@@ -5908,6 +5908,20 @@ class BounceEase extends EasingFunction {
|
|
|
5908
5908
|
return -Math.pow(1 / bounciness, num - num7) / (num13 * num13) * (num12 - num13) * (num12 + num13);
|
|
5909
5909
|
}
|
|
5910
5910
|
}
|
|
5911
|
+
function RandomGUID() {
|
|
5912
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c2) => {
|
|
5913
|
+
const r2 = Math.random() * 16 | 0;
|
|
5914
|
+
const v2 = c2 === "x" ? r2 : r2 & 3 | 8;
|
|
5915
|
+
return v2.toString(16);
|
|
5916
|
+
});
|
|
5917
|
+
}
|
|
5918
|
+
const GUID = {
|
|
5919
|
+
/**
|
|
5920
|
+
* Generate a pseudo-random RFC4122 v4 UUID. Alias of {@link RandomGUID}.
|
|
5921
|
+
* @returns a pseudo random id
|
|
5922
|
+
*/
|
|
5923
|
+
RandomId: RandomGUID
|
|
5924
|
+
};
|
|
5911
5925
|
const Tools = {
|
|
5912
5926
|
/** High-resolution timestamp in milliseconds. */
|
|
5913
5927
|
Now() {
|
|
@@ -5925,11 +5939,7 @@ const Tools = {
|
|
|
5925
5939
|
},
|
|
5926
5940
|
/** Generate an RFC4122 v4 UUID (used by Babylon.js for unique ids). */
|
|
5927
5941
|
RandomId() {
|
|
5928
|
-
return
|
|
5929
|
-
const r2 = Math.random() * 16 | 0;
|
|
5930
|
-
const v2 = c2 === "x" ? r2 : r2 & 3 | 8;
|
|
5931
|
-
return v2.toString(16);
|
|
5932
|
-
});
|
|
5942
|
+
return RandomGUID();
|
|
5933
5943
|
}
|
|
5934
5944
|
};
|
|
5935
5945
|
const ActionManagerTriggers = {
|
|
@@ -8226,6 +8236,7 @@ export {
|
|
|
8226
8236
|
FxaaPostProcess,
|
|
8227
8237
|
GPUParticleSystem,
|
|
8228
8238
|
GPUPicker,
|
|
8239
|
+
GUID,
|
|
8229
8240
|
GamepadCamera,
|
|
8230
8241
|
GaussianSplattingMesh,
|
|
8231
8242
|
GaussianSplattingStream,
|
|
@@ -8332,6 +8343,7 @@ export {
|
|
|
8332
8343
|
QuarticEase,
|
|
8333
8344
|
Quaternion,
|
|
8334
8345
|
QuinticEase,
|
|
8346
|
+
RandomGUID,
|
|
8335
8347
|
RawTexture,
|
|
8336
8348
|
RawTexture2DArray,
|
|
8337
8349
|
RawTexture3D,
|