three-zoo 0.0.6 → 0.0.7
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/Bounds.d.ts +8 -0
- package/dist/Enumerator.d.ts +10 -0
- package/dist/InstanceAssembler.d.ts +10 -0
- package/dist/SceneProcessor.d.ts +14 -0
- package/dist/Sun.d.ts +21 -0
- package/dist/index.d.ts +5 -0
- package/package.json +3 -2
package/dist/Bounds.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Material, Object3D } from "three";
|
|
2
|
+
type Constructor<T> = abstract new (...args: never[]) => T;
|
|
3
|
+
export declare class Enumerator {
|
|
4
|
+
static getObjectByName(object: Object3D, name: string): Object3D | null;
|
|
5
|
+
static getMaterialByName(object: Object3D, name: string): Material | null;
|
|
6
|
+
static enumerateObjectsByType<T>(object: Object3D, type: Constructor<T>, callback: (instance: T) => void): void;
|
|
7
|
+
static enumerateMaterials(object: Object3D, callback: (material: Material) => void): void;
|
|
8
|
+
static setShadowRecursive(object: Object3D, castShadow?: boolean, receiveShadow?: boolean): void;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Object3D } from "three";
|
|
2
|
+
type IPattern = string | RegExp;
|
|
3
|
+
interface IOptions {
|
|
4
|
+
asset: Object3D;
|
|
5
|
+
castShadowMeshNames?: IPattern[];
|
|
6
|
+
receiveShadowMeshNames?: IPattern[];
|
|
7
|
+
transparentMaterialNames?: IPattern[];
|
|
8
|
+
noDepthWriteMaterialNames?: IPattern[];
|
|
9
|
+
}
|
|
10
|
+
export declare class SceneProcessor {
|
|
11
|
+
static process(options: IOptions): Object3D[];
|
|
12
|
+
private static matchesAny;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
package/dist/Sun.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Box3, DirectionalLight, Texture } from "three";
|
|
2
|
+
export declare class Sun extends DirectionalLight {
|
|
3
|
+
private tempVector3D0;
|
|
4
|
+
private tempVector3D1;
|
|
5
|
+
private tempVector3D2;
|
|
6
|
+
private tempVector3D3;
|
|
7
|
+
private tempVector3D4;
|
|
8
|
+
private tempVector3D5;
|
|
9
|
+
private tempVector3D6;
|
|
10
|
+
private tempVector3D7;
|
|
11
|
+
private tempBox3;
|
|
12
|
+
private tempSpherical;
|
|
13
|
+
get distance(): number;
|
|
14
|
+
get elevation(): number;
|
|
15
|
+
get azimuth(): number;
|
|
16
|
+
set distance(value: number);
|
|
17
|
+
set elevation(value: number);
|
|
18
|
+
set azimuth(value: number);
|
|
19
|
+
setShadowMapFromBox3(box3: Box3): void;
|
|
20
|
+
setDirectionFromHDR(texture: Texture, distance?: number): void;
|
|
21
|
+
}
|
package/dist/index.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "three-zoo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "zoo of tiny three js tools",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"
|
|
6
|
+
"clean": "rm -rf dist",
|
|
7
|
+
"build": "npm run clean && rollup -c"
|
|
7
8
|
},
|
|
8
9
|
"main": "dist/index.js",
|
|
9
10
|
"types": "dist/index.d.ts",
|