mbt-3d 0.4.7 → 0.4.9

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 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
  }
@@ -704,6 +710,7 @@ export declare interface RendererConfig {
704
710
  * @param camera - Camera configuration object. Example: `{ position: [0, 2, 5], fov: 45 }`
705
711
  * @param camera.position - Camera position as [x, y, z]. Example: `[0, 2, 5]`. Default: `[0, 2, 5]`
706
712
  * @param camera.fov - Field of view in degrees. Example: `45`. Default: `45`
713
+ * @param camera.roll - Camera roll angle around viewing direction in degrees. Example: `45`. Default: `0`
707
714
  * @param controls - OrbitControls configuration object. Example: `{ enablePan: false, minDistance: 2, maxDistance: 10 }`
708
715
  * @param controls.enabled - Enable/disable all controls. Default: `true`
709
716
  * @param controls.enablePan - Enable camera panning with middle mouse. Default: `true`
@@ -802,6 +809,8 @@ export declare interface Scene3DProps {
802
809
  position?: [number, number, number];
803
810
  /** Field of view in degrees. Default: 45 */
804
811
  fov?: number;
812
+ /** Camera roll angle around view direction in degrees. Default: 0 */
813
+ roll?: number;
805
814
  };
806
815
  /** OrbitControls configuration for camera rotation */
807
816
  controls?: {
@@ -915,6 +924,19 @@ declare interface UseClonedModelOptions {
915
924
  onError?: (error: Error) => void;
916
925
  }
917
926
 
927
+ /**
928
+ * Animates eye bones to follow the mouse cursor.
929
+ *
930
+ * @param scene - The THREE.Group scene containing the eye bones
931
+ * @param eyeNames - Names of eye bone objects to animate. Pass an empty array to disable.
932
+ *
933
+ * @example
934
+ * ```tsx
935
+ * useEyeAnimation(scene, ['Eye_L', 'Eye_R']);
936
+ * ```
937
+ */
938
+ export declare const useEyeAnimation: (scene: THREE.Object3D, eyeNames?: readonly string[]) => void;
939
+
918
940
  /**
919
941
  * Hook for managing material colors in a 3D scene
920
942
  *