mbt-3d 0.4.6 → 0.4.8
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 +11 -0
- package/dist/mbt-3d.cjs +2 -2
- package/dist/mbt-3d.cjs.map +1 -1
- package/dist/mbt-3d.js +822 -794
- package/dist/mbt-3d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -663,6 +663,14 @@ declare interface PointLightConfig extends BaseLightConfig {
|
|
|
663
663
|
|
|
664
664
|
export declare function preloadModel(url: string): void;
|
|
665
665
|
|
|
666
|
+
/**
|
|
667
|
+
* Preload standard (non-KTX2) textures into the global cache.
|
|
668
|
+
* Call this as early as possible (e.g. when inventory data loads) to ensure
|
|
669
|
+
* textures are ready before the model is mounted.
|
|
670
|
+
* KTX2 textures require a WebGL renderer — preload them via usePreloadTextures hook instead.
|
|
671
|
+
*/
|
|
672
|
+
export declare function preloadTextures(textures: Record<string, MaterialTextures_2 | string>): void;
|
|
673
|
+
|
|
666
674
|
/**
|
|
667
675
|
* WebGL renderer settings for light response and color mapping.
|
|
668
676
|
* Useful for physically based lighting tests.
|
|
@@ -696,6 +704,7 @@ export declare interface RendererConfig {
|
|
|
696
704
|
* @param camera - Camera configuration object. Example: `{ position: [0, 2, 5], fov: 45 }`
|
|
697
705
|
* @param camera.position - Camera position as [x, y, z]. Example: `[0, 2, 5]`. Default: `[0, 2, 5]`
|
|
698
706
|
* @param camera.fov - Field of view in degrees. Example: `45`. Default: `45`
|
|
707
|
+
* @param camera.roll - Camera roll angle around viewing direction in degrees. Example: `45`. Default: `0`
|
|
699
708
|
* @param controls - OrbitControls configuration object. Example: `{ enablePan: false, minDistance: 2, maxDistance: 10 }`
|
|
700
709
|
* @param controls.enabled - Enable/disable all controls. Default: `true`
|
|
701
710
|
* @param controls.enablePan - Enable camera panning with middle mouse. Default: `true`
|
|
@@ -794,6 +803,8 @@ export declare interface Scene3DProps {
|
|
|
794
803
|
position?: [number, number, number];
|
|
795
804
|
/** Field of view in degrees. Default: 45 */
|
|
796
805
|
fov?: number;
|
|
806
|
+
/** Camera roll angle around view direction in degrees. Default: 0 */
|
|
807
|
+
roll?: number;
|
|
797
808
|
};
|
|
798
809
|
/** OrbitControls configuration for camera rotation */
|
|
799
810
|
controls?: {
|