@tresjs/cientos 3.1.0 → 3.2.0
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/core/controls/CameraControls.vue.d.ts +1540 -14
- package/dist/core/loaders/index.d.ts +2 -1
- package/dist/core/loaders/useVideoTexture.d.ts +28 -0
- package/dist/core/materials/index.d.ts +2 -1
- package/dist/core/materials/meshGlassMaterial/index.vue.d.ts +4 -0
- package/dist/core/materials/meshGlassMaterial/material.d.ts +30 -0
- package/dist/core/misc/useTweakPane/index.d.ts +1 -1
- package/dist/trescientos.js +3282 -2358
- package/dist/trescientos.umd.cjs +13 -13
- package/package.json +20 -21
|
@@ -3,4 +3,5 @@ import FBXModel from './useFBX/component.vue';
|
|
|
3
3
|
export * from './useGLTF';
|
|
4
4
|
export * from './useFBX';
|
|
5
5
|
import { useProgress } from './useProgress';
|
|
6
|
-
|
|
6
|
+
import { useVideoTexture } from './useVideoTexture';
|
|
7
|
+
export { FBXModel, GLTFModel, useProgress, useVideoTexture };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VideoTexture } from 'three';
|
|
2
|
+
interface VideoTextureProps extends HTMLVideoElement {
|
|
3
|
+
unsuspend?: 'canplay' | 'canplaythrough' | 'loadstart' | 'loadedmetadata';
|
|
4
|
+
start?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Composable for loading video textures.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { ref } from 'vue'
|
|
11
|
+
* import { useVideoTexture } from '@tresjs/cientos'
|
|
12
|
+
* import MyVideo from 'MyVideo.mp4'
|
|
13
|
+
*
|
|
14
|
+
* const texture = ref()
|
|
15
|
+
* texture.value = await useVideoTexture(MyVideo)
|
|
16
|
+
* ```
|
|
17
|
+
* Then you can use the texture in your material.
|
|
18
|
+
*
|
|
19
|
+
* ```vue
|
|
20
|
+
* <TresMeshBasicMaterial :map="texture" />
|
|
21
|
+
* ```
|
|
22
|
+
* @see https://threejs.org/docs/index.html?q=video#api/en/textures/VideoTexture
|
|
23
|
+
* @export
|
|
24
|
+
* @param {HTMLVideoElement} src
|
|
25
|
+
* @return {VideoTexture} {VideoTexture}
|
|
26
|
+
*/
|
|
27
|
+
export declare function useVideoTexture(src: string | MediaStream, options?: Partial<VideoTextureProps>): Promise<void | VideoTexture>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
MeshGlassMaterialClass: import("vue").ShallowRef<any>;
|
|
3
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { MeshStandardMaterial, MeshStandardMaterialParameters } from 'three';
|
|
2
|
+
import { Vector2 } from 'three/src/math/Vector2.js';
|
|
3
|
+
import { Color } from 'three/src/math/Color.js';
|
|
4
|
+
declare class MeshGlassMaterial extends MeshStandardMaterial {
|
|
5
|
+
isMeshPhysicalMaterial: boolean;
|
|
6
|
+
clearcoatMap: null;
|
|
7
|
+
clearcoatRoughness: number;
|
|
8
|
+
clearcoatRoughnessMap: null;
|
|
9
|
+
clearcoatNormalScale: Vector2;
|
|
10
|
+
clearcoatNormalMap: null;
|
|
11
|
+
ior: number;
|
|
12
|
+
transmissionMap: null;
|
|
13
|
+
thickness: number;
|
|
14
|
+
thicknessMap: null;
|
|
15
|
+
attenuationDistance: number;
|
|
16
|
+
attenuationColor: Color;
|
|
17
|
+
specularIntensity: number;
|
|
18
|
+
specularIntensityMap: null;
|
|
19
|
+
specularColor: Color;
|
|
20
|
+
specularColorMap: null;
|
|
21
|
+
_clearcoat: number;
|
|
22
|
+
_transmission: number;
|
|
23
|
+
constructor(parameters?: MeshStandardMaterialParameters);
|
|
24
|
+
get clearcoat(): number;
|
|
25
|
+
set clearcoat(value: number);
|
|
26
|
+
get transmission(): number;
|
|
27
|
+
set transmission(value: number);
|
|
28
|
+
copy(source: any): this;
|
|
29
|
+
}
|
|
30
|
+
export default MeshGlassMaterial;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Pane } from 'tweakpane';
|
|
2
2
|
type TweakPane = Pane & {
|
|
3
3
|
addBlade(blade: any): void;
|
|
4
|
+
addInput(blade: any): void;
|
|
4
5
|
};
|
|
5
6
|
export declare const useTweakPane: (selector?: string) => {
|
|
6
7
|
pane: TweakPane;
|
|
7
|
-
fpsGraph: any;
|
|
8
8
|
disposeTweakPane: () => void;
|
|
9
9
|
};
|
|
10
10
|
export {};
|