babylonjs-serializers 6.6.0 → 6.7.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.
- package/babylon.glTF2Serializer.js +248 -523
- package/babylon.glTF2Serializer.js.map +1 -1
- package/babylon.glTF2Serializer.min.js +1 -1
- package/babylon.glTF2Serializer.min.js.map +1 -1
- package/babylon.objSerializer.js +4 -4
- package/babylon.objSerializer.js.map +1 -1
- package/babylon.stlSerializer.js +4 -4
- package/babylon.stlSerializer.js.map +1 -1
- package/babylonjs.serializers.d.ts +25 -128
- package/babylonjs.serializers.js +250 -525
- package/babylonjs.serializers.js.map +1 -1
- package/babylonjs.serializers.min.js +1 -1
- package/babylonjs.serializers.min.js.map +1 -1
- package/babylonjs.serializers.module.d.ts +51 -259
- package/package.json +3 -3
|
@@ -16,9 +16,9 @@ declare module BABYLON {
|
|
|
16
16
|
dispose(): void;
|
|
17
17
|
/** @internal */
|
|
18
18
|
get wasUsed(): boolean;
|
|
19
|
-
postExportNodeAsync
|
|
19
|
+
postExportNodeAsync(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap: {
|
|
20
20
|
[key: number]: number;
|
|
21
|
-
}, binaryWriter
|
|
21
|
+
}, binaryWriter: _BinaryWriter): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
22
22
|
private _buildAccessor;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -56,7 +56,7 @@ declare module BABYLON {
|
|
|
56
56
|
* @param nodeMap Node mapping of unique id to glTF node index
|
|
57
57
|
* @returns nullable BABYLON.GLTF2.INode promise
|
|
58
58
|
*/
|
|
59
|
-
postExportNodeAsync(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap
|
|
59
|
+
postExportNodeAsync(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap: {
|
|
60
60
|
[key: number]: number;
|
|
61
61
|
}): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
62
62
|
}
|
|
@@ -354,11 +354,10 @@ declare module BABYLON {
|
|
|
354
354
|
* @param babylonTransformNode - BabylonJS mesh.
|
|
355
355
|
* @param animation - animation.
|
|
356
356
|
* @param animationChannelTargetPath - The target animation channel.
|
|
357
|
-
* @param convertToRightHandedSystem - Specifies if the values should be converted to right-handed.
|
|
358
357
|
* @param useQuaternion - Specifies if quaternions are used.
|
|
359
358
|
* @returns nullable IAnimationData
|
|
360
359
|
*/
|
|
361
|
-
static _CreateNodeAnimation(babylonTransformNode: Node, animation: Animation, animationChannelTargetPath: BABYLON.GLTF2.AnimationChannelTargetPath,
|
|
360
|
+
static _CreateNodeAnimation(babylonTransformNode: Node, animation: Animation, animationChannelTargetPath: BABYLON.GLTF2.AnimationChannelTargetPath, useQuaternion: boolean, animationSampleRate: number): Nullable<_IAnimationData>;
|
|
362
361
|
private static _DeduceAnimationInfo;
|
|
363
362
|
/**
|
|
364
363
|
* @ignore
|
|
@@ -371,12 +370,11 @@ declare module BABYLON {
|
|
|
371
370
|
* @param binaryWriter
|
|
372
371
|
* @param bufferViews
|
|
373
372
|
* @param accessors
|
|
374
|
-
* @param convertToRightHandedSystem
|
|
375
373
|
* @param animationSampleRate
|
|
376
374
|
*/
|
|
377
375
|
static _CreateNodeAnimationFromNodeAnimations(babylonNode: Node, runtimeGLTFAnimation: BABYLON.GLTF2.IAnimation, idleGLTFAnimations: BABYLON.GLTF2.IAnimation[], nodeMap: {
|
|
378
376
|
[key: number]: number;
|
|
379
|
-
}, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[],
|
|
377
|
+
}, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[], animationSampleRate: number, shouldExportAnimation?: (animation: Animation) => boolean): void;
|
|
380
378
|
/**
|
|
381
379
|
* @ignore
|
|
382
380
|
* Create individual morph animations from the mesh's morph target animation tracks
|
|
@@ -388,12 +386,11 @@ declare module BABYLON {
|
|
|
388
386
|
* @param binaryWriter
|
|
389
387
|
* @param bufferViews
|
|
390
388
|
* @param accessors
|
|
391
|
-
* @param convertToRightHandedSystem
|
|
392
389
|
* @param animationSampleRate
|
|
393
390
|
*/
|
|
394
391
|
static _CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode: Node, runtimeGLTFAnimation: BABYLON.GLTF2.IAnimation, idleGLTFAnimations: BABYLON.GLTF2.IAnimation[], nodeMap: {
|
|
395
392
|
[key: number]: number;
|
|
396
|
-
}, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[],
|
|
393
|
+
}, nodes: BABYLON.GLTF2.INode[], binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[], animationSampleRate: number, shouldExportAnimation?: (animation: Animation) => boolean): void;
|
|
397
394
|
/**
|
|
398
395
|
* @ignore
|
|
399
396
|
* Create node and morph animations from the animation groups
|
|
@@ -404,14 +401,11 @@ declare module BABYLON {
|
|
|
404
401
|
* @param binaryWriter
|
|
405
402
|
* @param bufferViews
|
|
406
403
|
* @param accessors
|
|
407
|
-
* @param convertToRightHandedSystemMap
|
|
408
404
|
* @param animationSampleRate
|
|
409
405
|
*/
|
|
410
406
|
static _CreateNodeAndMorphAnimationFromAnimationGroups(babylonScene: Scene, glTFAnimations: BABYLON.GLTF2.IAnimation[], nodeMap: {
|
|
411
407
|
[key: number]: number;
|
|
412
|
-
},
|
|
413
|
-
[nodeId: number]: boolean;
|
|
414
|
-
}, animationSampleRate: number, shouldExportAnimation?: (animation: Animation) => boolean): void;
|
|
408
|
+
}, binaryWriter: _BinaryWriter, bufferViews: BABYLON.GLTF2.IBufferView[], accessors: BABYLON.GLTF2.IAccessor[], animationSampleRate: number, shouldExportAnimation?: (animation: Animation) => boolean): void;
|
|
415
409
|
private static _AddAnimation;
|
|
416
410
|
/**
|
|
417
411
|
* Create a baked animation
|
|
@@ -427,7 +421,6 @@ declare module BABYLON {
|
|
|
427
421
|
* @param minMaxFrames
|
|
428
422
|
* @param minMaxFrames.min
|
|
429
423
|
* @param minMaxFrames.max
|
|
430
|
-
* @param convertToRightHandedSystem converts the values to right-handed
|
|
431
424
|
* @param useQuaternion specifies if quaternions should be used
|
|
432
425
|
*/
|
|
433
426
|
private static _CreateBakedAnimation;
|
|
@@ -438,10 +431,8 @@ declare module BABYLON {
|
|
|
438
431
|
* @param babylonTransformNode BabylonJS mesh
|
|
439
432
|
* @param animation BabylonJS animation
|
|
440
433
|
* @param animationChannelTargetPath The target animation channel
|
|
441
|
-
* @param frameDelta The difference between the last and first frame of the animation
|
|
442
434
|
* @param inputs Array to store the key frame times
|
|
443
435
|
* @param outputs Array to store the key frame data
|
|
444
|
-
* @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
|
|
445
436
|
* @param useQuaternion Specifies if quaternions are used in the animation
|
|
446
437
|
*/
|
|
447
438
|
private static _CreateLinearOrStepAnimation;
|
|
@@ -453,7 +444,6 @@ declare module BABYLON {
|
|
|
453
444
|
* @param frameDelta The difference between the last and first frame of the animation
|
|
454
445
|
* @param inputs Array to store the key frame times
|
|
455
446
|
* @param outputs Array to store the key frame data
|
|
456
|
-
* @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
|
|
457
447
|
* @param useQuaternion Specifies if quaternions are used in the animation
|
|
458
448
|
*/
|
|
459
449
|
private static _CreateCubicSplineAnimation;
|
|
@@ -465,7 +455,6 @@ declare module BABYLON {
|
|
|
465
455
|
* @param outputs
|
|
466
456
|
* @param animationChannelTargetPath
|
|
467
457
|
* @param babylonTransformNode
|
|
468
|
-
* @param convertToRightHandedSystem
|
|
469
458
|
* @param useQuaternion
|
|
470
459
|
*/
|
|
471
460
|
private static _AddKeyframeValue;
|
|
@@ -487,7 +476,6 @@ declare module BABYLON {
|
|
|
487
476
|
* @param keyFrame The key frame with the animation data
|
|
488
477
|
* @param frameDelta Time difference between two frames used to scale the tangent by the frame delta
|
|
489
478
|
* @param useQuaternion Specifies if quaternions are used
|
|
490
|
-
* @param convertToRightHandedSystem Specifies if the values should be converted to right-handed
|
|
491
479
|
*/
|
|
492
480
|
private static _AddSplineTangent;
|
|
493
481
|
/**
|
|
@@ -601,27 +589,11 @@ declare module BABYLON {
|
|
|
601
589
|
mimeType: BABYLON.GLTF2.ImageMimeType;
|
|
602
590
|
};
|
|
603
591
|
};
|
|
604
|
-
|
|
605
|
-
data: ArrayBuffer;
|
|
606
|
-
mimeType: BABYLON.GLTF2.ImageMimeType;
|
|
607
|
-
}>;
|
|
592
|
+
private _orderedImageData;
|
|
608
593
|
/**
|
|
609
594
|
* Stores a map of the unique id of a node to its index in the node array
|
|
610
595
|
*/
|
|
611
|
-
_nodeMap
|
|
612
|
-
[key: number]: number;
|
|
613
|
-
};
|
|
614
|
-
/**
|
|
615
|
-
* Specifies if the source Babylon scene was left handed, and needed conversion.
|
|
616
|
-
*/
|
|
617
|
-
_convertToRightHandedSystem: boolean;
|
|
618
|
-
/**
|
|
619
|
-
* Specifies if a Babylon node should be converted to right-handed on export
|
|
620
|
-
*/
|
|
621
|
-
_convertToRightHandedSystemMap: {
|
|
622
|
-
[nodeId: number]: boolean;
|
|
623
|
-
};
|
|
624
|
-
_includeCoordinateSystemConversionNodes: boolean;
|
|
596
|
+
private _nodeMap;
|
|
625
597
|
/**
|
|
626
598
|
* Baked animation sample rate
|
|
627
599
|
*/
|
|
@@ -636,9 +608,9 @@ declare module BABYLON {
|
|
|
636
608
|
private _applyExtensions;
|
|
637
609
|
_extensionsPreExportTextureAsync(context: string, babylonTexture: Nullable<Texture>, mimeType: BABYLON.GLTF2.ImageMimeType): Promise<Nullable<BaseTexture>>;
|
|
638
610
|
_extensionsPostExportMeshPrimitiveAsync(context: string, meshPrimitive: BABYLON.GLTF2.IMeshPrimitive, babylonSubMesh: SubMesh, binaryWriter: _BinaryWriter): Promise<Nullable<BABYLON.GLTF2.IMeshPrimitive>>;
|
|
639
|
-
_extensionsPostExportNodeAsync(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap
|
|
611
|
+
_extensionsPostExportNodeAsync(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap: {
|
|
640
612
|
[key: number]: number;
|
|
641
|
-
}, binaryWriter
|
|
613
|
+
}, binaryWriter: _BinaryWriter): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
642
614
|
_extensionsPostExportMaterialAsync(context: string, material: Nullable<BABYLON.GLTF2.IMaterial>, babylonMaterial: Material): Promise<Nullable<BABYLON.GLTF2.IMaterial>>;
|
|
643
615
|
_extensionsPostExportMaterialAdditionalTextures(context: string, material: BABYLON.GLTF2.IMaterial, babylonMaterial: Material): BaseTexture[];
|
|
644
616
|
_extensionsPostExportTextures(context: string, textureInfo: BABYLON.GLTF2.ITextureInfo, babylonTexture: BaseTexture): void;
|
|
@@ -674,51 +646,40 @@ declare module BABYLON {
|
|
|
674
646
|
* clock-wise during export to glTF
|
|
675
647
|
* @param submesh BabylonJS submesh
|
|
676
648
|
* @param primitiveMode Primitive mode of the mesh
|
|
677
|
-
* @param sideOrientation the winding order of the submesh
|
|
678
649
|
* @param vertexBufferKind The type of vertex attribute
|
|
679
650
|
* @param meshAttributeArray The vertex attribute data
|
|
680
651
|
* @param byteOffset The offset to the binary data
|
|
681
652
|
* @param binaryWriter The binary data for the glTF file
|
|
682
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
683
653
|
*/
|
|
684
654
|
private _reorderVertexAttributeDataBasedOnPrimitiveMode;
|
|
685
655
|
/**
|
|
686
656
|
* Reorders the vertex attributes in the correct triangle mode order . This is necessary when indices are not available and the winding order is
|
|
687
657
|
* clock-wise during export to glTF
|
|
688
658
|
* @param submesh BabylonJS submesh
|
|
689
|
-
* @param primitiveMode Primitive mode of the mesh
|
|
690
|
-
* @param sideOrientation the winding order of the submesh
|
|
691
659
|
* @param vertexBufferKind The type of vertex attribute
|
|
692
660
|
* @param meshAttributeArray The vertex attribute data
|
|
693
661
|
* @param byteOffset The offset to the binary data
|
|
694
662
|
* @param binaryWriter The binary data for the glTF file
|
|
695
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
696
663
|
*/
|
|
697
664
|
private _reorderTriangleFillMode;
|
|
698
665
|
/**
|
|
699
666
|
* Reorders the vertex attributes in the correct triangle strip order. This is necessary when indices are not available and the winding order is
|
|
700
667
|
* clock-wise during export to glTF
|
|
701
668
|
* @param submesh BabylonJS submesh
|
|
702
|
-
* @param primitiveMode Primitive mode of the mesh
|
|
703
|
-
* @param sideOrientation the winding order of the submesh
|
|
704
669
|
* @param vertexBufferKind The type of vertex attribute
|
|
705
670
|
* @param meshAttributeArray The vertex attribute data
|
|
706
671
|
* @param byteOffset The offset to the binary data
|
|
707
672
|
* @param binaryWriter The binary data for the glTF file
|
|
708
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
709
673
|
*/
|
|
710
674
|
private _reorderTriangleStripDrawMode;
|
|
711
675
|
/**
|
|
712
676
|
* Reorders the vertex attributes in the correct triangle fan order. This is necessary when indices are not available and the winding order is
|
|
713
677
|
* clock-wise during export to glTF
|
|
714
678
|
* @param submesh BabylonJS submesh
|
|
715
|
-
* @param primitiveMode Primitive mode of the mesh
|
|
716
|
-
* @param sideOrientation the winding order of the submesh
|
|
717
679
|
* @param vertexBufferKind The type of vertex attribute
|
|
718
680
|
* @param meshAttributeArray The vertex attribute data
|
|
719
681
|
* @param byteOffset The offset to the binary data
|
|
720
682
|
* @param binaryWriter The binary data for the glTF file
|
|
721
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
722
683
|
*/
|
|
723
684
|
private _reorderTriangleFanMode;
|
|
724
685
|
/**
|
|
@@ -726,9 +687,7 @@ declare module BABYLON {
|
|
|
726
687
|
* @param vertices The vertices to write to the binary writer
|
|
727
688
|
* @param byteOffset The offset into the binary writer to overwrite binary data
|
|
728
689
|
* @param vertexAttributeKind The vertex attribute type
|
|
729
|
-
* @param meshAttributeArray The vertex attribute data
|
|
730
690
|
* @param binaryWriter The writer containing the binary data
|
|
731
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
732
691
|
*/
|
|
733
692
|
private _writeVertexAttributeData;
|
|
734
693
|
/**
|
|
@@ -739,10 +698,9 @@ declare module BABYLON {
|
|
|
739
698
|
* @param meshAttributeArray Array containing the attribute data
|
|
740
699
|
* @param stride Specifies the space between data
|
|
741
700
|
* @param binaryWriter The buffer to write the binary data to
|
|
742
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
743
701
|
* @param babylonTransformNode
|
|
744
702
|
*/
|
|
745
|
-
_writeAttributeData(vertexBufferKind: string, attributeComponentKind: BABYLON.GLTF2.AccessorComponentType, meshAttributeArray: FloatArray, stride: number, binaryWriter: _BinaryWriter,
|
|
703
|
+
_writeAttributeData(vertexBufferKind: string, attributeComponentKind: BABYLON.GLTF2.AccessorComponentType, meshAttributeArray: FloatArray, stride: number, binaryWriter: _BinaryWriter, babylonTransformNode: TransformNode): void;
|
|
746
704
|
/**
|
|
747
705
|
* Writes mesh attribute data to a data buffer
|
|
748
706
|
* Returns the bytelength of the data
|
|
@@ -754,10 +712,9 @@ declare module BABYLON {
|
|
|
754
712
|
* @param morphTargetAttributeArray
|
|
755
713
|
* @param stride Specifies the space between data
|
|
756
714
|
* @param binaryWriter The buffer to write the binary data to
|
|
757
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
758
715
|
* @param minMax
|
|
759
716
|
*/
|
|
760
|
-
writeMorphTargetAttributeData(vertexBufferKind: string, attributeComponentKind: BABYLON.GLTF2.AccessorComponentType, meshPrimitive: SubMesh,
|
|
717
|
+
writeMorphTargetAttributeData(vertexBufferKind: string, attributeComponentKind: BABYLON.GLTF2.AccessorComponentType, meshPrimitive: SubMesh, meshAttributeArray: FloatArray, morphTargetAttributeArray: FloatArray, stride: number, binaryWriter: _BinaryWriter, minMax?: any): void;
|
|
761
718
|
/**
|
|
762
719
|
* Generates glTF json data
|
|
763
720
|
* @param shouldUseGlb Indicates whether the json should be written for a glb file
|
|
@@ -792,7 +749,6 @@ declare module BABYLON {
|
|
|
792
749
|
* Sets the TRS for each node
|
|
793
750
|
* @param node glTF Node for storing the transformation data
|
|
794
751
|
* @param babylonTransformNode Babylon mesh used as the source for the transformation data
|
|
795
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
796
752
|
*/
|
|
797
753
|
private _setNodeTransformation;
|
|
798
754
|
private _setCameraTransformation;
|
|
@@ -804,7 +760,6 @@ declare module BABYLON {
|
|
|
804
760
|
* @param babylonTransformNode The Babylon mesh to get the vertices data from
|
|
805
761
|
* @param binaryWriter The buffer to write the bufferview data to
|
|
806
762
|
* @param byteStride
|
|
807
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
808
763
|
*/
|
|
809
764
|
private _createBufferViewKind;
|
|
810
765
|
/**
|
|
@@ -813,7 +768,6 @@ declare module BABYLON {
|
|
|
813
768
|
* @param meshPrimitive
|
|
814
769
|
* @param babylonMorphTarget the morph target to be exported
|
|
815
770
|
* @param binaryWriter The buffer to write the bufferview data to
|
|
816
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
817
771
|
*/
|
|
818
772
|
private _setMorphTargetAttributes;
|
|
819
773
|
/**
|
|
@@ -839,15 +793,8 @@ declare module BABYLON {
|
|
|
839
793
|
* @param mesh glTF Mesh object to store the primitive attribute information
|
|
840
794
|
* @param babylonTransformNode Babylon mesh to get the primitive attribute data from
|
|
841
795
|
* @param binaryWriter Buffer to write the attribute data to
|
|
842
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
843
796
|
*/
|
|
844
797
|
private _setPrimitiveAttributesAsync;
|
|
845
|
-
/**
|
|
846
|
-
* Check if the node is used to convert its descendants from a right handed coordinate system to the Babylon scene's coordinate system.
|
|
847
|
-
* @param node The node to check
|
|
848
|
-
* @returns True if the node is used to convert its descendants from right-handed to left-handed. False otherwise
|
|
849
|
-
*/
|
|
850
|
-
private _isBabylonCoordinateSystemConvertingNode;
|
|
851
798
|
/**
|
|
852
799
|
* Creates a glTF scene based on the array of meshes
|
|
853
800
|
* Returns the the total byte offset
|
|
@@ -864,7 +811,6 @@ declare module BABYLON {
|
|
|
864
811
|
private _getExportNodes;
|
|
865
812
|
/**
|
|
866
813
|
* Creates a mapping of Node unique id to node index and handles animations
|
|
867
|
-
* @param babylonScene Babylon Scene
|
|
868
814
|
* @param nodes Babylon transform nodes
|
|
869
815
|
* @param binaryWriter Buffer to write binary data to
|
|
870
816
|
* @returns Node mapping of unique id to index
|
|
@@ -874,7 +820,6 @@ declare module BABYLON {
|
|
|
874
820
|
* Creates a glTF node from a Babylon mesh
|
|
875
821
|
* @param babylonNode Source Babylon mesh
|
|
876
822
|
* @param binaryWriter Buffer for storing geometry data
|
|
877
|
-
* @param convertToRightHandedSystem Converts the values to right-handed
|
|
878
823
|
* @returns glTF node
|
|
879
824
|
*/
|
|
880
825
|
private _createNodeAsync;
|
|
@@ -1011,9 +956,9 @@ declare module BABYLON {
|
|
|
1011
956
|
* @param babylonNode BabylonJS node
|
|
1012
957
|
* @returns nullable BABYLON.GLTF2.INode promise
|
|
1013
958
|
*/
|
|
1014
|
-
postExportNodeAsync?(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap
|
|
959
|
+
postExportNodeAsync?(context: string, node: Nullable<BABYLON.GLTF2.INode>, babylonNode: Node, nodeMap: {
|
|
1015
960
|
[key: number]: number;
|
|
1016
|
-
}, binaryWriter
|
|
961
|
+
}, binaryWriter: _BinaryWriter): Promise<Nullable<BABYLON.GLTF2.INode>>;
|
|
1017
962
|
/**
|
|
1018
963
|
* Define this method to modify the default behavior when exporting a material
|
|
1019
964
|
* @param material glTF material
|
|
@@ -1248,19 +1193,24 @@ declare module BABYLON {
|
|
|
1248
1193
|
*/
|
|
1249
1194
|
metadataSelector?(metadata: any): any;
|
|
1250
1195
|
/**
|
|
1251
|
-
* The sample rate to bake animation curves
|
|
1196
|
+
* The sample rate to bake animation curves. Defaults to 1 / 60.
|
|
1252
1197
|
*/
|
|
1253
1198
|
animationSampleRate?: number;
|
|
1254
1199
|
/**
|
|
1255
|
-
* Begin serialization without waiting for the scene to be ready
|
|
1200
|
+
* Begin serialization without waiting for the scene to be ready. Defaults to false.
|
|
1256
1201
|
*/
|
|
1257
1202
|
exportWithoutWaitingForScene?: boolean;
|
|
1258
1203
|
/**
|
|
1259
|
-
* Indicates if unused vertex uv attributes should be included in export
|
|
1204
|
+
* Indicates if unused vertex uv attributes should be included in export. Defaults to false.
|
|
1260
1205
|
*/
|
|
1261
1206
|
exportUnusedUVs?: boolean;
|
|
1262
1207
|
/**
|
|
1263
|
-
*
|
|
1208
|
+
* Remove no-op root nodes when possible. Defaults to true.
|
|
1209
|
+
*/
|
|
1210
|
+
removeNoopRootNodes?: boolean;
|
|
1211
|
+
/**
|
|
1212
|
+
* Indicates if coordinate system swapping root nodes should be included in export. Defaults to false.
|
|
1213
|
+
* @deprecated Please use removeNoopRootNodes instead
|
|
1264
1214
|
*/
|
|
1265
1215
|
includeCoordinateSystemConversionNodes?: boolean;
|
|
1266
1216
|
}
|
|
@@ -1322,65 +1272,12 @@ declare module BABYLON {
|
|
|
1322
1272
|
* @param positions Positions array of a mesh
|
|
1323
1273
|
* @param vertexStart Starting vertex offset to calculate min and max values
|
|
1324
1274
|
* @param vertexCount Number of vertices to check for min and max values
|
|
1325
|
-
* @param convertToRightHandedSystem
|
|
1326
1275
|
* @returns min number array and max number array
|
|
1327
1276
|
*/
|
|
1328
|
-
static _CalculateMinMaxPositions(positions: FloatArray, vertexStart: number, vertexCount: number
|
|
1277
|
+
static _CalculateMinMaxPositions(positions: FloatArray, vertexStart: number, vertexCount: number): {
|
|
1329
1278
|
min: number[];
|
|
1330
1279
|
max: number[];
|
|
1331
1280
|
};
|
|
1332
|
-
/**
|
|
1333
|
-
* Converts a new right-handed Vector3
|
|
1334
|
-
* @param vector vector3 array
|
|
1335
|
-
* @returns right-handed Vector3
|
|
1336
|
-
*/
|
|
1337
|
-
static _GetRightHandedPositionVector3(vector: Vector3): Vector3;
|
|
1338
|
-
/**
|
|
1339
|
-
* Converts a Vector3 to right-handed
|
|
1340
|
-
* @param vector Vector3 to convert to right-handed
|
|
1341
|
-
*/
|
|
1342
|
-
static _GetRightHandedPositionVector3FromRef(vector: Vector3): void;
|
|
1343
|
-
/**
|
|
1344
|
-
* Converts a three element number array to right-handed
|
|
1345
|
-
* @param vector number array to convert to right-handed
|
|
1346
|
-
*/
|
|
1347
|
-
static _GetRightHandedPositionArray3FromRef(vector: number[]): void;
|
|
1348
|
-
/**
|
|
1349
|
-
* Converts a new right-handed Vector3
|
|
1350
|
-
* @param vector vector3 array
|
|
1351
|
-
* @returns right-handed Vector3
|
|
1352
|
-
*/
|
|
1353
|
-
static _GetRightHandedNormalVector3(vector: Vector3): Vector3;
|
|
1354
|
-
/**
|
|
1355
|
-
* Converts a Vector3 to right-handed
|
|
1356
|
-
* @param vector Vector3 to convert to right-handed
|
|
1357
|
-
*/
|
|
1358
|
-
static _GetRightHandedNormalVector3FromRef(vector: Vector3): void;
|
|
1359
|
-
/**
|
|
1360
|
-
* Converts a three element number array to right-handed
|
|
1361
|
-
* @param vector number array to convert to right-handed
|
|
1362
|
-
*/
|
|
1363
|
-
static _GetRightHandedNormalArray3FromRef(vector: number[]): void;
|
|
1364
|
-
/**
|
|
1365
|
-
* Converts a Vector4 to right-handed
|
|
1366
|
-
* @param vector Vector4 to convert to right-handed
|
|
1367
|
-
*/
|
|
1368
|
-
static _GetRightHandedVector4FromRef(vector: Vector4): void;
|
|
1369
|
-
/**
|
|
1370
|
-
* Converts a Vector4 to right-handed
|
|
1371
|
-
* @param vector Vector4 to convert to right-handed
|
|
1372
|
-
*/
|
|
1373
|
-
static _GetRightHandedArray4FromRef(vector: number[]): void;
|
|
1374
|
-
/**
|
|
1375
|
-
* Converts a Quaternion to right-handed
|
|
1376
|
-
* @param quaternion Source quaternion to convert to right-handed
|
|
1377
|
-
*/
|
|
1378
|
-
static _GetRightHandedQuaternionFromRef(quaternion: Quaternion): void;
|
|
1379
|
-
/**
|
|
1380
|
-
* Converts a Quaternion to right-handed
|
|
1381
|
-
* @param quaternion Source quaternion to convert to right-handed
|
|
1382
|
-
*/
|
|
1383
|
-
static _GetRightHandedQuaternionArrayFromRef(quaternion: number[]): void;
|
|
1384
1281
|
static _NormalizeTangentFromRef(tangent: Vector4): void;
|
|
1385
1282
|
static _GetDataAccessorElementCount(accessorType: BABYLON.GLTF2.AccessorType): 1 | 3 | 2 | 4 | 9 | 16;
|
|
1386
1283
|
}
|