@babylonjs/lite-compat 1.3.0-preview → 1.5.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/README.md +28 -28
- package/index.d.ts +24 -0
- package/index.js +4 -4
- package/index.js.map +1 -1
- package/{meshes-BkNs_oK5.js → meshes-a59_KvbH.js} +88 -2
- package/meshes-a59_KvbH.js.map +1 -0
- package/navigation.d.ts +24 -0
- package/navigation.js +1 -1
- package/package.json +4 -4
- package/meshes-BkNs_oK5.js.map +0 -1
package/README.md
CHANGED
|
@@ -108,52 +108,52 @@ overloads within a supported area may still be absent.
|
|
|
108
108
|
|
|
109
109
|
| Status | Meaning |
|
|
110
110
|
| ------ | ----------------------------------------------------------------------- |
|
|
111
|
-
| ✅
|
|
112
|
-
| ⚡
|
|
113
|
-
| ❌
|
|
111
|
+
| ✅ | Common surface implemented and tested where possible |
|
|
112
|
+
| ⚡ | A practical subset works; some properties/overloads are absent or throw |
|
|
113
|
+
| ❌ | Not supported on the current Lite API (throws `LiteCompatError`) |
|
|
114
114
|
|
|
115
115
|
### `@babylonjs/core`
|
|
116
116
|
|
|
117
117
|
| Feature area | Status | Notes |
|
|
118
118
|
| ------------------------------------------------------------------------------------------------------- | :----: | -------------------------------------------------------------------------------------------------------- |
|
|
119
|
-
| Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`) | ✅
|
|
120
|
-
| Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`) | ⚡
|
|
121
|
-
| Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡
|
|
122
|
-
| Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`) | ✅
|
|
123
|
-
| Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅
|
|
124
|
-
| Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF) | ⚡
|
|
125
|
-
| Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `VertexData`) | ⚡
|
|
126
|
-
| CSG / CSG2 | ✅
|
|
127
|
-
| Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`) | ⚡
|
|
128
|
-
| Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡
|
|
129
|
-
| Textures (`Texture`, `RawTexture`, `DynamicTexture`, `CubeTexture`) | ⚡
|
|
130
|
-
| Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend) | ⚡
|
|
131
|
-
| Morph targets (`MorphTarget` / `MorphTargetManager`) | ✅
|
|
132
|
-
| Sprites (`SpriteManager` / `Sprite`) | ⚡
|
|
133
|
-
| Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions) | ⚡
|
|
134
|
-
| Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`) | ✅
|
|
135
|
-
| Particles, post-processes, layers (glow/highlight), probes, physics, audio, WebXR | ❌
|
|
119
|
+
| Math (`Vector*`, `Color*`, `Quaternion`, `Matrix`, `Plane`, `Ray`, `Frustum`, `Scalar`, `Axis`/`Space`) | ✅ | `Angle` / `Curve3` / `Path3D` partial |
|
|
120
|
+
| Engine (`WebGPUEngine`, `Engine`, `ThinEngine`, `NullEngine`) | ⚡ | async startup + render loop; `beginFrame`/`endFrame` and manual `scene.render()` unsupported |
|
|
121
|
+
| Scene (clear color, cameras/lights, fog, environment, observables, ready state) | ⚡ | sync `scene.pick` unsupported (use async `GPUPicker`); some scene enumeration needs Lite core |
|
|
122
|
+
| Cameras (`ArcRotateCamera`, `FreeCamera`/`Universal`/`Target`, `FollowCamera`, `GeospatialCamera`) | ✅ | XR / device-orientation / stereoscopic rigs unsupported |
|
|
123
|
+
| Lights (`Hemispheric`, `Directional`, `Point`, `Spot`) | ✅ | `RectAreaLight` / clustered lights unsupported |
|
|
124
|
+
| Shadows (`ShadowGenerator` directional ESM/PCF, spot PCF) | ⚡ | `CascadedShadowGenerator` falls back to single cascade |
|
|
125
|
+
| Meshes & geometry (class chain, `MeshBuilder` primitives, transforms, thin instances, `VertexData`) | ⚡ | `CreateLines`/`CreateDecal`/`CreateText`, `InstancedMesh`, LOD/edges/outline, clone/instance unsupported |
|
|
126
|
+
| CSG / CSG2 | ✅ | over Lite boolean ops |
|
|
127
|
+
| Gizmos (position/rotation/scale/bounding-box/light/camera + `GizmoManager`) | ⚡ | over Lite gizmo suite |
|
|
128
|
+
| Materials (`StandardMaterial`, `PBRMaterial`, metallic-rough / spec-gloss, `NodeMaterial`) | ⚡ | `ShaderMaterial` (GLSL), `MultiMaterial`, `BackgroundMaterial` unsupported |
|
|
129
|
+
| Textures (`Texture`, `RawTexture`, `DynamicTexture`, `CubeTexture`) | ⚡ | `HDRCubeTexture` / `RenderTargetTexture` / `MirrorTexture` unsupported |
|
|
130
|
+
| Animation (keyframe `Animation`, easing, `Animatable`, `AnimationGroup` incl. weighted/additive blend) | ⚡ | CPU evaluation; loaded glTF skeletal blending supported |
|
|
131
|
+
| Morph targets (`MorphTarget` / `MorphTargetManager`) | ✅ | over Lite morph targets |
|
|
132
|
+
| Sprites (`SpriteManager` / `Sprite`) | ⚡ | camera-facing billboards; `SpriteMap` / packed atlas unsupported |
|
|
133
|
+
| Behaviors / Actions (`AutoRotation`, `Framing`, `ActionManager`, conditions) | ⚡ | `ActionManager` is manual-dispatch; drag behaviors need Lite core |
|
|
134
|
+
| Misc (`Observable`, `Tools`, `SmartArray`, `Tags`, gradients, `PerformanceMonitor`) | ✅ | |
|
|
135
|
+
| Particles, post-processes, layers (glow/highlight), probes, physics, audio, WebXR | ❌ | not in Babylon Lite — use native Lite `create*Task` / Havok-V2 functions |
|
|
136
136
|
|
|
137
137
|
### `@babylonjs/loaders`
|
|
138
138
|
|
|
139
139
|
| Feature area | Status | Notes |
|
|
140
140
|
| ---------------------------------------------------------------------------------------------- | :----: | --------------------------------------------------------------- |
|
|
141
|
-
| glTF 2.0 (+ extensions), `.babylon` | ✅
|
|
142
|
-
| `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡
|
|
143
|
-
| Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡
|
|
144
|
-
| `OBJ` / `STL` / `FBX` / `BVH` | ❌
|
|
141
|
+
| glTF 2.0 (+ extensions), `.babylon` | ✅ | via Lite `loadGltf` / `loadBabylon` |
|
|
142
|
+
| `SceneLoader` (`ImportMeshAsync` / `AppendAsync` / `LoadAssetContainerAsync`), `AssetsManager` | ⚡ | `AssetContainer` partial |
|
|
143
|
+
| Gaussian Splatting (`.ply` / `.splat` / `.sog` / `.spz`) | ⚡ | via `GaussianSplattingMesh`; LOD-streaming variants unsupported |
|
|
144
|
+
| `OBJ` / `STL` / `FBX` / `BVH` | ❌ | not in Lite — convert to glTF |
|
|
145
145
|
|
|
146
146
|
### `@babylonjs/addons` · `@recast-navigation/*`
|
|
147
147
|
|
|
148
|
-
| Feature area
|
|
149
|
-
|
|
|
150
|
-
| `RecastJSPlugin` (navmesh, crowd, path, raycast, off-mesh links, tile-cache obstacles) | ✅
|
|
148
|
+
| Feature area | Status | Notes |
|
|
149
|
+
| -------------------------------------------------------------------------------------- | :----: | -------------------------------- |
|
|
150
|
+
| `RecastJSPlugin` (navmesh, crowd, path, raycast, off-mesh links, tile-cache obstacles) | ✅ | over Lite's native Recast-V2 API |
|
|
151
151
|
|
|
152
152
|
### `@babylonjs/materials`
|
|
153
153
|
|
|
154
154
|
| Feature area | Status | Notes |
|
|
155
155
|
| ----------------- | :----: | ---------------------------------------------------------------------------------------------- |
|
|
156
|
-
| Library materials | ⚡
|
|
156
|
+
| Library materials | ⚡ | mapped onto the compat material surface where a Lite equivalent exists; unsupported ones throw |
|
|
157
157
|
|
|
158
158
|
> Specifiers outside the supported surface (e.g. `@babylonjs/gui`,
|
|
159
159
|
> `@babylonjs/inspector`) are left untouched by the bundler plugins and resolve to
|
package/index.d.ts
CHANGED
|
@@ -1543,6 +1543,15 @@ export declare class Matrix {
|
|
|
1543
1543
|
invert(): Matrix;
|
|
1544
1544
|
invertToRef(result: Matrix): Matrix;
|
|
1545
1545
|
getTranslation(): Vector3;
|
|
1546
|
+
/**
|
|
1547
|
+
* Babylon.js `Matrix.decompose(scale?, rotation?, translation?)` — split this
|
|
1548
|
+
* TRS matrix into its scale, rotation (quaternion), and translation parts,
|
|
1549
|
+
* writing into any provided out-params. Returns `false` (matching BJS) when a
|
|
1550
|
+
* scale axis is zero. The rotation extraction is backed by Lite's
|
|
1551
|
+
* `quatFromRotationMatrix` (via `Quaternion.FromRotationMatrixToRef`); the
|
|
1552
|
+
* negative-determinant `scale.y` flip matches Babylon.js exactly.
|
|
1553
|
+
*/
|
|
1554
|
+
decompose(scale?: Vector3, rotation?: Quaternion, translation?: Vector3): boolean;
|
|
1546
1555
|
static FromValues(m0: number, m1: number, m2: number, m3: number, m4: number, m5: number, m6: number, m7: number, m8: number, m9: number, m10: number, m11: number, m12: number, m13: number, m14: number, m15: number): Matrix;
|
|
1547
1556
|
static FromArray(array: ArrayLike<number>, offset?: number): Matrix;
|
|
1548
1557
|
static Identity(): Matrix;
|
|
@@ -2163,11 +2172,26 @@ export declare class Quaternion {
|
|
|
2163
2172
|
length(): number;
|
|
2164
2173
|
normalize(): this;
|
|
2165
2174
|
conjugate(): Quaternion;
|
|
2175
|
+
/**
|
|
2176
|
+
* Babylon.js `Quaternion.fromRotationMatrix` — update this quaternion in place
|
|
2177
|
+
* from the rotation part of `matrix`. Backed by Lite's `quatFromRotationMatrix`.
|
|
2178
|
+
*/
|
|
2179
|
+
fromRotationMatrix(matrix: Matrix): this;
|
|
2166
2180
|
clone(): Quaternion;
|
|
2167
2181
|
equals(other: Quaternion): boolean;
|
|
2168
2182
|
asArray(): [number, number, number, number];
|
|
2169
2183
|
toEulerAngles(): Vector3;
|
|
2170
2184
|
static Identity(): Quaternion;
|
|
2185
|
+
/**
|
|
2186
|
+
* Babylon.js `Quaternion.FromRotationMatrix` — create a new quaternion from the
|
|
2187
|
+
* rotation part of `matrix`. Backed by Lite's `quatFromRotationMatrix`.
|
|
2188
|
+
*/
|
|
2189
|
+
static FromRotationMatrix(matrix: Matrix): Quaternion;
|
|
2190
|
+
/**
|
|
2191
|
+
* Babylon.js `Quaternion.FromRotationMatrixToRef` — write the rotation part of
|
|
2192
|
+
* `matrix` into `result`. Backed by Lite's `quatFromRotationMatrix`.
|
|
2193
|
+
*/
|
|
2194
|
+
static FromRotationMatrixToRef(matrix: Matrix, result: Quaternion): Quaternion;
|
|
2171
2195
|
static FromEulerAngles(x: number, y: number, z: number): Quaternion;
|
|
2172
2196
|
static RotationYawPitchRoll(yaw: number, pitch: number, roll: number): Quaternion;
|
|
2173
2197
|
static RotationAxis(axis: Vector3, angle: number): Quaternion;
|
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, a as Mesh, T as TransformNode, l as liteBackedVector3 } from "./meshes-
|
|
5
|
-
import { A, C, b, c, d, e, f, g, G, I, h, Q, i, j, k, m, t, n } from "./meshes-
|
|
4
|
+
import { V as Vector3, u as unsupported, L as LiteCompatError, N as Node, M as Matrix, a as Mesh, T as TransformNode, l as liteBackedVector3 } from "./meshes-a59_KvbH.js";
|
|
5
|
+
import { A, C, b, c, d, e, f, g, G, I, h, Q, i, j, k, m, t, n } from "./meshes-a59_KvbH.js";
|
|
6
6
|
import { createEngine, onBeforeRender, stopEngine, resizeEngine, setEngineSize, disposeEngine, registerSceneWithShadowSupport, registerScene, startEngine, createArcRotateCamera, attachControl, getCameraPosition, getViewMatrix, getProjectionMatrix, createGeospatialCamera, setGeospatialOrientation, attachGeospatialControls, createFreeCamera, attachFreeControl, markMaterialUboDirty, createPbrMaterial, createSolidTexture2D, createStandardMaterial, setAnimationAdditive, playAnimation, pauseAnimation, goToFrame, stopAnimation, createSceneContext, updateAnimationManager, setFog, setClipPlane, loadDdsEnvironment, loadEnvironment, createDefaultCamera, addToScene, createHemisphericLight, createAnimationManager, enableAnimationBlending, addAnimationGroup, disposeScene, createDirectionalLight, createPointLight, createSpotLight, createCsgFromMesh, csgSubtract, csgIntersect, csgUnion, createMeshFromCsg, createCsg2FromMesh, csg2Subtract, csg2Intersect, csg2Add, createMeshesFromCsg2, disposeCsg2, initializeCsg2Async, createMorphTargets, setMorphTargetWeights, createTransformNode, bakeCurrentTransformIntoVertices, loadSOG, loadSPZ, loadSplat, createTexture2DFromPixels, updateTexture2DFromPixels, loadBasisTexture2D, loadKtxTexture2D, loadTexture2D, getContainerMeshes, 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 } from "@babylonjs/lite";
|
|
7
7
|
class Color3 {
|
|
8
8
|
constructor(r = 0, g2 = 0, b2 = 0) {
|
|
@@ -2132,7 +2132,7 @@ class AnimationGroup {
|
|
|
2132
2132
|
get animatables() {
|
|
2133
2133
|
if (this._lite) {
|
|
2134
2134
|
const frameRate = this._lite.frameRate ?? 60;
|
|
2135
|
-
return [{ masterFrame: this._lite.
|
|
2135
|
+
return [{ masterFrame: this._lite.currentTime * frameRate }];
|
|
2136
2136
|
}
|
|
2137
2137
|
return [];
|
|
2138
2138
|
}
|
|
@@ -2157,7 +2157,7 @@ class AnimationGroup {
|
|
|
2157
2157
|
if (this._lite) {
|
|
2158
2158
|
const frameRate = this._lite.frameRate ?? 60;
|
|
2159
2159
|
if (from !== void 0) {
|
|
2160
|
-
this._lite.
|
|
2160
|
+
this._lite.currentTime = from / frameRate;
|
|
2161
2161
|
}
|
|
2162
2162
|
this._lite.speedRatio = speedRatio;
|
|
2163
2163
|
this._lite.loopAnimation = loop;
|