shop-components 0.1.23 → 0.1.26
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/cropper/index.d.ts +4 -0
- package/dist/device-viewer/amr.d.ts +12 -1
- package/dist/device-viewer/index.d.ts +1 -0
- package/dist/device-viewer/mechanism/mechanism.d.ts +6 -0
- package/dist/device-viewer/scene.d.ts +1 -1
- package/dist/device-viewer/slot.d.ts +4 -2
- package/dist/shop-components.mjs +3992 -3945
- package/dist/shop-components.umd.js +116 -116
- package/package.json +1 -1
package/dist/cropper/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export interface CropperConfigs {
|
|
|
8
8
|
scale: number;
|
|
9
9
|
x: number;
|
|
10
10
|
y: number;
|
|
11
|
+
ox: number;
|
|
12
|
+
oy: number;
|
|
11
13
|
url: string;
|
|
12
14
|
}
|
|
13
15
|
export declare class Cropper extends LitElement {
|
|
@@ -29,6 +31,8 @@ export declare class Cropper extends LitElement {
|
|
|
29
31
|
texture: Texture3;
|
|
30
32
|
private _timer;
|
|
31
33
|
private _sprite;
|
|
34
|
+
private _loading;
|
|
35
|
+
get loading(): boolean;
|
|
32
36
|
get canvas(): import("pixi.js").ICanvas;
|
|
33
37
|
container: HTMLDivElement | undefined;
|
|
34
38
|
boundRect: HTMLDivElement | undefined;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Object3D, TextureLoader } from 'three';
|
|
2
2
|
import { Logo, Scene3D, Skin, Slot } from './scene';
|
|
3
|
+
import { Mechanism } from './mechanism/mechanism';
|
|
3
4
|
import { ObjectSize } from './utils';
|
|
4
5
|
import { SizeBox } from './dimension/size-box';
|
|
5
6
|
import { AMRAssembly } from './assembly';
|
|
6
7
|
import EventEmitter from 'eventemitter3';
|
|
8
|
+
import { CropperConfigs } from '../cropper';
|
|
7
9
|
export declare const textureLoader: TextureLoader;
|
|
8
10
|
export interface AmrProps {
|
|
9
11
|
url?: string;
|
|
@@ -25,6 +27,11 @@ export declare class Amr extends Object3D {
|
|
|
25
27
|
private _fork;
|
|
26
28
|
private _jack;
|
|
27
29
|
private _bodyOpacity;
|
|
30
|
+
private _masts;
|
|
31
|
+
private _liftMaxHeight;
|
|
32
|
+
private _jackMaxHeight;
|
|
33
|
+
private _forkMaxHeight;
|
|
34
|
+
controllers: Mechanism[];
|
|
28
35
|
private _breathLights;
|
|
29
36
|
private _outline;
|
|
30
37
|
private _shelf;
|
|
@@ -52,13 +59,17 @@ export declare class Amr extends Object3D {
|
|
|
52
59
|
init(app: Scene3D): void;
|
|
53
60
|
load(url: string): Promise<void>;
|
|
54
61
|
changeSkin(skin: Skin, value: string): void;
|
|
55
|
-
changeLogo(logo: Logo,
|
|
62
|
+
changeLogo(logo: Logo, configs: CropperConfigs): void;
|
|
56
63
|
setShapeKey(key: string, value: number): void;
|
|
57
64
|
private _generateAmr;
|
|
58
65
|
setHeight(height: number): void;
|
|
59
66
|
setWeight(width: number): void;
|
|
60
67
|
setLength(length: number): void;
|
|
68
|
+
limitValue(v: number): void;
|
|
61
69
|
setForkHeight(height: number): void;
|
|
70
|
+
setForkMaxHeight(height: number): void;
|
|
71
|
+
setLiftMaxHeight(height: number): void;
|
|
72
|
+
setJackMaxHeight(height: number): void;
|
|
62
73
|
setJackHeight(height: number): void;
|
|
63
74
|
setLevel(level: number): void;
|
|
64
75
|
setGoodsSize(size: {
|
|
@@ -49,6 +49,7 @@ export declare class DeviceViewer extends LitElement {
|
|
|
49
49
|
changeAmrHeight: (e: any) => void;
|
|
50
50
|
changeAmrLevel: (e: any) => void;
|
|
51
51
|
changeAmrShelvesLevel: (e: any) => void;
|
|
52
|
+
setMaxHeight: (e: any) => void;
|
|
52
53
|
changeGoodsSize: (e: any) => void;
|
|
53
54
|
changeColor: (s: Skin, value: string) => void;
|
|
54
55
|
selectLogo: (l: Logo) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Object3D } from 'three';
|
|
2
2
|
import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer';
|
|
3
|
+
import EventEmitter from 'eventemitter3';
|
|
3
4
|
export interface UserData {
|
|
4
5
|
[key: string]: any;
|
|
5
6
|
}
|
|
@@ -22,8 +23,13 @@ export declare class Mechanism extends CSS2DObject {
|
|
|
22
23
|
private _initial;
|
|
23
24
|
private _canRotate;
|
|
24
25
|
private _timer;
|
|
26
|
+
private _emitter;
|
|
27
|
+
addListener: <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
|
|
28
|
+
removeListener: <T extends string | symbol>(event: T, fn?: ((...args: any[]) => void) | undefined, context?: any, once?: boolean | undefined) => EventEmitter<string | symbol, any>;
|
|
25
29
|
mechanism: Object3D | undefined;
|
|
26
30
|
constructor(props: MechanismProps, amr: Object3D);
|
|
27
31
|
private _update;
|
|
32
|
+
hide(): void;
|
|
33
|
+
show(): void;
|
|
28
34
|
dispose(): void;
|
|
29
35
|
}
|
|
@@ -47,7 +47,7 @@ export declare class Logo {
|
|
|
47
47
|
private readonly _defaults;
|
|
48
48
|
constructor(_props: LogoProps);
|
|
49
49
|
clear(): void;
|
|
50
|
-
change(url?: string): void;
|
|
50
|
+
change(url?: string, scale?: number, offset?: Vector2): void;
|
|
51
51
|
reset(): void;
|
|
52
52
|
}
|
|
53
53
|
export declare class Skin {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
1
|
+
import { Object3D, Vector3 } from 'three';
|
|
2
2
|
import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer';
|
|
3
3
|
import EventEmitter from 'eventemitter3';
|
|
4
4
|
import { Scene3D } from './scene';
|
|
@@ -44,6 +44,8 @@ export declare class Slot extends CSS2DObject {
|
|
|
44
44
|
private _allFunctions;
|
|
45
45
|
private _functions;
|
|
46
46
|
private _timer;
|
|
47
|
+
private _parentPos;
|
|
48
|
+
private _wrapper;
|
|
47
49
|
get hasDevice(): boolean;
|
|
48
50
|
deviceInfo: DeviceInfo | undefined;
|
|
49
51
|
constructor(props: SlotProps);
|
|
@@ -51,7 +53,7 @@ export declare class Slot extends CSS2DObject {
|
|
|
51
53
|
loadGlb(sglb: string): Promise<Object3D<import("three").Object3DEventMap> | undefined>;
|
|
52
54
|
installBracket(url: string): Promise<void>;
|
|
53
55
|
install(info: DeviceInfo): Promise<void>;
|
|
54
|
-
getWP: (target:
|
|
56
|
+
getWP: (target: Vector3) => Vector3;
|
|
55
57
|
get device(): Object3D<import("three").Object3DEventMap> | null;
|
|
56
58
|
get allFunctions(): string[];
|
|
57
59
|
set allFunctions(fs: string[]);
|