@tomorrowevening/hermes 0.0.104 → 0.0.106
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/LICENSE +674 -674
- package/README.md +16 -16
- package/dist/hermes.cjs.js +149 -149
- package/dist/hermes.es.js +7556 -7574
- package/dist/style.css +1 -1
- package/package.json +80 -80
- package/types/core/remote/RemoteThree.d.ts +39 -39
- package/types/core/types.d.ts +35 -35
- package/types/editor/global.d.ts +26 -26
- package/types/editor/multiView/CameraWindow.d.ts +22 -22
- package/types/editor/multiView/MultiView.d.ts +109 -109
- package/types/editor/multiView/Toggle.d.ts +10 -0
- package/types/editor/sidePanel/DebugData.d.ts +24 -24
- package/types/editor/sidePanel/inspector/InspectorGroup.d.ts +23 -23
- package/types/editor/sidePanel/inspector/utils/InspectTransform.d.ts +25 -25
- package/types/editor/tools/Transform.d.ts +21 -22
- package/types/editor/tools/splineEditor/Spline.d.ts +52 -52
- package/types/editor/tools/splineEditor/index.d.ts +27 -27
- package/types/editor/utils.d.ts +31 -31
- package/types/index.d.ts +27 -24
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Camera } from 'three';
|
|
3
|
-
import { RenderMode } from './MultiViewData';
|
|
4
|
-
interface DropdownProps {
|
|
5
|
-
index: number;
|
|
6
|
-
open: boolean;
|
|
7
|
-
title: string;
|
|
8
|
-
onToggle: (value: boolean) => void;
|
|
9
|
-
onSelect: (value: string) => void;
|
|
10
|
-
options: string[];
|
|
11
|
-
up?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const Dropdown: (props: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
interface CameraWindowProps {
|
|
15
|
-
name: string;
|
|
16
|
-
camera: Camera;
|
|
17
|
-
onSelectCamera: (value: string) => void;
|
|
18
|
-
onSelectRenderMode: (value: RenderMode) => void;
|
|
19
|
-
options: string[];
|
|
20
|
-
}
|
|
21
|
-
declare const CameraWindow: import("react").ForwardRefExoticComponent<CameraWindowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
-
export default CameraWindow;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Camera } from 'three';
|
|
3
|
+
import { RenderMode } from './MultiViewData';
|
|
4
|
+
interface DropdownProps {
|
|
5
|
+
index: number;
|
|
6
|
+
open: boolean;
|
|
7
|
+
title: string;
|
|
8
|
+
onToggle: (value: boolean) => void;
|
|
9
|
+
onSelect: (value: string) => void;
|
|
10
|
+
options: string[];
|
|
11
|
+
up?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const Dropdown: (props: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface CameraWindowProps {
|
|
15
|
+
name: string;
|
|
16
|
+
camera: Camera;
|
|
17
|
+
onSelectCamera: (value: string) => void;
|
|
18
|
+
onSelectRenderMode: (value: RenderMode) => void;
|
|
19
|
+
options: string[];
|
|
20
|
+
}
|
|
21
|
+
declare const CameraWindow: import("react").ForwardRefExoticComponent<CameraWindowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default CameraWindow;
|
|
@@ -1,109 +1,109 @@
|
|
|
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
|
+
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,24 +1,24 @@
|
|
|
1
|
-
import { Component, ReactNode, RefObject } from 'react';
|
|
2
|
-
import RemoteThree from '@/core/remote/RemoteThree';
|
|
3
|
-
import { GroupData } from '@/core/types';
|
|
4
|
-
import InspectorGroup from './inspector/InspectorGroup';
|
|
5
|
-
interface DebugDataProps {
|
|
6
|
-
three: RemoteThree;
|
|
7
|
-
}
|
|
8
|
-
type DebugDataState = {
|
|
9
|
-
lastUpdate: number;
|
|
10
|
-
};
|
|
11
|
-
export default class DebugData extends Component<DebugDataProps, DebugDataState> {
|
|
12
|
-
static instance: DebugData;
|
|
13
|
-
static groups: JSX.Element[];
|
|
14
|
-
static groupsRefs: RefObject<InspectorGroup>[];
|
|
15
|
-
static groupTitles: string[];
|
|
16
|
-
constructor(props: DebugDataProps);
|
|
17
|
-
componentWillUnmount(): void;
|
|
18
|
-
render(): ReactNode;
|
|
19
|
-
private addGroup;
|
|
20
|
-
private removeGroup;
|
|
21
|
-
static addEditorGroup(data: GroupData): RefObject<InspectorGroup> | null;
|
|
22
|
-
static removeEditorGroup(name: string): void;
|
|
23
|
-
}
|
|
24
|
-
export {};
|
|
1
|
+
import { Component, ReactNode, RefObject } from 'react';
|
|
2
|
+
import RemoteThree from '@/core/remote/RemoteThree';
|
|
3
|
+
import { GroupData } from '@/core/types';
|
|
4
|
+
import InspectorGroup from './inspector/InspectorGroup';
|
|
5
|
+
interface DebugDataProps {
|
|
6
|
+
three: RemoteThree;
|
|
7
|
+
}
|
|
8
|
+
type DebugDataState = {
|
|
9
|
+
lastUpdate: number;
|
|
10
|
+
};
|
|
11
|
+
export default class DebugData extends Component<DebugDataProps, DebugDataState> {
|
|
12
|
+
static instance: DebugData;
|
|
13
|
+
static groups: JSX.Element[];
|
|
14
|
+
static groupsRefs: RefObject<InspectorGroup>[];
|
|
15
|
+
static groupTitles: string[];
|
|
16
|
+
constructor(props: DebugDataProps);
|
|
17
|
+
componentWillUnmount(): void;
|
|
18
|
+
render(): ReactNode;
|
|
19
|
+
private addGroup;
|
|
20
|
+
private removeGroup;
|
|
21
|
+
static addEditorGroup(data: GroupData): RefObject<InspectorGroup> | null;
|
|
22
|
+
static removeEditorGroup(name: string): void;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Component, ReactNode, RefObject } from 'react';
|
|
2
|
-
import { InspectorFieldProps } from './InspectorField';
|
|
3
|
-
import { GroupData } from '@/core/types';
|
|
4
|
-
export interface InspectorGroupProps {
|
|
5
|
-
title: string;
|
|
6
|
-
expanded?: boolean;
|
|
7
|
-
items: InspectorFieldProps[] | InspectorGroupProps[];
|
|
8
|
-
onToggle?: (value: boolean) => void;
|
|
9
|
-
}
|
|
10
|
-
type InspectorGroupState = {
|
|
11
|
-
lastUpdated: number;
|
|
12
|
-
};
|
|
13
|
-
export default class InspectorGroup extends Component<InspectorGroupProps, InspectorGroupState> {
|
|
14
|
-
subgroupNames: string[];
|
|
15
|
-
subgroupElements: JSX.Element[];
|
|
16
|
-
valueOverrides: Map<string, any>;
|
|
17
|
-
constructor(props: InspectorGroupProps);
|
|
18
|
-
addGroup(data: GroupData): RefObject<InspectorGroup>;
|
|
19
|
-
removeGroup(name: string): void;
|
|
20
|
-
setField(name: string, value: any): void;
|
|
21
|
-
render(): ReactNode;
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
1
|
+
import { Component, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { InspectorFieldProps } from './InspectorField';
|
|
3
|
+
import { GroupData } from '@/core/types';
|
|
4
|
+
export interface InspectorGroupProps {
|
|
5
|
+
title: string;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
items: InspectorFieldProps[] | InspectorGroupProps[];
|
|
8
|
+
onToggle?: (value: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
type InspectorGroupState = {
|
|
11
|
+
lastUpdated: number;
|
|
12
|
+
};
|
|
13
|
+
export default class InspectorGroup extends Component<InspectorGroupProps, InspectorGroupState> {
|
|
14
|
+
subgroupNames: string[];
|
|
15
|
+
subgroupElements: JSX.Element[];
|
|
16
|
+
valueOverrides: Map<string, any>;
|
|
17
|
+
constructor(props: InspectorGroupProps);
|
|
18
|
+
addGroup(data: GroupData): RefObject<InspectorGroup>;
|
|
19
|
+
removeGroup(name: string): void;
|
|
20
|
+
setField(name: string, value: any): void;
|
|
21
|
+
render(): ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -1,25 +1,25 @@
|
|
|
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
|
+
}
|
|
25
|
+
export {};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { Camera, EventDispatcher } from 'three';
|
|
2
|
-
import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
|
|
3
|
-
import RemoteThree from '@/core/remote/RemoteThree';
|
|
4
|
-
export default class Transform extends EventDispatcher {
|
|
5
|
-
static DRAG_START: string;
|
|
6
|
-
static DRAG_END: string;
|
|
7
|
-
private static _instance;
|
|
8
|
-
three: RemoteThree;
|
|
9
|
-
activeCamera: Camera;
|
|
10
|
-
controls: Map<string, TransformControls>;
|
|
11
|
-
private visibility;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
import { Camera, EventDispatcher } from 'three';
|
|
2
|
+
import { TransformControls } from 'three/examples/jsm/controls/TransformControls';
|
|
3
|
+
import RemoteThree from '@/core/remote/RemoteThree';
|
|
4
|
+
export default class Transform extends EventDispatcher {
|
|
5
|
+
static DRAG_START: string;
|
|
6
|
+
static DRAG_END: string;
|
|
7
|
+
private static _instance;
|
|
8
|
+
three: RemoteThree;
|
|
9
|
+
activeCamera: Camera;
|
|
10
|
+
controls: Map<string, TransformControls>;
|
|
11
|
+
private visibility;
|
|
12
|
+
clear(): void;
|
|
13
|
+
add(name: string): TransformControls;
|
|
14
|
+
get(name: string): TransformControls | undefined;
|
|
15
|
+
remove(name: string): boolean;
|
|
16
|
+
enabled(value: boolean): void;
|
|
17
|
+
updateCamera(camera: Camera, element: HTMLElement): void;
|
|
18
|
+
show(): void;
|
|
19
|
+
hide(): void;
|
|
20
|
+
static get instance(): Transform;
|
|
21
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { Camera, CatmullRomCurve3, Line, Mesh, Object3D, Vector3 } from 'three';
|
|
2
|
-
import InspectorGroup from '@/editor/sidePanel/inspector/InspectorGroup';
|
|
3
|
-
export type CurveType = 'catmullrom' | 'centripetal' | 'chordal';
|
|
4
|
-
export default class Spline extends Object3D {
|
|
5
|
-
curve: CatmullRomCurve3;
|
|
6
|
-
line: Line;
|
|
7
|
-
draggable: Object3D;
|
|
8
|
-
curvePos: Mesh;
|
|
9
|
-
tension: number;
|
|
10
|
-
closed: boolean;
|
|
11
|
-
subdivide: number;
|
|
12
|
-
curveType: CurveType;
|
|
13
|
-
offset: number;
|
|
14
|
-
private lineMaterial;
|
|
15
|
-
private _camera;
|
|
16
|
-
private _curvePercentage;
|
|
17
|
-
private _draggableScale;
|
|
18
|
-
private _transform?;
|
|
19
|
-
private raycaster;
|
|
20
|
-
private draggedMat;
|
|
21
|
-
private parentGroup;
|
|
22
|
-
private group;
|
|
23
|
-
constructor(name: string, camera: Camera);
|
|
24
|
-
enable(): void;
|
|
25
|
-
disable(): void;
|
|
26
|
-
dispose: () => void;
|
|
27
|
-
hideTransform: () => void;
|
|
28
|
-
exportSpline: () => void;
|
|
29
|
-
showPoints: (visible?: boolean) => void;
|
|
30
|
-
addPoints: (pts?: Array<Vector3>) => void;
|
|
31
|
-
addPoint: (position: Vector3, update?: boolean) => Mesh;
|
|
32
|
-
addNextPt: () => void;
|
|
33
|
-
removePoint: (child: Object3D) => void;
|
|
34
|
-
removePointAt: (index: number) => void;
|
|
35
|
-
removeSelectedPt: () => void;
|
|
36
|
-
updateSpline: () => void;
|
|
37
|
-
private onMouseClick;
|
|
38
|
-
getPointAt(percentage: number): Vector3;
|
|
39
|
-
getPoints(): Vector3[];
|
|
40
|
-
getTangentAt(percentage: number): Vector3;
|
|
41
|
-
get points(): Array<Vector3>;
|
|
42
|
-
get total(): number;
|
|
43
|
-
get draggableScale(): number;
|
|
44
|
-
set draggableScale(value: number);
|
|
45
|
-
get camera(): Camera;
|
|
46
|
-
set camera(value: Camera);
|
|
47
|
-
get curvePercentage(): number;
|
|
48
|
-
set curvePercentage(value: number);
|
|
49
|
-
private onUpdateTransform;
|
|
50
|
-
initDebug(parentGroup: InspectorGroup): void;
|
|
51
|
-
private debugPoint;
|
|
52
|
-
}
|
|
1
|
+
import { Camera, CatmullRomCurve3, Line, Mesh, Object3D, Vector3 } from 'three';
|
|
2
|
+
import InspectorGroup from '@/editor/sidePanel/inspector/InspectorGroup';
|
|
3
|
+
export type CurveType = 'catmullrom' | 'centripetal' | 'chordal';
|
|
4
|
+
export default class Spline extends Object3D {
|
|
5
|
+
curve: CatmullRomCurve3;
|
|
6
|
+
line: Line;
|
|
7
|
+
draggable: Object3D;
|
|
8
|
+
curvePos: Mesh;
|
|
9
|
+
tension: number;
|
|
10
|
+
closed: boolean;
|
|
11
|
+
subdivide: number;
|
|
12
|
+
curveType: CurveType;
|
|
13
|
+
offset: number;
|
|
14
|
+
private lineMaterial;
|
|
15
|
+
private _camera;
|
|
16
|
+
private _curvePercentage;
|
|
17
|
+
private _draggableScale;
|
|
18
|
+
private _transform?;
|
|
19
|
+
private raycaster;
|
|
20
|
+
private draggedMat;
|
|
21
|
+
private parentGroup;
|
|
22
|
+
private group;
|
|
23
|
+
constructor(name: string, camera: Camera);
|
|
24
|
+
enable(): void;
|
|
25
|
+
disable(): void;
|
|
26
|
+
dispose: () => void;
|
|
27
|
+
hideTransform: () => void;
|
|
28
|
+
exportSpline: () => void;
|
|
29
|
+
showPoints: (visible?: boolean) => void;
|
|
30
|
+
addPoints: (pts?: Array<Vector3>) => void;
|
|
31
|
+
addPoint: (position: Vector3, update?: boolean) => Mesh;
|
|
32
|
+
addNextPt: () => void;
|
|
33
|
+
removePoint: (child: Object3D) => void;
|
|
34
|
+
removePointAt: (index: number) => void;
|
|
35
|
+
removeSelectedPt: () => void;
|
|
36
|
+
updateSpline: () => void;
|
|
37
|
+
private onMouseClick;
|
|
38
|
+
getPointAt(percentage: number): Vector3;
|
|
39
|
+
getPoints(): Vector3[];
|
|
40
|
+
getTangentAt(percentage: number): Vector3;
|
|
41
|
+
get points(): Array<Vector3>;
|
|
42
|
+
get total(): number;
|
|
43
|
+
get draggableScale(): number;
|
|
44
|
+
set draggableScale(value: number);
|
|
45
|
+
get camera(): Camera;
|
|
46
|
+
set camera(value: Camera);
|
|
47
|
+
get curvePercentage(): number;
|
|
48
|
+
set curvePercentage(value: number);
|
|
49
|
+
private onUpdateTransform;
|
|
50
|
+
initDebug(parentGroup: InspectorGroup): void;
|
|
51
|
+
private debugPoint;
|
|
52
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Camera, CatmullRomCurve3, Object3D, Vector3 } from 'three';
|
|
2
|
-
import Spline from './Spline';
|
|
3
|
-
export type SplineJSON = {
|
|
4
|
-
name: string;
|
|
5
|
-
points: Array<number[]>;
|
|
6
|
-
tension: number;
|
|
7
|
-
closed: boolean;
|
|
8
|
-
subdivide: number;
|
|
9
|
-
type: string;
|
|
10
|
-
};
|
|
11
|
-
export default class SplineEditor extends Object3D {
|
|
12
|
-
defaultScale: number;
|
|
13
|
-
private _camera;
|
|
14
|
-
private group;
|
|
15
|
-
constructor(camera: Camera);
|
|
16
|
-
initDebug(): void;
|
|
17
|
-
dispose(): void;
|
|
18
|
-
addSpline(spline: Spline): void;
|
|
19
|
-
createSpline: (defaultPoints?: Array<Vector3>) => Spline;
|
|
20
|
-
createSplineFromArray: (points: Array<number[]>) => Spline;
|
|
21
|
-
createSplineFromCatmullRom: (curve: CatmullRomCurve3) => Spline;
|
|
22
|
-
createSplineFromJSON: (data: SplineJSON) => Spline;
|
|
23
|
-
showPoints: (visible?: boolean) => void;
|
|
24
|
-
private onAddSpline;
|
|
25
|
-
get camera(): Camera;
|
|
26
|
-
set camera(value: Camera);
|
|
27
|
-
}
|
|
1
|
+
import { Camera, CatmullRomCurve3, Object3D, Vector3 } from 'three';
|
|
2
|
+
import Spline from './Spline';
|
|
3
|
+
export type SplineJSON = {
|
|
4
|
+
name: string;
|
|
5
|
+
points: Array<number[]>;
|
|
6
|
+
tension: number;
|
|
7
|
+
closed: boolean;
|
|
8
|
+
subdivide: number;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
export default class SplineEditor extends Object3D {
|
|
12
|
+
defaultScale: number;
|
|
13
|
+
private _camera;
|
|
14
|
+
private group;
|
|
15
|
+
constructor(camera: Camera);
|
|
16
|
+
initDebug(): void;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
addSpline(spline: Spline): void;
|
|
19
|
+
createSpline: (defaultPoints?: Array<Vector3>) => Spline;
|
|
20
|
+
createSplineFromArray: (points: Array<number[]>) => Spline;
|
|
21
|
+
createSplineFromCatmullRom: (curve: CatmullRomCurve3) => Spline;
|
|
22
|
+
createSplineFromJSON: (data: SplineJSON) => Spline;
|
|
23
|
+
showPoints: (visible?: boolean) => void;
|
|
24
|
+
private onAddSpline;
|
|
25
|
+
get camera(): Camera;
|
|
26
|
+
set camera(value: Camera);
|
|
27
|
+
}
|