@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.
@@ -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
- export { FBXModel, GLTFModel, useProgress };
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 {};
@@ -1,2 +1,3 @@
1
1
  import MeshWobbleMaterial from './meshWobbleMaterial/index.vue';
2
- export { MeshWobbleMaterial };
2
+ import MeshGlassMaterial from './meshGlassMaterial/index.vue';
3
+ export { MeshWobbleMaterial, MeshGlassMaterial };
@@ -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 {};