@tomorrowevening/hermes 0.0.105 → 0.0.107

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,109 +1,115 @@
1
- import { Component, ReactNode } from 'react';
2
- import { Camera, Object3D, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
3
- import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
4
- import RemoteThree from '@/core/remote/RemoteThree';
5
- import { InteractionMode, MultiViewMode } from './MultiViewData';
6
- import './MultiView.scss';
7
- type MultiViewProps = {
8
- three: RemoteThree;
9
- scenes: Map<string, any>;
10
- onSceneSet?: (scene: Scene) => void;
11
- onSceneUpdate?: (scene: Scene) => void;
12
- onSceneResize?: (scene: Scene, width: number, height: number) => void;
13
- };
14
- type MultiViewState = {
15
- mode: MultiViewMode;
16
- modeOpen: boolean;
17
- renderModeOpen: boolean;
18
- interactionMode: InteractionMode;
19
- interactionModeOpen: boolean;
20
- lastUpdate: number;
21
- };
22
- export default class MultiView extends Component<MultiViewProps, MultiViewState> {
23
- static instance: MultiView | null;
24
- scene: Scene;
25
- renderer?: WebGLRenderer | null;
26
- currentScene?: Scene;
27
- cameras: Map<string, Camera>;
28
- controls: Map<string, OrbitControls>;
29
- currentCamera: PerspectiveCamera | OrthographicCamera;
30
- currentWindow: any;
31
- private cameraHelpers;
32
- private lightHelpers;
33
- private helpersContainer;
34
- private grid;
35
- private axisHelper;
36
- private interactionHelper;
37
- private currentTransform?;
38
- private splineEditor;
39
- private depthMaterial;
40
- private normalsMaterial;
41
- private uvMaterial;
42
- private wireframeMaterial;
43
- private playing;
44
- private rafID;
45
- private width;
46
- private height;
47
- private sceneSet;
48
- private tlCam;
49
- private trCam;
50
- private blCam;
51
- private brCam;
52
- private tlRender;
53
- private trRender;
54
- private blRender;
55
- private brRender;
56
- selectedItem: Object3D | undefined;
57
- private debugCamera;
58
- private raycaster;
59
- private pointer;
60
- private cameraControls;
61
- private canvasRef;
62
- private containerRef;
63
- private tlWindow;
64
- private trWindow;
65
- private blWindow;
66
- private brWindow;
67
- constructor(props: MultiViewProps);
68
- componentDidMount(): void;
69
- componentDidUpdate(prevProps: Readonly<MultiViewProps>, prevState: Readonly<MultiViewState>, snapshot?: any): void;
70
- componentWillUnmount(): void;
71
- render(): ReactNode;
72
- private setupRenderer;
73
- private setupScene;
74
- private setupTools;
75
- play(): void;
76
- pause(): void;
77
- toggleOrbitControls(value: boolean): void;
78
- private update;
79
- private draw;
80
- private onUpdate;
81
- private enable;
82
- private disable;
83
- private resize;
84
- private sceneUpdate;
85
- private addCamera;
86
- private removeCamera;
87
- private onMouseMove;
88
- private onClick;
89
- private onKey;
90
- private onSetSelectedItem;
91
- private onUpdateTransform;
92
- private clearLightHelpers;
93
- private addLightHelpers;
94
- private createControls;
95
- private clearCamera;
96
- private killControls;
97
- private assignControls;
98
- private updateCamera;
99
- private updateCameraControls;
100
- private clearControls;
101
- private getSceneOverride;
102
- private drawSingle;
103
- private drawDouble;
104
- private drawQuad;
105
- get appID(): string;
106
- get mode(): MultiViewMode;
107
- get three(): RemoteThree;
108
- }
109
- export {};
1
+ import { Component, ReactNode } from 'react';
2
+ import { Camera, Object3D, OrthographicCamera, PerspectiveCamera, Scene, WebGLRenderer } from 'three';
3
+ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
4
+ import RemoteThree from '@/core/remote/RemoteThree';
5
+ import { InteractionMode, MultiViewMode } from './MultiViewData';
6
+ import './MultiView.scss';
7
+ type MultiViewProps = {
8
+ three: RemoteThree;
9
+ scenes: Map<string, any>;
10
+ onSceneSet?: (scene: Scene) => void;
11
+ onSceneUpdate?: (scene: Scene) => void;
12
+ onSceneResize?: (scene: Scene, width: number, height: number) => void;
13
+ };
14
+ type MultiViewState = {
15
+ mode: MultiViewMode;
16
+ modeOpen: boolean;
17
+ renderModeOpen: boolean;
18
+ interactionMode: InteractionMode;
19
+ interactionModeOpen: boolean;
20
+ lastUpdate: number;
21
+ };
22
+ export default class MultiView extends Component<MultiViewProps, MultiViewState> {
23
+ static instance: MultiView | null;
24
+ scene: Scene;
25
+ renderer?: WebGLRenderer | null;
26
+ currentScene?: Scene;
27
+ cameras: Map<string, Camera>;
28
+ controls: Map<string, OrbitControls>;
29
+ currentCamera: PerspectiveCamera | OrthographicCamera;
30
+ currentWindow: any;
31
+ private cameraHelpers;
32
+ private lightHelpers;
33
+ private helpersContainer;
34
+ private grid;
35
+ private axisHelper;
36
+ private interactionHelper;
37
+ private currentTransform?;
38
+ private splineEditor;
39
+ private depthMaterial;
40
+ private normalsMaterial;
41
+ private uvMaterial;
42
+ private wireframeMaterial;
43
+ private playing;
44
+ private rafID;
45
+ private width;
46
+ private height;
47
+ private sceneSet;
48
+ private tlCam;
49
+ private trCam;
50
+ private blCam;
51
+ private brCam;
52
+ private tlRender;
53
+ private trRender;
54
+ private blRender;
55
+ private brRender;
56
+ private cameraVisibility;
57
+ private lightVisibility;
58
+ selectedItem: Object3D | undefined;
59
+ private debugCamera;
60
+ private raycaster;
61
+ private pointer;
62
+ private cameraControls;
63
+ private canvasRef;
64
+ private containerRef;
65
+ private tlWindow;
66
+ private trWindow;
67
+ private blWindow;
68
+ private brWindow;
69
+ constructor(props: MultiViewProps);
70
+ componentDidMount(): void;
71
+ componentDidUpdate(prevProps: Readonly<MultiViewProps>, prevState: Readonly<MultiViewState>, snapshot?: any): void;
72
+ componentWillUnmount(): void;
73
+ render(): ReactNode;
74
+ private setupRenderer;
75
+ private setupScene;
76
+ private setupTools;
77
+ play(): void;
78
+ pause(): void;
79
+ toggleOrbitControls(value: boolean): void;
80
+ private update;
81
+ private draw;
82
+ private onUpdate;
83
+ private enable;
84
+ private disable;
85
+ private resize;
86
+ private sceneUpdate;
87
+ private addCamera;
88
+ private removeCamera;
89
+ private onMouseMove;
90
+ private onClick;
91
+ private onKey;
92
+ private onSetSelectedItem;
93
+ private onUpdateTransform;
94
+ private clearLightHelpers;
95
+ private addLightHelpers;
96
+ private createControls;
97
+ private clearCamera;
98
+ private killControls;
99
+ private assignControls;
100
+ private updateCamera;
101
+ private updateCameraControls;
102
+ private clearControls;
103
+ private saveExpandedCameraVisibility;
104
+ private saveExpandedLightVisibility;
105
+ private getSceneOverride;
106
+ private drawSingle;
107
+ private drawDouble;
108
+ private drawQuad;
109
+ get appID(): string;
110
+ get mode(): MultiViewMode;
111
+ get three(): RemoteThree;
112
+ get expandedCameraVisibility(): string;
113
+ get expandedLightVisibility(): string;
114
+ }
115
+ export {};
@@ -0,0 +1,10 @@
1
+ type ToggleProps = {
2
+ name: string;
3
+ icon: string;
4
+ selected: boolean;
5
+ onClick: (selected: boolean) => void;
6
+ height: number;
7
+ top: number;
8
+ };
9
+ export default function Toggle(props: ToggleProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,25 +1,27 @@
1
- import { Euler, Matrix4, Vector3 } from 'three';
2
- import { Component, ReactNode } from 'react';
3
- import { RemoteObject } from '../../types';
4
- import RemoteThree from '@/core/remote/RemoteThree';
5
- type InspectTransformProps = {
6
- object: RemoteObject;
7
- three: RemoteThree;
8
- };
9
- type InspectTransformState = {
10
- lastUpdated: number;
11
- expanded: boolean;
12
- };
13
- export declare class InspectTransform extends Component<InspectTransformProps, InspectTransformState> {
14
- static instance: InspectTransform;
15
- matrix: Matrix4;
16
- position: Vector3;
17
- rotation: Euler;
18
- scale: Vector3;
19
- open: boolean;
20
- constructor(props: InspectTransformProps);
21
- update(): void;
22
- render(): ReactNode;
23
- private updateTransform;
24
- }
25
- export {};
1
+ import { Euler, Matrix4, Vector3 } from 'three';
2
+ import { Component, ReactNode } from 'react';
3
+ import { RemoteObject } from '../../types';
4
+ import RemoteThree from '@/core/remote/RemoteThree';
5
+ type InspectTransformProps = {
6
+ object: RemoteObject;
7
+ three: RemoteThree;
8
+ };
9
+ type InspectTransformState = {
10
+ lastUpdated: number;
11
+ expanded: boolean;
12
+ };
13
+ export declare class InspectTransform extends Component<InspectTransformProps, InspectTransformState> {
14
+ static instance: InspectTransform;
15
+ matrix: Matrix4;
16
+ position: Vector3;
17
+ rotation: Euler;
18
+ scale: Vector3;
19
+ open: boolean;
20
+ constructor(props: InspectTransformProps);
21
+ update(): void;
22
+ render(): ReactNode;
23
+ private updateTransform;
24
+ private saveExpanded;
25
+ get expandedName(): string;
26
+ }
27
+ export {};