@babylonjs/loaders 6.45.1 → 6.46.1
Sign up to get free protection for your applications and to get access to all the features.
- package/OBJ/objFileLoader.js +1 -0
- package/OBJ/objFileLoader.js.map +1 -1
- package/SPLAT/splatFileLoader.d.ts +4 -2
- package/SPLAT/splatFileLoader.js +5 -2
- package/SPLAT/splatFileLoader.js.map +1 -1
- package/glTF/1.0/glTFLoader.js +1 -0
- package/glTF/1.0/glTFLoader.js.map +1 -1
- package/glTF/2.0/Extensions/interactivityPathToObjectConverter.d.ts +1 -1
- package/glTF/2.0/Extensions/interactivityPathToObjectConverter.js.map +1 -1
- package/glTF/2.0/glTFLoader.js +2 -8
- package/glTF/2.0/glTFLoader.js.map +1 -1
- package/package.json +3 -3
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { IGLTF } from "../glTFLoaderInterfaces";
|
2
2
|
import { GLTFPathToObjectConverter } from "./gltfPathToObjectConverter";
|
3
|
-
import type { IObjectAccessor } from "@babylonjs/core/FlowGraph.js";
|
3
|
+
import type { IObjectAccessor } from "@babylonjs/core/FlowGraph/typeDefinitions.js";
|
4
4
|
/**
|
5
5
|
* Class to convert an interactivity pointer path to a smart object
|
6
6
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"interactivityPathToObjectConverter.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/interactivityPathToObjectConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,yBAA0C;IAC9F,YAAmB,IAAW;QAC1B,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1B,CAAC;CACJ;AAED,MAAM,SAAS,GAAG;IACd,SAAS,EAAE;QACP,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE;YACT,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,CAAC,IAAW,EAAE,EAAE;gBACjB,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAsC,CAAC;gBAClE,OAAO,aAAa,CAAC,QAAQ,CAAC;YAClC,CAAC;YACD,GAAG,EAAE,CAAC,KAAU,EAAE,IAAW,EAAE,EAAE;gBAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAsC,CAAC;gBAClE,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC;YACnC,CAAC;YACD,SAAS,CAAC,IAAW;gBACjB,OAAO,IAAI,CAAC,qBAAqB,CAAC;YACtC,CAAC;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,QAAQ,GAAG;IACb,KAAK,EAAE,SAAS;CACnB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IGLTF, INode } from \"../glTFLoaderInterfaces\";\r\nimport { GLTFPathToObjectConverter } from \"./gltfPathToObjectConverter\";\r\nimport type { TransformNode } from \"core/Meshes\";\r\nimport type { IObjectAccessor } from \"core/FlowGraph\";\r\n\r\n/**\r\n * Class to convert an interactivity pointer path to a smart object\r\n */\r\nexport class InteractivityPathToObjectConverter extends GLTFPathToObjectConverter<IObjectAccessor> {\r\n public constructor(gltf: IGLTF) {\r\n super(gltf, gltfTree);\r\n }\r\n}\r\n\r\nconst nodesTree = {\r\n __array__: {\r\n __target__: true,\r\n translation: {\r\n type: \"Vector3\",\r\n get: (node: INode) => {\r\n const babylonObject = node._babylonTransformNode as TransformNode;\r\n return babylonObject.position;\r\n },\r\n set: (value: any, node: INode) => {\r\n const babylonObject = node._babylonTransformNode as TransformNode;\r\n babylonObject.position = value;\r\n },\r\n getObject(node: INode) {\r\n return node._babylonTransformNode;\r\n },\r\n },\r\n },\r\n};\r\n\r\nconst gltfTree = {\r\n nodes: nodesTree,\r\n};\r\n"]}
|
1
|
+
{"version":3,"file":"interactivityPathToObjectConverter.js","sourceRoot":"","sources":["../../../../../../dev/loaders/src/glTF/2.0/Extensions/interactivityPathToObjectConverter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAIxE;;GAEG;AACH,MAAM,OAAO,kCAAmC,SAAQ,yBAA0C;IAC9F,YAAmB,IAAW;QAC1B,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1B,CAAC;CACJ;AAED,MAAM,SAAS,GAAG;IACd,SAAS,EAAE;QACP,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE;YACT,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,CAAC,IAAW,EAAE,EAAE;gBACjB,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAsC,CAAC;gBAClE,OAAO,aAAa,CAAC,QAAQ,CAAC;YAClC,CAAC;YACD,GAAG,EAAE,CAAC,KAAU,EAAE,IAAW,EAAE,EAAE;gBAC7B,MAAM,aAAa,GAAG,IAAI,CAAC,qBAAsC,CAAC;gBAClE,aAAa,CAAC,QAAQ,GAAG,KAAK,CAAC;YACnC,CAAC;YACD,SAAS,CAAC,IAAW;gBACjB,OAAO,IAAI,CAAC,qBAAqB,CAAC;YACtC,CAAC;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,QAAQ,GAAG;IACb,KAAK,EAAE,SAAS;CACnB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type { IGLTF, INode } from \"../glTFLoaderInterfaces\";\r\nimport { GLTFPathToObjectConverter } from \"./gltfPathToObjectConverter\";\r\nimport type { TransformNode } from \"core/Meshes\";\r\nimport type { IObjectAccessor } from \"core/FlowGraph/typeDefinitions\";\r\n\r\n/**\r\n * Class to convert an interactivity pointer path to a smart object\r\n */\r\nexport class InteractivityPathToObjectConverter extends GLTFPathToObjectConverter<IObjectAccessor> {\r\n public constructor(gltf: IGLTF) {\r\n super(gltf, gltfTree);\r\n }\r\n}\r\n\r\nconst nodesTree = {\r\n __array__: {\r\n __target__: true,\r\n translation: {\r\n type: \"Vector3\",\r\n get: (node: INode) => {\r\n const babylonObject = node._babylonTransformNode as TransformNode;\r\n return babylonObject.position;\r\n },\r\n set: (value: any, node: INode) => {\r\n const babylonObject = node._babylonTransformNode as TransformNode;\r\n babylonObject.position = value;\r\n },\r\n getObject(node: INode) {\r\n return node._babylonTransformNode;\r\n },\r\n },\r\n },\r\n};\r\n\r\nconst gltfTree = {\r\n nodes: nodesTree,\r\n};\r\n"]}
|
package/glTF/2.0/glTFLoader.js
CHANGED
@@ -233,6 +233,7 @@ export class GLTFLoader {
|
|
233
233
|
lights: this._babylonLights,
|
234
234
|
transformNodes: this._getTransformNodes(),
|
235
235
|
geometries: this._getGeometries(),
|
236
|
+
spriteManagers: [],
|
236
237
|
};
|
237
238
|
});
|
238
239
|
});
|
@@ -677,7 +678,7 @@ export class GLTFLoader {
|
|
677
678
|
babylonMesh._updateBoundingInfo();
|
678
679
|
}
|
679
680
|
else {
|
680
|
-
babylonMesh.refreshBoundingInfo(true);
|
681
|
+
babylonMesh.refreshBoundingInfo(true, true);
|
681
682
|
}
|
682
683
|
});
|
683
684
|
return node._babylonTransformNode;
|
@@ -1581,13 +1582,6 @@ export class GLTFLoader {
|
|
1581
1582
|
return new VertexBuffer(engine, data, kind, false);
|
1582
1583
|
});
|
1583
1584
|
}
|
1584
|
-
// Load joint indices as a float array since the shaders expect float data but glTF uses unsigned byte/short.
|
1585
|
-
// This prevents certain platforms (e.g. D3D) from having to convert the data to float on the fly.
|
1586
|
-
else if (kind === VertexBuffer.MatricesIndicesKind || kind === VertexBuffer.MatricesIndicesExtraKind) {
|
1587
|
-
accessor._babylonVertexBuffer[kind] = this._loadFloatAccessorAsync(context, accessor).then((data) => {
|
1588
|
-
return new VertexBuffer(engine, data, kind, false);
|
1589
|
-
});
|
1590
|
-
}
|
1591
1585
|
else {
|
1592
1586
|
const bufferView = ArrayItem.Get(`${context}/bufferView`, this._gltf.bufferViews, accessor.bufferView);
|
1593
1587
|
accessor._babylonVertexBuffer[kind] = this._loadVertexBufferViewAsync(bufferView).then((babylonBuffer) => {
|