@babylonjs/loaders 9.12.0 → 9.12.1

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 (77) hide show
  1. package/FBX/fbxFileLoader.d.ts +194 -0
  2. package/FBX/fbxFileLoader.js +2440 -0
  3. package/FBX/fbxFileLoader.js.map +1 -0
  4. package/FBX/fbxFileLoader.metadata.d.ts +11 -0
  5. package/FBX/fbxFileLoader.metadata.js +11 -0
  6. package/FBX/fbxFileLoader.metadata.js.map +1 -0
  7. package/FBX/index.d.ts +3 -0
  8. package/FBX/index.js +3 -0
  9. package/FBX/index.js.map +1 -0
  10. package/FBX/interpreter/animation.d.ts +122 -0
  11. package/FBX/interpreter/animation.js +648 -0
  12. package/FBX/interpreter/animation.js.map +1 -0
  13. package/FBX/interpreter/blendShapes.d.ts +44 -0
  14. package/FBX/interpreter/blendShapes.js +192 -0
  15. package/FBX/interpreter/blendShapes.js.map +1 -0
  16. package/FBX/interpreter/connections.d.ts +95 -0
  17. package/FBX/interpreter/connections.js +233 -0
  18. package/FBX/interpreter/connections.js.map +1 -0
  19. package/FBX/interpreter/fbxInterpreter.d.ts +149 -0
  20. package/FBX/interpreter/fbxInterpreter.js +496 -0
  21. package/FBX/interpreter/fbxInterpreter.js.map +1 -0
  22. package/FBX/interpreter/geometry.d.ts +55 -0
  23. package/FBX/interpreter/geometry.js +573 -0
  24. package/FBX/interpreter/geometry.js.map +1 -0
  25. package/FBX/interpreter/materials.d.ts +50 -0
  26. package/FBX/interpreter/materials.js +144 -0
  27. package/FBX/interpreter/materials.js.map +1 -0
  28. package/FBX/interpreter/propertyTemplates.d.ts +22 -0
  29. package/FBX/interpreter/propertyTemplates.js +125 -0
  30. package/FBX/interpreter/propertyTemplates.js.map +1 -0
  31. package/FBX/interpreter/rig.d.ts +20 -0
  32. package/FBX/interpreter/rig.js +259 -0
  33. package/FBX/interpreter/rig.js.map +1 -0
  34. package/FBX/interpreter/sceneDiagnostics.d.ts +14 -0
  35. package/FBX/interpreter/sceneDiagnostics.js +55 -0
  36. package/FBX/interpreter/sceneDiagnostics.js.map +1 -0
  37. package/FBX/interpreter/skeleton.d.ts +93 -0
  38. package/FBX/interpreter/skeleton.js +515 -0
  39. package/FBX/interpreter/skeleton.js.map +1 -0
  40. package/FBX/interpreter/transform.d.ts +21 -0
  41. package/FBX/interpreter/transform.js +92 -0
  42. package/FBX/interpreter/transform.js.map +1 -0
  43. package/FBX/parsers/fbxAsciiParser.d.ts +5 -0
  44. package/FBX/parsers/fbxAsciiParser.js +330 -0
  45. package/FBX/parsers/fbxAsciiParser.js.map +1 -0
  46. package/FBX/parsers/fbxBinaryParser.d.ts +6 -0
  47. package/FBX/parsers/fbxBinaryParser.js +255 -0
  48. package/FBX/parsers/fbxBinaryParser.js.map +1 -0
  49. package/FBX/parsers/zlibInflate.d.ts +7 -0
  50. package/FBX/parsers/zlibInflate.js +350 -0
  51. package/FBX/parsers/zlibInflate.js.map +1 -0
  52. package/FBX/types/fbxTypes.d.ts +54 -0
  53. package/FBX/types/fbxTypes.js +66 -0
  54. package/FBX/types/fbxTypes.js.map +1 -0
  55. package/SPLAT/gaussianSplattingStream.d.ts +341 -0
  56. package/SPLAT/gaussianSplattingStream.js +976 -0
  57. package/SPLAT/gaussianSplattingStream.js.map +1 -0
  58. package/SPLAT/gaussianSplattingWorkBuffer.d.ts +51 -0
  59. package/SPLAT/gaussianSplattingWorkBuffer.js +159 -0
  60. package/SPLAT/gaussianSplattingWorkBuffer.js.map +1 -0
  61. package/SPLAT/gaussianSplattingWorkBufferShaders.d.ts +25 -0
  62. package/SPLAT/gaussianSplattingWorkBufferShaders.js +255 -0
  63. package/SPLAT/gaussianSplattingWorkBufferShaders.js.map +1 -0
  64. package/SPLAT/index.d.ts +1 -0
  65. package/SPLAT/index.js +1 -0
  66. package/SPLAT/index.js.map +1 -1
  67. package/SPLAT/sog.js +18 -16
  68. package/SPLAT/sog.js.map +1 -1
  69. package/SPLAT/splatFileLoader.d.ts +8 -0
  70. package/SPLAT/splatFileLoader.js +49 -0
  71. package/SPLAT/splatFileLoader.js.map +1 -1
  72. package/dynamic.js +9 -0
  73. package/dynamic.js.map +1 -1
  74. package/index.d.ts +1 -0
  75. package/index.js +1 -0
  76. package/index.js.map +1 -1
  77. package/package.json +3 -3
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Defines the FBX loader plugin metadata.
3
+ */
4
+ export const FBXFileLoaderMetadata = {
5
+ name: "fbx",
6
+ extensions: {
7
+ // eslint-disable-next-line @typescript-eslint/naming-convention
8
+ ".fbx": { isBinary: true },
9
+ },
10
+ };
11
+ //# sourceMappingURL=fbxFileLoader.metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fbxFileLoader.metadata.js","sourceRoot":"","sources":["../../../../dev/loaders/src/FBX/fbxFileLoader.metadata.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,IAAI,EAAE,KAAK;IAEX,UAAU,EAAE;QACR,gEAAgE;QAChE,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KACmB;CACN,CAAC","sourcesContent":["import { type ISceneLoaderPluginExtensions, type ISceneLoaderPluginMetadata } from \"core/index\";\r\n\r\n/**\r\n * Defines the FBX loader plugin metadata.\r\n */\r\nexport const FBXFileLoaderMetadata = {\r\n name: \"fbx\",\r\n\r\n extensions: {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n \".fbx\": { isBinary: true },\r\n } as const satisfies ISceneLoaderPluginExtensions,\r\n} as const satisfies ISceneLoaderPluginMetadata;\r\n"]}
package/FBX/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export { FBXFileLoader } from "./fbxFileLoader.js";
2
+ export type { FBXFileLoaderOptions, FBXNormalMapCoordinateSystem } from "./fbxFileLoader.js";
3
+ export { FBXFileLoaderMetadata } from "./fbxFileLoader.metadata.js";
package/FBX/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { FBXFileLoader } from "./fbxFileLoader.js";
2
+ export { FBXFileLoaderMetadata } from "./fbxFileLoader.metadata.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/loaders/src/FBX/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["export { FBXFileLoader } from \"./fbxFileLoader\";\r\nexport type { FBXFileLoaderOptions, FBXNormalMapCoordinateSystem } from \"./fbxFileLoader\";\r\nexport { FBXFileLoaderMetadata } from \"./fbxFileLoader.metadata\";\r\n"]}
@@ -0,0 +1,122 @@
1
+ import { type FBXObjectMap } from "./connections.js";
2
+ export type FBXInterpolationType = "constant" | "linear" | "cubic";
3
+ /** A single keyframe */
4
+ export interface FBXKeyframe {
5
+ /** Time in seconds */
6
+ time: number;
7
+ /** Value at this keyframe */
8
+ value: number;
9
+ /** Interpolation used from this key to the next key */
10
+ interpolation: FBXInterpolationType;
11
+ /** Constant interpolation variant */
12
+ constantMode?: "standard" | "next";
13
+ /** Cubic outgoing slope in value units per second */
14
+ rightSlope?: number;
15
+ /** Cubic incoming slope for the next key, in value units per second */
16
+ nextLeftSlope?: number;
17
+ }
18
+ /** An animation curve (one axis of one property) */
19
+ export interface FBXCurveData {
20
+ /** Channel: "d|X", "d|Y", "d|Z" */
21
+ channel: string;
22
+ /** Keyframes */
23
+ keys: FBXKeyframe[];
24
+ /** True for baked sample curves that should be connected as linear samples */
25
+ isSampled?: boolean;
26
+ }
27
+ /** An animation curve node (T/R/S for one bone) */
28
+ export interface FBXCurveNodeData {
29
+ /** Property type: "T" (translation), "R" (rotation), "S" (scale) */
30
+ type: string;
31
+ /** Target model (bone) ID */
32
+ targetModelId: number;
33
+ /** Curves for each axis */
34
+ curves: FBXCurveData[];
35
+ }
36
+ /** Unsupported animation curve node preserved for diagnostics and future support. */
37
+ export interface FBXUnsupportedCurveNodeData {
38
+ /** Raw AnimationCurveNode property type/name */
39
+ type: string;
40
+ /** CurveNode object ID */
41
+ id: number;
42
+ /** Target object ID if the curve node is connected to an object/property */
43
+ targetId: number | null;
44
+ /** OP connection property name on the target, e.g. Visibility */
45
+ propertyName?: string;
46
+ /** Number of connected animation curves that were ignored */
47
+ curveCount: number;
48
+ /** Connected curves preserved for diagnostics and future runtime support */
49
+ curves: FBXCurveData[];
50
+ /** Local default values stored on the unsupported curve node */
51
+ defaultValues: Record<string, number>;
52
+ }
53
+ /** Recoverable animation import issue. */
54
+ export interface FBXAnimationDiagnostic {
55
+ /** Diagnostic category. */
56
+ type: "multiple-animation-layers" | "unsupported-layer-blend-mode" | "partial-layer-weight" | "unsupported-curve-node";
57
+ /** Human-readable diagnostic message. */
58
+ message: string;
59
+ /** Animation layer name associated with the diagnostic, if applicable. */
60
+ layerName?: string;
61
+ /** AnimationCurveNode object ID associated with the diagnostic, if applicable. */
62
+ curveNodeId?: number;
63
+ /** AnimationCurveNode type/name associated with the diagnostic, if applicable. */
64
+ curveNodeType?: string;
65
+ /** Target object ID associated with the diagnostic, if applicable. */
66
+ targetId?: number | null;
67
+ /** Target property name associated with the diagnostic, if applicable. */
68
+ propertyName?: string;
69
+ }
70
+ /** Animation layer with blend mode info */
71
+ export interface FBXAnimationLayerData {
72
+ /** Layer name */
73
+ name: string;
74
+ /** Layer weight (0-100, default 100) */
75
+ weight: number;
76
+ /** Layer weight normalized to 0-1 */
77
+ normalizedWeight: number;
78
+ /** Blend mode: 0=Additive, 1=Override, 2=OverridePassthrough */
79
+ blendMode: number;
80
+ /** Curve nodes in this layer */
81
+ curveNodes: FBXCurveNodeData[];
82
+ /** Unsupported/non-TRS curve nodes preserved for diagnostics */
83
+ unsupportedCurveNodes: FBXUnsupportedCurveNodeData[];
84
+ /** Recoverable layer diagnostics */
85
+ diagnostics: FBXAnimationDiagnostic[];
86
+ }
87
+ /** One animation clip (AnimationStack) */
88
+ export interface FBXAnimationStackData {
89
+ /** Animation name */
90
+ name: string;
91
+ /** Clip start in seconds after any keyframe rebasing */
92
+ startTime: number;
93
+ /** Clip stop in seconds after any keyframe rebasing */
94
+ stopTime: number;
95
+ /** Duration in seconds */
96
+ duration: number;
97
+ /** Per-bone curve nodes (flattened from all layers for backward compat) */
98
+ curveNodes: FBXCurveNodeData[];
99
+ /** Animation layers (preserves blend mode info) */
100
+ layers: FBXAnimationLayerData[];
101
+ /** Unsupported/non-TRS curve nodes preserved for diagnostics */
102
+ unsupportedCurveNodes: FBXUnsupportedCurveNodeData[];
103
+ /** Recoverable animation diagnostics */
104
+ diagnostics: FBXAnimationDiagnostic[];
105
+ }
106
+ /**
107
+ * Extract all animation stacks from the FBX scene.
108
+ */
109
+ export declare function extractAnimations(objectMap: FBXObjectMap): FBXAnimationStackData[];
110
+ /**
111
+ * Determines whether a key sequence appears to be a uniformly frame-baked sampled curve.
112
+ * @param keys - Keyframes to inspect
113
+ * @returns true if the keys look like sampled frame data rather than authored interpolation
114
+ */
115
+ export declare function isFrameBakedSampledCurve(keys: readonly FBXKeyframe[]): boolean;
116
+ /**
117
+ * Samples an FBX animation curve at a specific time.
118
+ * @param curveData - Curve data to sample
119
+ * @param time - Time in seconds
120
+ * @returns The sampled value, or null when the curve has no keys
121
+ */
122
+ export declare function sampleFBXCurveAtTime(curveData: FBXCurveData | undefined, time: number): number | null;