@babylonjs/serializers 5.0.0-beta.8 → 5.0.0-beta.8-snapshot

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.
Files changed (79) hide show
  1. package/package.json +20 -105
  2. package/OBJ/index.d.ts +0 -1
  3. package/OBJ/index.js +0 -2
  4. package/OBJ/index.js.map +0 -1
  5. package/OBJ/objSerializer.d.ts +0 -21
  6. package/OBJ/objSerializer.js +0 -160
  7. package/OBJ/objSerializer.js.map +0 -1
  8. package/glTF/2.0/Extensions/KHR_lights_punctual.d.ts +0 -38
  9. package/glTF/2.0/Extensions/KHR_lights_punctual.js +0 -174
  10. package/glTF/2.0/Extensions/KHR_lights_punctual.js.map +0 -1
  11. package/glTF/2.0/Extensions/KHR_materials_clearcoat.d.ts +0 -24
  12. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js +0 -91
  13. package/glTF/2.0/Extensions/KHR_materials_clearcoat.js.map +0 -1
  14. package/glTF/2.0/Extensions/KHR_materials_sheen.d.ts +0 -24
  15. package/glTF/2.0/Extensions/KHR_materials_sheen.js +0 -74
  16. package/glTF/2.0/Extensions/KHR_materials_sheen.js.map +0 -1
  17. package/glTF/2.0/Extensions/KHR_materials_unlit.d.ts +0 -21
  18. package/glTF/2.0/Extensions/KHR_materials_unlit.js +0 -52
  19. package/glTF/2.0/Extensions/KHR_materials_unlit.js.map +0 -1
  20. package/glTF/2.0/Extensions/KHR_texture_transform.d.ts +0 -34
  21. package/glTF/2.0/Extensions/KHR_texture_transform.js +0 -137
  22. package/glTF/2.0/Extensions/KHR_texture_transform.js.map +0 -1
  23. package/glTF/2.0/Extensions/index.d.ts +0 -5
  24. package/glTF/2.0/Extensions/index.js +0 -6
  25. package/glTF/2.0/Extensions/index.js.map +0 -1
  26. package/glTF/2.0/glTFAnimation.d.ts +0 -200
  27. package/glTF/2.0/glTFAnimation.js +0 -840
  28. package/glTF/2.0/glTFAnimation.js.map +0 -1
  29. package/glTF/2.0/glTFData.d.ts +0 -19
  30. package/glTF/2.0/glTFData.js +0 -53
  31. package/glTF/2.0/glTFData.js.map +0 -1
  32. package/glTF/2.0/glTFExporter.d.ts +0 -445
  33. package/glTF/2.0/glTFExporter.js +0 -1943
  34. package/glTF/2.0/glTFExporter.js.map +0 -1
  35. package/glTF/2.0/glTFExporterExtension.d.ts +0 -74
  36. package/glTF/2.0/glTFExporterExtension.js +0 -3
  37. package/glTF/2.0/glTFExporterExtension.js.map +0 -1
  38. package/glTF/2.0/glTFMaterialExporter.d.ts +0 -230
  39. package/glTF/2.0/glTFMaterialExporter.js +0 -1143
  40. package/glTF/2.0/glTFMaterialExporter.js.map +0 -1
  41. package/glTF/2.0/glTFSerializer.d.ts +0 -60
  42. package/glTF/2.0/glTFSerializer.js +0 -63
  43. package/glTF/2.0/glTFSerializer.js.map +0 -1
  44. package/glTF/2.0/glTFUtilities.d.ts +0 -96
  45. package/glTF/2.0/glTFUtilities.js +0 -196
  46. package/glTF/2.0/glTFUtilities.js.map +0 -1
  47. package/glTF/2.0/index.d.ts +0 -8
  48. package/glTF/2.0/index.js +0 -9
  49. package/glTF/2.0/index.js.map +0 -1
  50. package/glTF/2.0/shaders/textureTransform.fragment.d.ts +0 -5
  51. package/glTF/2.0/shaders/textureTransform.fragment.js +0 -7
  52. package/glTF/2.0/shaders/textureTransform.fragment.js.map +0 -1
  53. package/glTF/glTFFileExporter.d.ts +0 -20
  54. package/glTF/glTFFileExporter.js +0 -3
  55. package/glTF/glTFFileExporter.js.map +0 -1
  56. package/glTF/index.d.ts +0 -2
  57. package/glTF/index.js +0 -3
  58. package/glTF/index.js.map +0 -1
  59. package/index.d.ts +0 -3
  60. package/index.js.map +0 -1
  61. package/legacy/legacy-glTF2Serializer.d.ts +0 -2
  62. package/legacy/legacy-glTF2Serializer.js +0 -44
  63. package/legacy/legacy-glTF2Serializer.js.map +0 -1
  64. package/legacy/legacy-objSerializer.d.ts +0 -1
  65. package/legacy/legacy-objSerializer.js +0 -13
  66. package/legacy/legacy-objSerializer.js.map +0 -1
  67. package/legacy/legacy-stlSerializer.d.ts +0 -1
  68. package/legacy/legacy-stlSerializer.js +0 -13
  69. package/legacy/legacy-stlSerializer.js.map +0 -1
  70. package/legacy/legacy.d.ts +0 -4
  71. package/legacy/legacy.js +0 -5
  72. package/legacy/legacy.js.map +0 -1
  73. package/readme.md +0 -29
  74. package/stl/index.d.ts +0 -1
  75. package/stl/index.js +0 -2
  76. package/stl/index.js.map +0 -1
  77. package/stl/stlSerializer.d.ts +0 -17
  78. package/stl/stlSerializer.js +0 -108
  79. package/stl/stlSerializer.js.map +0 -1
@@ -1,200 +0,0 @@
1
- import { AnimationSamplerInterpolation, AnimationChannelTargetPath, AccessorType, IAnimation, INode, IBufferView, IAccessor } from "babylonjs-gltf2interface";
2
- import { Node } from "@babylonjs/core/node";
3
- import { Nullable } from "@babylonjs/core/types";
4
- import { Animation } from "@babylonjs/core/Animations/animation";
5
- import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
6
- import { Scene } from "@babylonjs/core/scene";
7
- import { _BinaryWriter } from "./glTFExporter";
8
- /**
9
- * @hidden
10
- * Interface to store animation data.
11
- */
12
- export interface _IAnimationData {
13
- /**
14
- * Keyframe data.
15
- */
16
- inputs: number[];
17
- /**
18
- * Value data.
19
- */
20
- outputs: number[][];
21
- /**
22
- * Animation interpolation data.
23
- */
24
- samplerInterpolation: AnimationSamplerInterpolation;
25
- /**
26
- * Minimum keyframe value.
27
- */
28
- inputsMin: number;
29
- /**
30
- * Maximum keyframe value.
31
- */
32
- inputsMax: number;
33
- }
34
- /**
35
- * @hidden
36
- */
37
- export interface _IAnimationInfo {
38
- /**
39
- * The target channel for the animation
40
- */
41
- animationChannelTargetPath: AnimationChannelTargetPath;
42
- /**
43
- * The glTF accessor type for the data.
44
- */
45
- dataAccessorType: AccessorType.VEC3 | AccessorType.VEC4 | AccessorType.SCALAR;
46
- /**
47
- * Specifies if quaternions should be used.
48
- */
49
- useQuaternion: boolean;
50
- }
51
- /**
52
- * @hidden
53
- * Utility class for generating glTF animation data from BabylonJS.
54
- */
55
- export declare class _GLTFAnimation {
56
- /**
57
- * @ignore
58
- *
59
- * Creates glTF channel animation from BabylonJS animation.
60
- * @param babylonTransformNode - BabylonJS mesh.
61
- * @param animation - animation.
62
- * @param animationChannelTargetPath - The target animation channel.
63
- * @param convertToRightHandedSystem - Specifies if the values should be converted to right-handed.
64
- * @param useQuaternion - Specifies if quaternions are used.
65
- * @returns nullable IAnimationData
66
- */
67
- static _CreateNodeAnimation(babylonTransformNode: TransformNode, animation: Animation, animationChannelTargetPath: AnimationChannelTargetPath, convertToRightHandedSystem: boolean, useQuaternion: boolean, animationSampleRate: number): Nullable<_IAnimationData>;
68
- private static _DeduceAnimationInfo;
69
- /**
70
- * @ignore
71
- * Create node animations from the transform node animations
72
- * @param babylonNode
73
- * @param runtimeGLTFAnimation
74
- * @param idleGLTFAnimations
75
- * @param nodeMap
76
- * @param nodes
77
- * @param binaryWriter
78
- * @param bufferViews
79
- * @param accessors
80
- * @param convertToRightHandedSystem
81
- * @param animationSampleRate
82
- */
83
- static _CreateNodeAnimationFromNodeAnimations(babylonNode: Node, runtimeGLTFAnimation: IAnimation, idleGLTFAnimations: IAnimation[], nodeMap: {
84
- [key: number]: number;
85
- }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
86
- /**
87
- * @ignore
88
- * Create individual morph animations from the mesh's morph target animation tracks
89
- * @param babylonNode
90
- * @param runtimeGLTFAnimation
91
- * @param idleGLTFAnimations
92
- * @param nodeMap
93
- * @param nodes
94
- * @param binaryWriter
95
- * @param bufferViews
96
- * @param accessors
97
- * @param convertToRightHandedSystem
98
- * @param animationSampleRate
99
- */
100
- static _CreateMorphTargetAnimationFromMorphTargetAnimations(babylonNode: Node, runtimeGLTFAnimation: IAnimation, idleGLTFAnimations: IAnimation[], nodeMap: {
101
- [key: number]: number;
102
- }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystem: boolean, animationSampleRate: number): void;
103
- /**
104
- * @ignore
105
- * Create node and morph animations from the animation groups
106
- * @param babylonScene
107
- * @param glTFAnimations
108
- * @param nodeMap
109
- * @param nodes
110
- * @param binaryWriter
111
- * @param bufferViews
112
- * @param accessors
113
- * @param convertToRightHandedSystemMap
114
- * @param animationSampleRate
115
- */
116
- static _CreateNodeAndMorphAnimationFromAnimationGroups(babylonScene: Scene, glTFAnimations: IAnimation[], nodeMap: {
117
- [key: number]: number;
118
- }, nodes: INode[], binaryWriter: _BinaryWriter, bufferViews: IBufferView[], accessors: IAccessor[], convertToRightHandedSystemMap: {
119
- [nodeId: number]: boolean;
120
- }, animationSampleRate: number): void;
121
- private static AddAnimation;
122
- /**
123
- * Create a baked animation
124
- * @param babylonTransformNode BabylonJS mesh
125
- * @param animation BabylonJS animation corresponding to the BabylonJS mesh
126
- * @param animationChannelTargetPath animation target channel
127
- * @param minFrame minimum animation frame
128
- * @param maxFrame maximum animation frame
129
- * @param fps frames per second of the animation
130
- * @param inputs input key frames of the animation
131
- * @param outputs output key frame data of the animation
132
- * @param convertToRightHandedSystem converts the values to right-handed
133
- * @param useQuaternion specifies if quaternions should be used
134
- */
135
- private static _CreateBakedAnimation;
136
- private static _ConvertFactorToVector3OrQuaternion;
137
- private static _SetInterpolatedValue;
138
- /**
139
- * Creates linear animation from the animation key frames
140
- * @param babylonTransformNode BabylonJS mesh
141
- * @param animation BabylonJS animation
142
- * @param animationChannelTargetPath The target animation channel
143
- * @param frameDelta The difference between the last and first frame of the animation
144
- * @param inputs Array to store the key frame times
145
- * @param outputs Array to store the key frame data
146
- * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
147
- * @param useQuaternion Specifies if quaternions are used in the animation
148
- */
149
- private static _CreateLinearOrStepAnimation;
150
- /**
151
- * Creates cubic spline animation from the animation key frames
152
- * @param babylonTransformNode BabylonJS mesh
153
- * @param animation BabylonJS animation
154
- * @param animationChannelTargetPath The target animation channel
155
- * @param frameDelta The difference between the last and first frame of the animation
156
- * @param inputs Array to store the key frame times
157
- * @param outputs Array to store the key frame data
158
- * @param convertToRightHandedSystem Specifies if the position data should be converted to right handed
159
- * @param useQuaternion Specifies if quaternions are used in the animation
160
- */
161
- private static _CreateCubicSplineAnimation;
162
- private static _GetBasePositionRotationOrScale;
163
- /**
164
- * Adds a key frame value
165
- * @param keyFrame
166
- * @param animation
167
- * @param outputs
168
- * @param animationChannelTargetPath
169
- * @param basePositionRotationOrScale
170
- * @param convertToRightHandedSystem
171
- * @param useQuaternion
172
- */
173
- private static _AddKeyframeValue;
174
- /**
175
- * Determine the interpolation based on the key frames
176
- * @param keyFrames
177
- * @param animationChannelTargetPath
178
- * @param useQuaternion
179
- */
180
- private static _DeduceInterpolation;
181
- /**
182
- * Adds an input tangent or output tangent to the output data
183
- * If an input tangent or output tangent is missing, it uses the zero vector or zero quaternion
184
- * @param tangentType Specifies which type of tangent to handle (inTangent or outTangent)
185
- * @param outputs The animation data by keyframe
186
- * @param animationChannelTargetPath The target animation channel
187
- * @param interpolation The interpolation type
188
- * @param keyFrame The key frame with the animation data
189
- * @param frameDelta Time difference between two frames used to scale the tangent by the frame delta
190
- * @param useQuaternion Specifies if quaternions are used
191
- * @param convertToRightHandedSystem Specifies if the values should be converted to right-handed
192
- */
193
- private static AddSplineTangent;
194
- /**
195
- * Get the minimum and maximum key frames' frame values
196
- * @param keyFrames animation key frames
197
- * @returns the minimum and maximum key frame value
198
- */
199
- private static calculateMinMaxKeyFrames;
200
- }