@tresjs/cientos 4.0.0-rc.2 → 4.0.1
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/abstractions/AnimatedSprite/Atlas.d.ts +0 -1
- package/dist/core/abstractions/AnimatedSprite/component.vue.d.ts +1 -5
- package/dist/core/abstractions/Lensflare/component.vue.d.ts +2 -3
- package/dist/core/abstractions/Lensflare/constants.d.ts +0 -1
- package/dist/core/abstractions/Lensflare/index.d.ts +0 -1
- package/dist/core/abstractions/PositionalAudio.vue.d.ts +0 -1
- package/dist/core/abstractions/Reflector.vue.d.ts +0 -1
- package/dist/core/abstractions/Text3D.vue.d.ts +1 -121
- package/dist/core/abstractions/index.d.ts +0 -1
- package/dist/core/abstractions/useAnimations.d.ts +0 -1
- package/dist/core/abstractions/useFBO/component.vue.d.ts +0 -1
- package/dist/core/abstractions/useFBO/index.d.ts +0 -1
- package/dist/core/abstractions/useSurfaceSampler/component.vue.d.ts +0 -1
- package/dist/core/abstractions/useSurfaceSampler/index.d.ts +0 -1
- package/dist/core/controls/CameraControls.vue.d.ts +356 -765
- package/dist/core/controls/KeyboardControls.vue.d.ts +1 -4
- package/dist/core/controls/MapControls.vue.d.ts +288 -667
- package/dist/core/controls/OrbitControls.vue.d.ts +288 -667
- package/dist/core/controls/PointerLockControls.vue.d.ts +2 -4
- package/dist/core/controls/TransformControls.vue.d.ts +1 -3
- package/dist/core/controls/index.d.ts +0 -1
- package/dist/core/loaders/SVG/component.vue.d.ts +0 -1
- package/dist/core/loaders/index.d.ts +0 -1
- package/dist/core/loaders/useFBX/index.d.ts +0 -1
- package/dist/core/loaders/useGLTF/index.d.ts +0 -1
- package/dist/core/loaders/useProgress.d.ts +0 -1
- package/dist/core/loaders/useVideoTexture.d.ts +0 -1
- package/dist/core/materials/customShaderMaterial/index.vue.d.ts +0 -1
- package/dist/core/materials/holographicMaterial/HolographicMaterialParameters.d.ts +2 -2
- package/dist/core/materials/holographicMaterial/index.vue.d.ts +0 -1
- package/dist/core/materials/index.d.ts +0 -1
- package/dist/core/materials/meshGlassMaterial/material.d.ts +0 -1
- package/dist/core/materials/meshReflectionMaterial/BlurPass.d.ts +2 -3
- package/dist/core/materials/meshReflectionMaterial/ConvolutionMaterial.d.ts +0 -1
- package/dist/core/materials/meshReflectionMaterial/index.vue.d.ts +0 -1
- package/dist/core/materials/meshReflectionMaterial/material.d.ts +0 -1
- package/dist/core/materials/meshWobbleMaterial/material.d.ts +8 -3
- package/dist/core/misc/html/HTML.vue.d.ts +2 -4
- package/dist/core/misc/html/utils.d.ts +0 -1
- package/dist/core/misc/index.d.ts +0 -1
- package/dist/core/misc/useGLTFExporter.d.ts +0 -1
- package/dist/core/shapes/Box.vue.d.ts +0 -1
- package/dist/core/shapes/CatmullRomCurve3.vue.d.ts +0 -1
- package/dist/core/shapes/Circle.vue.d.ts +0 -1
- package/dist/core/shapes/Cone.vue.d.ts +0 -1
- package/dist/core/shapes/Cylinder.vue.d.ts +0 -1
- package/dist/core/shapes/Dodecahedron.vue.d.ts +0 -1
- package/dist/core/shapes/Icosahedron.vue.d.ts +0 -1
- package/dist/core/shapes/Line2.vue.d.ts +0 -1
- package/dist/core/shapes/Octahedron.vue.d.ts +0 -1
- package/dist/core/shapes/Plane.vue.d.ts +0 -1
- package/dist/core/shapes/Ring.vue.d.ts +0 -1
- package/dist/core/shapes/RoundedBox.vue.d.ts +0 -1
- package/dist/core/shapes/Sphere.vue.d.ts +0 -1
- package/dist/core/shapes/Superformula.vue.d.ts +0 -1
- package/dist/core/shapes/Tetrahedron.vue.d.ts +0 -1
- package/dist/core/shapes/Torus.vue.d.ts +0 -1
- package/dist/core/shapes/TorusKnot.vue.d.ts +0 -1
- package/dist/core/shapes/Tube.vue.d.ts +0 -1
- package/dist/core/shapes/index.d.ts +1 -2
- package/dist/core/staging/ContactShadows.vue.d.ts +0 -1
- package/dist/core/staging/Fit.vue.d.ts +0 -1
- package/dist/core/staging/Ocean.vue.d.ts +0 -1
- package/dist/core/staging/Precipitation.vue.d.ts +1 -2
- package/dist/core/staging/Sky.vue.d.ts +0 -1
- package/dist/core/staging/Smoke.vue.d.ts +0 -1
- package/dist/core/staging/Sparkles/ShaderData.d.ts +0 -1
- package/dist/core/staging/Sparkles/ShaderDataBuilder.d.ts +0 -1
- package/dist/core/staging/Sparkles/component.vue.d.ts +1 -3
- package/dist/core/staging/Sparkles/useEmptyDataTexture.d.ts +0 -1
- package/dist/core/staging/index.d.ts +0 -1
- package/dist/core/staging/useEnvironment/component.vue.d.ts +2 -3
- package/dist/core/staging/useEnvironment/envSence.d.ts +0 -1
- package/dist/core/staging/useEnvironment/index.d.ts +1 -2
- package/dist/core/staging/useEnvironment/lightformer/index.vue.d.ts +0 -1
- package/dist/trescientos.js +2261 -2237
- package/dist/trescientos.umd.cjs +57 -57
- package/dist/utils/Gradient.d.ts +1 -3
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -1
- package/package.json +19 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Camera } from 'three';
|
|
2
|
-
|
|
2
|
+
import { TresControl } from '@tresjs/core';
|
|
3
3
|
export interface PointerLockControlsProps {
|
|
4
4
|
/**
|
|
5
5
|
* Whether to make this the default controls.
|
|
@@ -39,9 +39,7 @@ export interface PointerLockControlsProps {
|
|
|
39
39
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<PointerLockControlsProps>, {
|
|
40
40
|
makeDefault: boolean;
|
|
41
41
|
}>, {
|
|
42
|
-
instance: import('vue').Ref<
|
|
43
|
-
enabled: boolean;
|
|
44
|
-
}) | null>;
|
|
42
|
+
instance: import('vue').Ref<TresControl | null>;
|
|
45
43
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
46
44
|
change: (...args: any[]) => void;
|
|
47
45
|
isLock: (...args: any[]) => void;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ShallowRef } from 'vue';
|
|
2
1
|
import { Camera, Object3D } from 'three';
|
|
3
2
|
import { TransformControls } from 'three-stdlib';
|
|
4
|
-
|
|
5
3
|
export interface TransformControlsProps {
|
|
6
4
|
object: Object3D;
|
|
7
5
|
camera?: Camera;
|
|
@@ -27,7 +25,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
27
25
|
showY: boolean;
|
|
28
26
|
showZ: boolean;
|
|
29
27
|
}>, {
|
|
30
|
-
instance: ShallowRef<TransformControls<Camera> |
|
|
28
|
+
instance: import('vue').ShallowRef<TransformControls<Camera> | null>;
|
|
31
29
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
32
30
|
change: (...args: any[]) => void;
|
|
33
31
|
dragging: (...args: any[]) => void;
|
|
@@ -5,5 +5,4 @@ import { default as PointerLockControls } from './PointerLockControls.vue';
|
|
|
5
5
|
import { default as MapControls } from './MapControls.vue';
|
|
6
6
|
import { default as ScrollControls } from './ScrollControls.vue';
|
|
7
7
|
import { default as CameraControls, BaseCameraControls } from './CameraControls.vue';
|
|
8
|
-
|
|
9
8
|
export { OrbitControls, TransformControls, PointerLockControls, MapControls, KeyboardControls, ScrollControls, CameraControls, BaseCameraControls, };
|
|
@@ -3,7 +3,6 @@ import { default as FBXModel } from './useFBX/component.vue';
|
|
|
3
3
|
import { default as SVG } from './SVG/component.vue';
|
|
4
4
|
import { useProgress } from './useProgress';
|
|
5
5
|
import { useVideoTexture } from './useVideoTexture';
|
|
6
|
-
|
|
7
6
|
export * from './useGLTF';
|
|
8
7
|
export * from './useFBX';
|
|
9
8
|
export { FBXModel, GLTFModel, SVG, useProgress, useVideoTexture };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Color, ShaderMaterial, Blending, Side } from 'three';
|
|
2
|
-
|
|
1
|
+
import { Clock, Color, ShaderMaterial, Blending, Side } from 'three';
|
|
3
2
|
interface HolographicMaterialParameters {
|
|
4
3
|
time?: number;
|
|
5
4
|
fresnelOpacity?: number;
|
|
@@ -16,6 +15,7 @@ interface HolographicMaterialParameters {
|
|
|
16
15
|
depthTest?: boolean;
|
|
17
16
|
}
|
|
18
17
|
declare class HolographicMaterial extends ShaderMaterial {
|
|
18
|
+
clock: Clock;
|
|
19
19
|
/**
|
|
20
20
|
* Create a HolographicMaterial.
|
|
21
21
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TresColor } from '@tresjs/core';
|
|
2
2
|
import { Side } from 'three';
|
|
3
3
|
import { default as HolographicMaterial } from './HolographicMaterialParameters';
|
|
4
|
-
|
|
5
4
|
declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
|
|
6
5
|
fresnelAmount?: number;
|
|
7
6
|
fresnelOpacity?: number;
|
|
@@ -3,5 +3,4 @@ import { default as MeshGlassMaterial } from './meshGlassMaterial/index.vue';
|
|
|
3
3
|
import { default as CustomShaderMaterial } from './customShaderMaterial/index.vue';
|
|
4
4
|
import { default as MeshReflectionMaterial } from './meshReflectionMaterial/index.vue';
|
|
5
5
|
import { default as HolographicMaterial } from './holographicMaterial/index.vue';
|
|
6
|
-
|
|
7
6
|
export { MeshWobbleMaterial, MeshGlassMaterial, CustomShaderMaterial, MeshReflectionMaterial, HolographicMaterial };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MeshStandardMaterialParameters, MeshStandardMaterial } from 'three';
|
|
2
2
|
import { Vector2 } from 'three/src/math/Vector2.js';
|
|
3
3
|
import { Color } from 'three/src/math/Color.js';
|
|
4
|
-
|
|
5
4
|
declare class MeshGlassMaterial extends MeshStandardMaterial {
|
|
6
5
|
isMeshPhysicalMaterial: boolean;
|
|
7
6
|
clearcoatMap: null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Camera, Mesh, Scene, WebGLRenderTarget } from 'three';
|
|
1
|
+
import { WebGLRenderer, Camera, Mesh, Scene, WebGLRenderTarget } from 'three';
|
|
2
2
|
import { ConvolutionMaterial } from './ConvolutionMaterial';
|
|
3
|
-
|
|
4
3
|
export interface BlurPassProps {
|
|
5
4
|
resolution: number;
|
|
6
5
|
width?: number;
|
|
@@ -19,6 +18,6 @@ export declare class BlurPass {
|
|
|
19
18
|
readonly screen: Mesh;
|
|
20
19
|
renderToScreen: boolean;
|
|
21
20
|
constructor({ resolution, width, height, depthEdge0, depthEdge1, depthScale, depthBias, }: BlurPassProps);
|
|
22
|
-
render(renderer:
|
|
21
|
+
render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget): void;
|
|
23
22
|
dispose(): void;
|
|
24
23
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { MeshStandardMaterialParameters,
|
|
2
|
-
|
|
1
|
+
import { MeshStandardMaterialParameters, MeshStandardMaterial } from 'three';
|
|
3
2
|
interface Uniform<T> {
|
|
4
3
|
value: T;
|
|
5
4
|
}
|
|
@@ -7,7 +6,13 @@ export declare class WobbleMaterialImpl extends MeshStandardMaterial {
|
|
|
7
6
|
_time: Uniform<number>;
|
|
8
7
|
_factor: Uniform<number>;
|
|
9
8
|
constructor(parameters?: MeshStandardMaterialParameters);
|
|
10
|
-
onBeforeCompile(shader:
|
|
9
|
+
onBeforeCompile(shader: {
|
|
10
|
+
uniforms: {
|
|
11
|
+
time?: Uniform<number>;
|
|
12
|
+
factor?: Uniform<number>;
|
|
13
|
+
};
|
|
14
|
+
vertexShader: string;
|
|
15
|
+
}): void;
|
|
11
16
|
get time(): number;
|
|
12
17
|
set time(v: number);
|
|
13
18
|
get factor(): number;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
1
|
import { PlaneGeometry } from 'three';
|
|
3
2
|
import { TresObject3D } from '@tresjs/core';
|
|
4
3
|
import { Mutable } from '@vueuse/core';
|
|
5
|
-
|
|
6
4
|
export interface HTMLProps {
|
|
7
5
|
geometry?: any;
|
|
8
6
|
material?: any;
|
|
@@ -17,7 +15,7 @@ export interface HTMLProps {
|
|
|
17
15
|
pointerEvents?: PointerEventsProperties;
|
|
18
16
|
sprite?: boolean;
|
|
19
17
|
zIndexRange?: Array<number>;
|
|
20
|
-
occlude?:
|
|
18
|
+
occlude?: TresObject3D | null | (TresObject3D | null)[] | boolean | 'raycast' | 'blending';
|
|
21
19
|
}
|
|
22
20
|
type PointerEventsProperties = 'auto' | 'none' | 'visiblePainted' | 'visibleFill' | 'visibleStroke' | 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | 'inherit';
|
|
23
21
|
declare function __VLS_template(): Readonly<Record<string, any>> & Record<string, any>;
|
|
@@ -30,7 +28,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
30
28
|
pointerEvents: string;
|
|
31
29
|
sprite: boolean;
|
|
32
30
|
}>, {
|
|
33
|
-
instance: Ref<TresObject3D | undefined>;
|
|
31
|
+
instance: import('vue').Ref<TresObject3D | undefined>;
|
|
34
32
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
33
|
onOcclude: (...args: any[]) => void;
|
|
36
34
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<HTMLProps>, {
|
|
@@ -16,5 +16,4 @@ import { default as Tetrahedron } from './Tetrahedron.vue';
|
|
|
16
16
|
import { default as Torus } from './Torus.vue';
|
|
17
17
|
import { default as TorusKnot } from './TorusKnot.vue';
|
|
18
18
|
import { default as Tube } from './Tube.vue';
|
|
19
|
-
|
|
20
|
-
export { Box, CatmullRomCurve3, Circle, Cone, Cylinder, Dodecahedron, Icosahedron, Line2, Octahedron, Plane, Ring, RoundedBox, Sphere, Superformula, Tetrahedron, Torus, TorusKnot, Tube, };
|
|
19
|
+
export { Box, CatmullRomCurve3, Circle, Cylinder, Cone, Dodecahedron, Icosahedron, Line2, Octahedron, Plane, Ring, RoundedBox, Sphere, Superformula, Tetrahedron, Torus, TorusKnot, Tube, };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { TresColor } from '@tresjs/core';
|
|
2
|
-
|
|
3
2
|
export interface PrecipitationProps {
|
|
4
3
|
/**
|
|
5
4
|
* The size of the drops.
|
|
@@ -138,7 +137,6 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
138
137
|
}>>>, {
|
|
139
138
|
size: number;
|
|
140
139
|
color: TresColor;
|
|
141
|
-
area: [number, number, number];
|
|
142
140
|
speed: number;
|
|
143
141
|
count: number;
|
|
144
142
|
alphaTest: number;
|
|
@@ -146,6 +144,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
146
144
|
sizeAttenuation: boolean;
|
|
147
145
|
transparent: boolean;
|
|
148
146
|
opacity: number;
|
|
147
|
+
area: [number, number, number];
|
|
149
148
|
randomness: number;
|
|
150
149
|
}, {}>;
|
|
151
150
|
export default _default;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataTexture } from 'three';
|
|
2
2
|
import { MaybeRef, Ref } from 'vue';
|
|
3
3
|
import { GradientScalar, GradientTresColor, GradientVectorFlexibleParams } from './../../../utils/Gradient';
|
|
4
|
-
|
|
5
4
|
export type CanvasGradientRenderer<T> = (g: CanvasGradient, entry: ShaderDataEntry<T>) => void;
|
|
6
5
|
export declare class ShaderData {
|
|
7
6
|
private entries;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MaybeRef } from 'vue';
|
|
2
2
|
import { GradientScalar, GradientTresColor, GradientVectorFlexibleParams } from './../../../utils/Gradient';
|
|
3
3
|
import { CanvasGradientRenderer, ShaderDataEntry, ShaderData } from './ShaderData';
|
|
4
|
-
|
|
5
4
|
type rgbaSuffixes = ['r', 'rg', 'rgb', 'rgba'];
|
|
6
5
|
type xyzwSuffixes = ['x', 'xy', 'xyz', 'xyzw'];
|
|
7
6
|
type ShaderSuffix = (rgbaSuffixes)[number] | (xyzwSuffixes)[number];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Blending, BufferGeometry, Texture, Object3D, Points, ShaderMaterial } from 'three';
|
|
2
|
-
import { TresColor } from '@tresjs/core';
|
|
3
|
-
import { VectorFlexibleParams } from '@tresjs/core/dist/utils/normalize';
|
|
2
|
+
import { TresColor, VectorFlexibleParams } from '@tresjs/core';
|
|
4
3
|
import { Gradient } from '../../../utils/Gradient';
|
|
5
|
-
|
|
6
4
|
interface SparkleProps {
|
|
7
5
|
/**
|
|
8
6
|
* Texture or image path for individual sparkles
|
|
@@ -9,5 +9,4 @@ import { default as Smoke } from './Smoke.vue';
|
|
|
9
9
|
import { default as Sparkles } from './Sparkles/component.vue';
|
|
10
10
|
import { default as Stars } from './Stars.vue';
|
|
11
11
|
import { default as Ocean } from './Ocean.vue';
|
|
12
|
-
|
|
13
12
|
export { Backdrop, ContactShadows, Environment, Fit, Precipitation, Sky, Smoke, Sparkles, Stars, Ocean, Lightformer, };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { CubeTexture, Texture } from 'three';
|
|
3
3
|
import { EnvironmentOptions } from './const';
|
|
4
|
-
|
|
5
4
|
declare function __VLS_template(): {
|
|
6
5
|
default?(_: {}): any;
|
|
7
6
|
};
|
|
8
7
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
|
|
9
8
|
background: boolean;
|
|
10
9
|
blur: number;
|
|
11
|
-
files: never[];
|
|
10
|
+
files: () => never[];
|
|
12
11
|
path: string;
|
|
13
12
|
preset: undefined;
|
|
14
13
|
resolution: number;
|
|
@@ -20,7 +19,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<
|
|
|
20
19
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<EnvironmentOptions>, {
|
|
21
20
|
background: boolean;
|
|
22
21
|
blur: number;
|
|
23
|
-
files: never[];
|
|
22
|
+
files: () => never[];
|
|
24
23
|
path: string;
|
|
25
24
|
preset: undefined;
|
|
26
25
|
resolution: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CubeTexture, Texture, WebGLCubeRenderTarget } from 'three';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { EnvironmentOptions } from './const';
|
|
4
|
-
|
|
5
|
-
export declare function useEnvironment(options: Partial<EnvironmentOptions>, fbo: Ref<WebGLCubeRenderTarget | undefined>): Promise<Texture | CubeTexture>;
|
|
4
|
+
export declare function useEnvironment(options: Partial<EnvironmentOptions>, fbo: Ref<WebGLCubeRenderTarget | null>): Promise<Ref<Texture | CubeTexture | null>>;
|