shop-components 0.1.61 → 0.1.62

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.
@@ -0,0 +1,73 @@
1
+ import { Vector2 } from 'three';
2
+ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
3
+ import EventEmitter from 'eventemitter3';
4
+ interface OrbitControlsGizmoProps {
5
+ size?: number;
6
+ offset: Vector2;
7
+ padding?: number;
8
+ bubbleSizePrimary?: number;
9
+ bubbleSizeSecondary?: number;
10
+ lineWidth?: number;
11
+ fontSize?: number;
12
+ fontFamily?: string;
13
+ fontWeight?: string;
14
+ fontColor?: string;
15
+ className?: string;
16
+ colors?: {
17
+ x: string[];
18
+ y: string[];
19
+ z: string[];
20
+ };
21
+ }
22
+ interface OrbitControlsGizmoOptions extends OrbitControlsGizmoProps {
23
+ bubbleSizePrimary: number;
24
+ bubbleSizeSecondary: number;
25
+ size: number;
26
+ fontSize: number;
27
+ colors: {
28
+ x: string[];
29
+ y: string[];
30
+ z: string[];
31
+ };
32
+ }
33
+ export declare class OrbitControlsGizmo {
34
+ domElement: HTMLCanvasElement;
35
+ private lock;
36
+ private lockX;
37
+ private lockY;
38
+ private orbit;
39
+ private camera;
40
+ private invRotMat;
41
+ private mouse;
42
+ private rotateStart;
43
+ private rotateEnd;
44
+ private rotateDelta;
45
+ private center;
46
+ private axes;
47
+ private selectedAxis;
48
+ private isDragging;
49
+ private context;
50
+ private rect;
51
+ private orbitState;
52
+ private _animator;
53
+ options: OrbitControlsGizmoOptions;
54
+ _emitter: EventEmitter<string | symbol, any>;
55
+ addListener: <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
56
+ removeAllListeners: (event?: string | symbol | undefined) => EventEmitter<string | symbol, any>;
57
+ constructor(orbitControls: OrbitControls, options: OrbitControlsGizmoProps);
58
+ private update;
59
+ private createAxes;
60
+ private createCanvas;
61
+ private onPointerDown;
62
+ private onPointerUp;
63
+ private onPointerEnter;
64
+ private onPointerMove;
65
+ private onDrag;
66
+ private onMouseClick;
67
+ private drawCircle;
68
+ private drawLine;
69
+ private drawLayers;
70
+ private setAxisPosition;
71
+ destroy(): void;
72
+ }
73
+ export {};
@@ -1,4 +1,4 @@
1
- import { Mesh, MeshStandardMaterial, Object3D, PerspectiveCamera, Scene, Vector2, WebGLRenderer } from 'three';
1
+ import { Mesh, MeshStandardMaterial, Object3D, OrthographicCamera, PerspectiveCamera, Scene, Vector2, WebGLRenderer } from 'three';
2
2
  import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass';
3
3
  import { ShaderPass } from 'three/examples/jsm/postprocessing/ShaderPass';
4
4
  import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
@@ -49,6 +49,8 @@ export type Scene3DEvents = 'slot-select';
49
49
  export interface SceneProps {
50
50
  useSound: boolean;
51
51
  fov?: number;
52
+ useAxisBall?: boolean;
53
+ axisBallOffset?: Vector2;
52
54
  }
53
55
  export declare class Scene3D {
54
56
  props: SceneProps;
@@ -69,7 +71,12 @@ export declare class Scene3D {
69
71
  _outlinePassError: OutlinePass;
70
72
  _fxaaPass: ShaderPass;
71
73
  camera: PerspectiveCamera;
74
+ mainCamera: PerspectiveCamera | OrthographicCamera;
75
+ d: number;
76
+ orthographicCamera: OrthographicCamera;
72
77
  controls: OrbitControls;
78
+ private _controlsGizmo;
79
+ private _axisMoving;
73
80
  private _resizeObserver;
74
81
  private _container;
75
82
  private _fitAnimation;
@@ -95,6 +102,7 @@ export declare class Scene3D {
95
102
  removeEventListener: <T extends string | symbol>(event: T, fn: (...args: any[]) => void, context?: any) => EventEmitter<string | symbol, any>;
96
103
  showState(): void;
97
104
  hideState(): void;
105
+ private _updateCamera;
98
106
  private _loadEnv;
99
107
  private _drag;
100
108
  private _dragend;
@@ -102,6 +110,10 @@ export declare class Scene3D {
102
110
  private _pointerdown;
103
111
  private _detectTrackpad;
104
112
  private _initEvents;
113
+ switchCamera(): void;
114
+ toCameraTop(): void;
115
+ toCameraRight(): void;
116
+ toCameraFace(): void;
105
117
  generateBVH(): Promise<void>;
106
118
  download(): Promise<string>;
107
119
  clearAMR(): void;
@@ -0,0 +1,3 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class RightMenu extends LitElement {
3
+ }