shop-components 0.3.9 → 0.4.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/dev/src/amr.d.ts +2 -0
- package/dist/dev/src/libs/jfa/JumpFloodOutline.d.ts +44 -14
- package/dist/dev/src/libs/jfa/vendor/index copy.d.ts +36 -0
- package/dist/dev/src/scene.d.ts +3 -9
- package/dist/shop-components.cjs +212 -117
- package/dist/shop-components.mjs +2254 -1846
- package/dist/test2.glb +0 -0
- package/package.json +1 -1
package/dist/dev/src/amr.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare class Amr extends Object3D {
|
|
|
63
63
|
private _showController;
|
|
64
64
|
private _showSlots;
|
|
65
65
|
private _shapeKeys;
|
|
66
|
+
private _shapeKeyTargets;
|
|
66
67
|
private _shapeKeyTimer;
|
|
67
68
|
private _shapeKeyCache;
|
|
68
69
|
private _materialsCache;
|
|
@@ -95,6 +96,7 @@ export declare class Amr extends Object3D {
|
|
|
95
96
|
load(url: string, type?: string): Promise<void>;
|
|
96
97
|
changeSkin(skin: Skin, value: string): void;
|
|
97
98
|
changeLogo(logo: Logo, configs: CropperConfigs): void;
|
|
99
|
+
getShapeKeyTargets(key: string): Object3D<import("three").Object3DEventMap>[];
|
|
98
100
|
setShapeKey(key: string, value: number, useDebance?: boolean): void;
|
|
99
101
|
private _generateAmr;
|
|
100
102
|
setHeight(height: number): void;
|
|
@@ -1,29 +1,59 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare class ExpandMaskMaterial extends THREE.ShaderMaterial {
|
|
3
|
+
get source(): any;
|
|
4
|
+
set source(v: any);
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class SeedMaterial extends THREE.ShaderMaterial {
|
|
8
|
+
get negative(): boolean;
|
|
9
|
+
set negative(v: boolean);
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class EffectMaterial extends THREE.ShaderMaterial {
|
|
13
|
+
get map(): any;
|
|
14
|
+
set map(v: any);
|
|
15
|
+
get mask(): any;
|
|
16
|
+
set mask(v: any);
|
|
17
|
+
get thickness(): any;
|
|
18
|
+
set thickness(v: any);
|
|
19
|
+
get inside(): boolean;
|
|
20
|
+
set inside(v: boolean);
|
|
21
|
+
get color(): any;
|
|
22
|
+
constructor();
|
|
23
|
+
}
|
|
24
|
+
export declare class JFAMaterial extends THREE.ShaderMaterial {
|
|
25
|
+
get source(): any;
|
|
26
|
+
set source(v: any);
|
|
27
|
+
get mask(): any;
|
|
28
|
+
set mask(v: any);
|
|
29
|
+
get step(): any;
|
|
30
|
+
set step(v: any);
|
|
31
|
+
constructor();
|
|
32
|
+
}
|
|
2
33
|
export interface JumpFloodParams {
|
|
3
|
-
mode?: number;
|
|
4
34
|
inside?: boolean;
|
|
5
35
|
thickness?: number;
|
|
6
|
-
color?:
|
|
36
|
+
color?: THREE.ColorRepresentation;
|
|
7
37
|
}
|
|
8
|
-
export declare class
|
|
38
|
+
export declare class JumpFlood {
|
|
9
39
|
private renderer;
|
|
10
40
|
private scene;
|
|
11
41
|
private camera;
|
|
12
42
|
private effectQuad;
|
|
13
43
|
private jfaQuad;
|
|
14
44
|
private seedQuad;
|
|
15
|
-
private seedQuadMaterial;
|
|
16
|
-
private seedModelMaterial;
|
|
17
45
|
private expandQuad;
|
|
46
|
+
private seedMaterial;
|
|
47
|
+
private seedModelMaterial;
|
|
48
|
+
private maskMaterial;
|
|
18
49
|
private targets;
|
|
19
50
|
private masks;
|
|
20
|
-
private _selected;
|
|
21
|
-
private _selectionLayer;
|
|
22
51
|
params: Required<JumpFloodParams>;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
52
|
+
private _selectionLayer;
|
|
53
|
+
private _box;
|
|
54
|
+
private _sphere;
|
|
55
|
+
constructor(renderer: THREE.WebGLRenderer, scene: THREE.Scene, camera: THREE.Camera, options?: JumpFloodParams);
|
|
56
|
+
setSize(width: number, height: number): void;
|
|
57
|
+
render(targetObjects?: THREE.Object3D | THREE.Object3D[]): void;
|
|
28
58
|
}
|
|
29
|
-
export default
|
|
59
|
+
export default JumpFlood;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare class ExpandMaskMaterial extends THREE.ShaderMaterial {
|
|
3
|
+
get source(): any;
|
|
4
|
+
set source(v: any);
|
|
5
|
+
constructor();
|
|
6
|
+
}
|
|
7
|
+
export declare class SeedMaterial extends THREE.ShaderMaterial {
|
|
8
|
+
get negative(): boolean;
|
|
9
|
+
set negative(v: boolean);
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class EffectMaterial extends THREE.ShaderMaterial {
|
|
13
|
+
get time(): any;
|
|
14
|
+
set time(v: any);
|
|
15
|
+
get map(): any;
|
|
16
|
+
set map(v: any);
|
|
17
|
+
get mask(): any;
|
|
18
|
+
set mask(v: any);
|
|
19
|
+
get thickness(): any;
|
|
20
|
+
set thickness(v: any);
|
|
21
|
+
get mode(): any;
|
|
22
|
+
set mode(v: any);
|
|
23
|
+
get inside(): boolean;
|
|
24
|
+
set inside(v: boolean);
|
|
25
|
+
get color(): any;
|
|
26
|
+
constructor();
|
|
27
|
+
}
|
|
28
|
+
export declare class JFAMaterial extends THREE.ShaderMaterial {
|
|
29
|
+
get source(): any;
|
|
30
|
+
set source(v: any);
|
|
31
|
+
get mask(): any;
|
|
32
|
+
set mask(v: any);
|
|
33
|
+
get step(): any;
|
|
34
|
+
set step(v: any);
|
|
35
|
+
constructor();
|
|
36
|
+
}
|
package/dist/dev/src/scene.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { Color, Mesh, MeshStandardMaterial, Object3D, OrthographicCamera, PerspectiveCamera, Scene, Vector2, Vector3, WebGLRenderer } from 'three';
|
|
2
|
-
import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass';
|
|
3
|
-
import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass';
|
|
4
|
-
import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass';
|
|
5
2
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|
6
3
|
import { WebGLPathTracer } from 'three-gpu-pathtracer';
|
|
7
|
-
import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer';
|
|
8
4
|
import { Font } from 'three/examples/jsm/loaders/FontLoader';
|
|
9
5
|
import EventEmitter from 'eventemitter3';
|
|
10
6
|
import Stats from 'stats-fps.js';
|
|
@@ -68,12 +64,9 @@ export declare class Scene3D {
|
|
|
68
64
|
size: Vector2;
|
|
69
65
|
private _prevSelectedObj;
|
|
70
66
|
amr: Amr;
|
|
71
|
-
_composer: EffectComposer;
|
|
72
|
-
_outlinePass: OutlinePass;
|
|
73
|
-
_outlinePassError: OutlinePass;
|
|
74
|
-
_fxaaPass: ShaderPass;
|
|
75
|
-
_bloomPass: UnrealBloomPass;
|
|
76
67
|
private _progressShadow;
|
|
68
|
+
private _jumpFlood?;
|
|
69
|
+
private _selectedForOutline;
|
|
77
70
|
private _clock;
|
|
78
71
|
private _uiHiddenTime;
|
|
79
72
|
camera: PerspectiveCamera;
|
|
@@ -152,6 +145,7 @@ export declare class Scene3D {
|
|
|
152
145
|
}>;
|
|
153
146
|
debounceForkHeightChange: () => void;
|
|
154
147
|
addAMR(url: string, type?: string): Promise<void>;
|
|
148
|
+
focusObjects: (objs: Object3D[], direction?: Vector3) => void;
|
|
155
149
|
focusSlots: (slots: Slot[]) => void;
|
|
156
150
|
fit: () => void;
|
|
157
151
|
select(obj: string | Object3D | Object3D[]): void;
|