@tresjs/core 1.8.1 → 2.0.0-alpha.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/components/TresCanvas.d.ts +19 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/composables/index.d.ts +7 -0
- package/dist/{core → composables}/useTexture/index.d.ts +1 -3
- package/dist/{core → composables}/useTres/index.d.ts +1 -1
- package/dist/core/catalogue.d.ts +9 -0
- package/dist/core/nodeOps.d.ts +3 -0
- package/dist/core/renderer.d.ts +10 -0
- package/dist/index.d.ts +3 -3
- package/dist/tres.js +377 -454
- package/dist/tres.umd.cjs +2 -2
- package/dist/types/index.d.ts +35 -0
- package/dist/types/tres-components.d.ts +270 -0
- package/dist/utils/index.d.ts +3 -0
- package/package.json +41 -19
- package/dist/core/index.d.ts +0 -10
- package/dist/core/useCatalogue/index.d.ts +0 -20
- package/dist/core/useInstanceCreator/index.d.ts +0 -14
- package/dist/core/useRenderer/component.d.ts +0 -53
- package/dist/core/useScene/component.d.ts +0 -6
- package/dist/core/useScene/index.d.ts +0 -10
- package/dist/env.d.ts +0 -11
- package/dist/keys.d.ts +0 -1
- /package/dist/{core → composables}/useCamera/index.d.ts +0 -0
- /package/dist/{core → composables}/useLoader/index.d.ts +0 -0
- /package/dist/{core → composables}/useRaycaster/index.d.ts +0 -0
- /package/dist/{core → composables}/useRenderLoop/index.d.ts +0 -0
- /package/dist/{core → composables}/useRenderer/const.d.ts +0 -0
- /package/dist/{core → composables}/useRenderer/index.d.ts +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ShadowMapType, TextureEncoding, ToneMapping } from 'three';
|
|
2
|
+
import { RendererPresetsType } from '../composables/useRenderer/const';
|
|
3
|
+
export interface TresCanvasProps {
|
|
4
|
+
shadows?: boolean;
|
|
5
|
+
shadowMapType?: ShadowMapType;
|
|
6
|
+
physicallyCorrectLights?: boolean;
|
|
7
|
+
useLegacyLights?: boolean;
|
|
8
|
+
outputEncoding?: TextureEncoding;
|
|
9
|
+
toneMapping?: ToneMapping;
|
|
10
|
+
toneMappingExposure?: number;
|
|
11
|
+
context?: WebGLRenderingContext;
|
|
12
|
+
powerPreference?: 'high-performance' | 'low-power' | 'default';
|
|
13
|
+
preserveDrawingBuffer?: boolean;
|
|
14
|
+
clearColor?: string;
|
|
15
|
+
windowSize?: boolean;
|
|
16
|
+
preset?: RendererPresetsType;
|
|
17
|
+
}
|
|
18
|
+
export declare const TresCanvas: import("vue").DefineComponent<TresCanvasProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<TresCanvasProps>, {}>;
|
|
19
|
+
export default TresCanvas;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TresCanvas';
|
|
@@ -21,8 +21,6 @@ export interface PBRTextureMaps {
|
|
|
21
21
|
/**
|
|
22
22
|
* Composable for loading textures.
|
|
23
23
|
*
|
|
24
|
-
* @see https://tresjs.org/examples/load-textures.html
|
|
25
|
-
*
|
|
26
24
|
* ```ts
|
|
27
25
|
* import { useTexture } from 'tres'
|
|
28
26
|
*
|
|
@@ -39,7 +37,7 @@ export interface PBRTextureMaps {
|
|
|
39
37
|
* ```vue
|
|
40
38
|
* <TresMeshStandardMaterial v-bind="pbrTexture" />
|
|
41
39
|
* ```
|
|
42
|
-
*
|
|
40
|
+
* @see https://tresjs.org/examples/load-textures.html
|
|
43
41
|
* @export
|
|
44
42
|
* @param {(Array<string> | { [key: string]: string })} paths
|
|
45
43
|
* @return {*} {(Promise<Texture | Array<Texture> | PBRTextureMaps>)}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Clock, EventDispatcher, Raycaster, Scene, Vector2, WebGLRenderer } from 'three';
|
|
2
2
|
import { ComputedRef } from 'vue';
|
|
3
|
-
import { Camera } from '../../
|
|
3
|
+
import { Camera } from '../../composables';
|
|
4
4
|
export interface TresState {
|
|
5
5
|
/**
|
|
6
6
|
* The active camera used for rendering the scene.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { TresCatalogue } from '../types';
|
|
3
|
+
export declare const catalogue: Ref<TresCatalogue>;
|
|
4
|
+
export declare const extend: (objects: any) => undefined;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
catalogue: Ref<TresCatalogue>;
|
|
7
|
+
extend: (objects: any) => undefined;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Slots } from 'vue';
|
|
2
|
+
export declare const createApp: import("vue").CreateAppFunction<import("..").TresObject>;
|
|
3
|
+
export declare const createTres: (slots: Slots) => import("vue").App<import("..").TresObject>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
createTres: (slots: Readonly<{
|
|
6
|
+
[name: string]: import("vue").Slot | undefined;
|
|
7
|
+
}>) => import("vue").App<import("..").TresObject>;
|
|
8
|
+
extend: (objects: any) => undefined;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './composables';
|
|
3
|
+
export * from './core/catalogue';
|
|
4
|
+
export * from './components';
|
|
4
5
|
export * from './types';
|
|
5
6
|
export interface TresOptions {
|
|
6
|
-
prefix?: string;
|
|
7
7
|
extends?: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
9
|
export interface TresPlugin {
|