mbt-3d 0.4.8 → 0.4.10
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/dist/index.d.ts +26 -1
- package/dist/mbt-3d.cjs +2 -2
- package/dist/mbt-3d.cjs.map +1 -1
- package/dist/mbt-3d.js +835 -765
- package/dist/mbt-3d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -255,6 +255,12 @@ export declare interface AnimatedModelProps extends Omit<ModelProps, 'onLoad'> {
|
|
|
255
255
|
materialTextures?: Record<string, MaterialTextures | string>;
|
|
256
256
|
/** Enable verbose material texture logs for this model instance. Default: false */
|
|
257
257
|
materialTextureLogging?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* Names of eye bone objects to animate with mouse-follow behavior.
|
|
260
|
+
* When provided, the model's eyes will track the mouse cursor.
|
|
261
|
+
* @example eyeNames={['Eye_L', 'Eye_R']}
|
|
262
|
+
*/
|
|
263
|
+
eyeNames?: string[];
|
|
258
264
|
/** Callback when model loads with extended metadata including animations */
|
|
259
265
|
onLoad?: (info: AnimatedModelInfo) => void;
|
|
260
266
|
}
|
|
@@ -452,7 +458,7 @@ declare interface MaterialTextures_2 {
|
|
|
452
458
|
* />
|
|
453
459
|
* ```
|
|
454
460
|
*/
|
|
455
|
-
export declare function Model({ url, position, rotation, scale, meshVisibility, materialColors, materialTextures, materialTextureLogging, onLoad, onError: _onError, }: ModelProps): JSX_2.Element;
|
|
461
|
+
export declare function Model({ url, position, rotation, scale, meshVisibility, materialColors, materialTextures, materialTextureLogging, onLoad, onTexturesLoaded, onError: _onError, }: ModelProps): JSX_2.Element;
|
|
456
462
|
|
|
457
463
|
export declare namespace Model {
|
|
458
464
|
var preload: (url: string) => void;
|
|
@@ -506,6 +512,8 @@ export declare interface ModelProps {
|
|
|
506
512
|
onLoad?: (info: ModelInfo) => void;
|
|
507
513
|
/** Callback when model fails to load */
|
|
508
514
|
onError?: (error: Error) => void;
|
|
515
|
+
/** Callback when textures have finished loading and applying */
|
|
516
|
+
onTexturesLoaded?: () => void;
|
|
509
517
|
}
|
|
510
518
|
|
|
511
519
|
/**
|
|
@@ -918,6 +926,19 @@ declare interface UseClonedModelOptions {
|
|
|
918
926
|
onError?: (error: Error) => void;
|
|
919
927
|
}
|
|
920
928
|
|
|
929
|
+
/**
|
|
930
|
+
* Animates eye bones to follow the mouse cursor.
|
|
931
|
+
*
|
|
932
|
+
* @param scene - The THREE.Group scene containing the eye bones
|
|
933
|
+
* @param eyeNames - Names of eye bone objects to animate. Pass an empty array to disable.
|
|
934
|
+
*
|
|
935
|
+
* @example
|
|
936
|
+
* ```tsx
|
|
937
|
+
* useEyeAnimation(scene, ['Eye_L', 'Eye_R']);
|
|
938
|
+
* ```
|
|
939
|
+
*/
|
|
940
|
+
export declare const useEyeAnimation: (scene: THREE.Object3D, eyeNames?: readonly string[]) => void;
|
|
941
|
+
|
|
921
942
|
/**
|
|
922
943
|
* Hook for managing material colors in a 3D scene
|
|
923
944
|
*
|
|
@@ -954,6 +975,10 @@ declare interface UseMaterialTextureOptions {
|
|
|
954
975
|
* Enable verbose texture lifecycle logs (disabled by default).
|
|
955
976
|
*/
|
|
956
977
|
enableLogging?: boolean;
|
|
978
|
+
/**
|
|
979
|
+
* Callback fired when all textures for the material have finished downloading and applying.
|
|
980
|
+
*/
|
|
981
|
+
onTexturesLoaded?: () => void;
|
|
957
982
|
}
|
|
958
983
|
|
|
959
984
|
/**
|