@babylonjs/serializers 8.40.1 → 8.41.0
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.
|
@@ -40,14 +40,16 @@ export interface IGLTFExporterExtensionV2 extends IGLTFExporterExtension, IDispo
|
|
|
40
40
|
postExportNodeAsync?(context: string, node: INode, babylonNode: Node, nodeMap: Map<Node, number>, convertToRightHanded: boolean, bufferManager: BufferManager): Promise<Nullable<INode>>;
|
|
41
41
|
/**
|
|
42
42
|
* Define this method to modify the default behavior when exporting a material
|
|
43
|
-
* @param
|
|
43
|
+
* @param context The context when exporting the material
|
|
44
|
+
* @param node glTF material
|
|
44
45
|
* @param babylonMaterial BabylonJS material
|
|
45
46
|
* @returns nullable IMaterial promise
|
|
46
47
|
*/
|
|
47
48
|
postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;
|
|
48
49
|
/**
|
|
49
50
|
* Define this method to return additional textures to export from a material
|
|
50
|
-
* @param
|
|
51
|
+
* @param context The context when exporting the material
|
|
52
|
+
* @param node glTF material
|
|
51
53
|
* @param babylonMaterial BabylonJS material
|
|
52
54
|
* @returns List of textures
|
|
53
55
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glTFExporterExtension.js","sourceRoot":"","sources":["../../../../../dev/serializers/src/glTF/2.0/glTFExporterExtension.ts"],"names":[],"mappings":"AAWA,gBAAgB;AAChB,wEAAwE;AACxE,MAAM,CAAC,IAAI,0BAA0B,GAAG,CAAC,CAAC,CAAC,uCAAuC","sourcesContent":["import type { IMeshPrimitive, INode, IMaterial, ITextureInfo, IAccessor } from \"babylonjs-gltf2interface\";\r\nimport type { Node } from \"core/node\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\nimport type { IDisposable } from \"core/scene\";\r\n\r\nimport type { IGLTFExporterExtension } from \"../glTFFileExporter\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { BufferManager } from \"./bufferManager\";\r\n\r\n/** @internal */\r\n// eslint-disable-next-line no-var, @typescript-eslint/naming-convention\r\nexport var __IGLTFExporterExtensionV2 = 0; // I am here to allow dts to be created\r\n\r\n/**\r\n * Interface for a glTF exporter extension\r\n * @internal\r\n */\r\nexport interface IGLTFExporterExtensionV2 extends IGLTFExporterExtension, IDisposable {\r\n /**\r\n * Define this method to get notified when a texture info is created\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info\r\n * @param babylonTexture The Babylon.js texture\r\n */\r\n postExportTexture?(context: string, textureInfo: ITextureInfo, babylonTexture: BaseTexture): void;\r\n\r\n /**\r\n * Define this method to get notified when a primitive is created\r\n * @param primitive glTF mesh primitive\r\n * @param bufferManager Buffer manager\r\n * @param accessors List of glTF accessors\r\n */\r\n postExportMeshPrimitive?(primitive: IMeshPrimitive, bufferManager: BufferManager, accessors: IAccessor[]): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when exporting a node\r\n * @param context The context when exporting the node\r\n * @param node glTF node\r\n * @param babylonNode BabylonJS node\r\n * @param nodeMap Current node mapping of babylon node to glTF node index. Useful for combining nodes together.\r\n * @param convertToRightHanded Flag indicating whether to convert values to right-handed\r\n * @param bufferManager Buffer manager\r\n * @returns nullable INode promise\r\n */\r\n postExportNodeAsync?(\r\n context: string,\r\n node: INode,\r\n babylonNode: Node,\r\n nodeMap: Map<Node, number>,\r\n convertToRightHanded: boolean,\r\n bufferManager: BufferManager\r\n ): Promise<Nullable<INode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when exporting a material\r\n * @param material glTF material\r\n * @param babylonMaterial BabylonJS material\r\n * @returns nullable IMaterial promise\r\n */\r\n postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;\r\n\r\n /**\r\n * Define this method to return additional textures to export from a material\r\n * @param material glTF material\r\n * @param babylonMaterial BabylonJS material\r\n * @returns List of textures\r\n */\r\n postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;\r\n\r\n /**\r\n * Define this method to modify the glTF buffer data before it is finalized and written\r\n * @param bufferManager Buffer manager\r\n */\r\n preGenerateBinaryAsync?(bufferManager: BufferManager): Promise<void>;\r\n\r\n /** Gets a boolean indicating that this extension was used */\r\n wasUsed: boolean;\r\n\r\n /** Gets a boolean indicating that this extension is required for the file to work */\r\n required: boolean;\r\n\r\n /**\r\n * Called after the exporter state changes to EXPORTING\r\n */\r\n onExporting?(): void;\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"glTFExporterExtension.js","sourceRoot":"","sources":["../../../../../dev/serializers/src/glTF/2.0/glTFExporterExtension.ts"],"names":[],"mappings":"AAWA,gBAAgB;AAChB,wEAAwE;AACxE,MAAM,CAAC,IAAI,0BAA0B,GAAG,CAAC,CAAC,CAAC,uCAAuC","sourcesContent":["import type { IMeshPrimitive, INode, IMaterial, ITextureInfo, IAccessor } from \"babylonjs-gltf2interface\";\r\nimport type { Node } from \"core/node\";\r\nimport type { Nullable } from \"core/types\";\r\n\r\nimport type { IDisposable } from \"core/scene\";\r\n\r\nimport type { IGLTFExporterExtension } from \"../glTFFileExporter\";\r\nimport type { Material } from \"core/Materials/material\";\r\nimport type { BaseTexture } from \"core/Materials/Textures/baseTexture\";\r\nimport type { BufferManager } from \"./bufferManager\";\r\n\r\n/** @internal */\r\n// eslint-disable-next-line no-var, @typescript-eslint/naming-convention\r\nexport var __IGLTFExporterExtensionV2 = 0; // I am here to allow dts to be created\r\n\r\n/**\r\n * Interface for a glTF exporter extension\r\n * @internal\r\n */\r\nexport interface IGLTFExporterExtensionV2 extends IGLTFExporterExtension, IDisposable {\r\n /**\r\n * Define this method to get notified when a texture info is created\r\n * @param context The context when loading the asset\r\n * @param textureInfo The glTF texture info\r\n * @param babylonTexture The Babylon.js texture\r\n */\r\n postExportTexture?(context: string, textureInfo: ITextureInfo, babylonTexture: BaseTexture): void;\r\n\r\n /**\r\n * Define this method to get notified when a primitive is created\r\n * @param primitive glTF mesh primitive\r\n * @param bufferManager Buffer manager\r\n * @param accessors List of glTF accessors\r\n */\r\n postExportMeshPrimitive?(primitive: IMeshPrimitive, bufferManager: BufferManager, accessors: IAccessor[]): void;\r\n\r\n /**\r\n * Define this method to modify the default behavior when exporting a node\r\n * @param context The context when exporting the node\r\n * @param node glTF node\r\n * @param babylonNode BabylonJS node\r\n * @param nodeMap Current node mapping of babylon node to glTF node index. Useful for combining nodes together.\r\n * @param convertToRightHanded Flag indicating whether to convert values to right-handed\r\n * @param bufferManager Buffer manager\r\n * @returns nullable INode promise\r\n */\r\n postExportNodeAsync?(\r\n context: string,\r\n node: INode,\r\n babylonNode: Node,\r\n nodeMap: Map<Node, number>,\r\n convertToRightHanded: boolean,\r\n bufferManager: BufferManager\r\n ): Promise<Nullable<INode>>;\r\n\r\n /**\r\n * Define this method to modify the default behavior when exporting a material\r\n * @param context The context when exporting the material\r\n * @param node glTF material\r\n * @param babylonMaterial BabylonJS material\r\n * @returns nullable IMaterial promise\r\n */\r\n postExportMaterialAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<IMaterial>;\r\n\r\n /**\r\n * Define this method to return additional textures to export from a material\r\n * @param context The context when exporting the material\r\n * @param node glTF material\r\n * @param babylonMaterial BabylonJS material\r\n * @returns List of textures\r\n */\r\n postExportMaterialAdditionalTexturesAsync?(context: string, node: IMaterial, babylonMaterial: Material): Promise<BaseTexture[]>;\r\n\r\n /**\r\n * Define this method to modify the glTF buffer data before it is finalized and written\r\n * @param bufferManager Buffer manager\r\n */\r\n preGenerateBinaryAsync?(bufferManager: BufferManager): Promise<void>;\r\n\r\n /** Gets a boolean indicating that this extension was used */\r\n wasUsed: boolean;\r\n\r\n /** Gets a boolean indicating that this extension is required for the file to work */\r\n required: boolean;\r\n\r\n /**\r\n * Called after the exporter state changes to EXPORTING\r\n */\r\n onExporting?(): void;\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/serializers",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.41.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"postcompile": "build-tools -c add-js-to-es6"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@babylonjs/core": "^8.
|
|
21
|
+
"@babylonjs/core": "^8.41.0",
|
|
22
22
|
"@dev/build-tools": "^1.0.0",
|
|
23
23
|
"@lts/serializers": "^1.0.0",
|
|
24
|
-
"babylonjs-gltf2interface": "^8.
|
|
24
|
+
"babylonjs-gltf2interface": "^8.41.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@babylonjs/core": "^8.0.0",
|