@tresjs/core 0.4.0 → 1.0.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/index.d.ts +1 -1
- package/dist/core/{useCatalog → useCatalogue}/index.d.ts +1 -1
- package/dist/core/useInstanceCreator/index.d.ts +2 -2
- package/dist/core/useLoader/index.d.ts +12 -17
- package/dist/env.d.ts +2 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +5 -1
- package/dist/logo-dark.svg +5 -0
- package/dist/models/AkuAku.gltf +1177 -0
- package/dist/tres.js +224 -197
- package/dist/tres.umd.cjs +2 -2
- package/dist/types/index.d.ts +11 -14
- package/package.json +5 -2
package/dist/core/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function useInstanceCreator(): {
|
|
2
|
-
createComponentInstances: () => (string | import("vue").DefineComponent<{}, () => void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>)[][];
|
|
1
|
+
export declare function useInstanceCreator(prefix: string): {
|
|
2
|
+
createComponentInstances: (newObjects: Record<string, any>) => (string | import("vue").DefineComponent<{}, () => void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>)[][];
|
|
3
3
|
};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
setURLModifier: (callback?: ((url: string) => string) | undefined) => LoadingManager;
|
|
10
|
-
resolveURL: (url: string) => string;
|
|
11
|
-
itemStart: (url: string) => void;
|
|
12
|
-
itemEnd: (url: string) => void;
|
|
13
|
-
itemError: (url: string) => void;
|
|
14
|
-
addHandler: (regex: RegExp, loader: import("three").Loader) => LoadingManager;
|
|
15
|
-
removeHandler: (regex: RegExp) => LoadingManager;
|
|
16
|
-
getHandler: (file: string) => import("three").Loader | null;
|
|
17
|
-
}>;
|
|
1
|
+
import { Object3D } from 'three';
|
|
2
|
+
export interface TresLoader<T> extends THREE.Loader {
|
|
3
|
+
load(url: string, onLoad?: (result: T) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): unknown;
|
|
4
|
+
}
|
|
5
|
+
export declare type LoaderProto<T> = new (...args: any) => TresLoader<T extends unknown ? any : T>;
|
|
6
|
+
export declare type LoaderReturnType<T, L extends LoaderProto<T>> = T extends unknown ? Awaited<ReturnType<InstanceType<L>['loadAsync']>> : T;
|
|
7
|
+
export declare function trasverseObjects(object: Object3D): {
|
|
8
|
+
[key: string]: any;
|
|
18
9
|
};
|
|
10
|
+
export declare type Extensions<T extends {
|
|
11
|
+
prototype: LoaderProto<any>;
|
|
12
|
+
}> = (loader: T['prototype']) => void;
|
|
13
|
+
export declare function useLoader<T extends LoaderProto<T>, U extends string | string[]>(Loader: T, url: U, extensions?: Extensions<T>, onProgress?: (event: ProgressEvent<EventTarget>) => void, cb?: (proto: TresLoader<T>) => void): Promise<U extends any[] ? LoaderReturnType<T, T>[] : LoaderReturnType<T, T>>;
|
package/dist/env.d.ts
CHANGED
|
Binary file
|
|
Binary file
|
package/dist/favicon.ico
ADDED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
export * from './core';
|
|
3
3
|
export * from './keys';
|
|
4
|
+
export interface TresOptions {
|
|
5
|
+
prefix?: string;
|
|
6
|
+
extends?: Record<string, unknown>;
|
|
7
|
+
}
|
|
4
8
|
export interface TresPlugin {
|
|
5
9
|
[key: string]: any;
|
|
6
|
-
install: (app: App, options?:
|
|
10
|
+
install: (app: App, options?: TresOptions) => void;
|
|
7
11
|
}
|
|
8
12
|
declare const plugin: TresPlugin;
|
|
9
13
|
export default plugin;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="44" height="10" viewBox="0 0 44 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M5.14255 1.42916C5.53095 0.781817 6.46913 0.781816 6.85753 1.42915L11.0913 8.4855C11.4913 9.15203 11.0111 10 10.2338 10H1.76623C0.988935 10 0.508822 9.15203 0.908736 8.4855L5.14255 1.42916Z" fill="#82DBC5"/>
|
|
3
|
+
<rect x="19" y="1" width="9" height="9" rx="1" fill="#f2f2f2"/>
|
|
4
|
+
<circle cx="39.5" cy="5.5" r="4.5" fill="#EFAC35"/>
|
|
5
|
+
</svg>
|