@tomorrowevening/hermes 0.0.106 → 0.0.108
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +15 -15
- package/dist/hermes.es.js +2377 -2283
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/core/remote/RemoteTheatre.d.ts +1 -2
- 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 +115 -109
- package/types/editor/multiView/Toggle.d.ts +10 -10
- 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 +27 -25
- package/types/editor/tools/Transform.d.ts +2 -0
- 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 -27
@@ -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
|
-
|
57
|
-
private
|
58
|
-
|
59
|
-
private
|
60
|
-
private
|
61
|
-
private
|
62
|
-
private
|
63
|
-
private
|
64
|
-
private
|
65
|
-
private
|
66
|
-
private
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
private
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
private
|
81
|
-
private
|
82
|
-
private
|
83
|
-
private
|
84
|
-
private
|
85
|
-
private
|
86
|
-
private
|
87
|
-
private
|
88
|
-
private
|
89
|
-
private
|
90
|
-
private
|
91
|
-
private
|
92
|
-
private
|
93
|
-
private
|
94
|
-
private
|
95
|
-
private
|
96
|
-
private
|
97
|
-
private
|
98
|
-
private
|
99
|
-
private
|
100
|
-
private
|
101
|
-
private
|
102
|
-
private
|
103
|
-
private
|
104
|
-
private
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
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
|
+
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 {};
|
@@ -1,10 +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
|
+
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,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,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
|
-
|
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 {};
|
@@ -9,6 +9,7 @@ export default class Transform extends EventDispatcher {
|
|
9
9
|
activeCamera: Camera;
|
10
10
|
controls: Map<string, TransformControls>;
|
11
11
|
private visibility;
|
12
|
+
constructor();
|
12
13
|
clear(): void;
|
13
14
|
add(name: string): TransformControls;
|
14
15
|
get(name: string): TransformControls | undefined;
|
@@ -17,5 +18,6 @@ export default class Transform extends EventDispatcher {
|
|
17
18
|
updateCamera(camera: Camera, element: HTMLElement): void;
|
18
19
|
show(): void;
|
19
20
|
hide(): void;
|
21
|
+
private setScene;
|
20
22
|
static get instance(): Transform;
|
21
23
|
}
|
@@ -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
|
+
}
|
package/types/editor/utils.d.ts
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
import { Material, Object3D, Texture, WebGLRenderer } from 'three';
|
2
|
-
export declare function capitalize(value: string): string;
|
3
|
-
export declare function copyToClipboard(data: any): string;
|
4
|
-
export declare function clamp(min: number, max: number, value: number): number;
|
5
|
-
export declare function normalize(min: number, max: number, value: number): number;
|
6
|
-
export declare function mix(min: number, max: number, value: number): number;
|
7
|
-
export declare function distance(x: number, y: number): number;
|
8
|
-
export declare function randomID(): string;
|
9
|
-
export declare function isColor(obj: any): boolean;
|
10
|
-
export declare function colorToHex(obj: any): string;
|
11
|
-
export declare function round(value: number, precision?: number): number;
|
12
|
-
export declare let totalThreeObjects: number;
|
13
|
-
export declare const resetThreeObjects: () => void;
|
14
|
-
export declare const hierarchyUUID: (object: Object3D) => void;
|
15
|
-
export declare const disposeTexture: (texture?: Texture) => void;
|
16
|
-
export declare const disposeMaterial: (material?: Material | Material[]) => void;
|
17
|
-
export declare const dispose: (object: Object3D) => void;
|
18
|
-
export declare class ExportTexture {
|
19
|
-
static renderer: WebGLRenderer;
|
20
|
-
private static canvas;
|
21
|
-
private static context;
|
22
|
-
private static scene;
|
23
|
-
private static camera;
|
24
|
-
private static material;
|
25
|
-
private static inited;
|
26
|
-
private static width;
|
27
|
-
private static height;
|
28
|
-
private static init;
|
29
|
-
static renderToBlob(texture: Texture): string;
|
30
|
-
private static renderToCanvas;
|
31
|
-
}
|
1
|
+
import { Material, Object3D, Texture, WebGLRenderer } from 'three';
|
2
|
+
export declare function capitalize(value: string): string;
|
3
|
+
export declare function copyToClipboard(data: any): string;
|
4
|
+
export declare function clamp(min: number, max: number, value: number): number;
|
5
|
+
export declare function normalize(min: number, max: number, value: number): number;
|
6
|
+
export declare function mix(min: number, max: number, value: number): number;
|
7
|
+
export declare function distance(x: number, y: number): number;
|
8
|
+
export declare function randomID(): string;
|
9
|
+
export declare function isColor(obj: any): boolean;
|
10
|
+
export declare function colorToHex(obj: any): string;
|
11
|
+
export declare function round(value: number, precision?: number): number;
|
12
|
+
export declare let totalThreeObjects: number;
|
13
|
+
export declare const resetThreeObjects: () => void;
|
14
|
+
export declare const hierarchyUUID: (object: Object3D) => void;
|
15
|
+
export declare const disposeTexture: (texture?: Texture) => void;
|
16
|
+
export declare const disposeMaterial: (material?: Material | Material[]) => void;
|
17
|
+
export declare const dispose: (object: Object3D) => void;
|
18
|
+
export declare class ExportTexture {
|
19
|
+
static renderer: WebGLRenderer;
|
20
|
+
private static canvas;
|
21
|
+
private static context;
|
22
|
+
private static scene;
|
23
|
+
private static camera;
|
24
|
+
private static material;
|
25
|
+
private static inited;
|
26
|
+
private static width;
|
27
|
+
private static height;
|
28
|
+
private static init;
|
29
|
+
static renderToBlob(texture: Texture): string;
|
30
|
+
private static renderToCanvas;
|
31
|
+
}
|