@tomorrowevening/hermes 0.0.112 → 0.0.114
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +20 -0
- package/dist/hermes.cjs.js +15 -15
- package/dist/hermes.es.js +1374 -1120
- package/package.json +1 -1
- package/types/core/remote/RemoteThree.d.ts +41 -39
- package/types/core/types.d.ts +35 -35
- package/types/editor/global.d.ts +28 -26
- package/types/editor/multiView/MultiView.d.ts +1 -0
- package/types/editor/sidePanel/inspector/utils/InspectAnimation.d.ts +8 -8
- package/types/editor/sidePanel/inspector/utils/InspectRenderer.d.ts +28 -0
package/package.json
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
"module": "./dist/hermes.esm.js",
|
8
8
|
"types": "./types/index.d.ts",
|
9
9
|
"type": "module",
|
10
|
-
"version": "0.0.
|
10
|
+
"version": "0.0.114",
|
11
11
|
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
12
12
|
"bugs": {
|
13
13
|
"url": "https://github.com/tomorrowevening/hermes/issues"
|
@@ -1,39 +1,41 @@
|
|
1
|
-
import { Camera, Curve, RenderTargetOptions, Scene, WebGLRenderTarget, WebGLRenderer } from 'three';
|
2
|
-
import Application from '../Application';
|
3
|
-
import BaseRemote from './BaseRemote';
|
4
|
-
import { BroadcastData, GroupData } from '../types';
|
5
|
-
export default class RemoteThree extends BaseRemote {
|
6
|
-
scene?: Scene;
|
7
|
-
scenes: Map<string, Scene>;
|
8
|
-
renderer?: WebGLRenderer;
|
9
|
-
renderTargets: Map<string, WebGLRenderTarget>;
|
10
|
-
private groups;
|
11
|
-
dispose(): void;
|
12
|
-
getObject(uuid: string): void;
|
13
|
-
setObject(value: any): void;
|
14
|
-
requestMethod(uuid: string, key: string, value?: any, subitem?: string): void;
|
15
|
-
updateObject(uuid: string, key: string, value: any): void;
|
16
|
-
createTexture(uuid: string, key: string, value: any): void;
|
17
|
-
addGroup(data: GroupData): void;
|
18
|
-
removeGroup(name: string): void;
|
19
|
-
updateGroup(group: string, prop: string, value: any): void;
|
20
|
-
removeAllGroups(): void;
|
21
|
-
addSpline(spline: Curve<any>): void;
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
get
|
38
|
-
get
|
39
|
-
|
1
|
+
import { Camera, Curve, RenderTargetOptions, Scene, WebGLRenderTarget, WebGLRenderer } from 'three';
|
2
|
+
import Application from '../Application';
|
3
|
+
import BaseRemote from './BaseRemote';
|
4
|
+
import { BroadcastData, GroupData } from '../types';
|
5
|
+
export default class RemoteThree extends BaseRemote {
|
6
|
+
scene?: Scene;
|
7
|
+
scenes: Map<string, Scene>;
|
8
|
+
renderer?: WebGLRenderer;
|
9
|
+
renderTargets: Map<string, WebGLRenderTarget>;
|
10
|
+
private groups;
|
11
|
+
dispose(): void;
|
12
|
+
getObject(uuid: string): void;
|
13
|
+
setObject(value: any): void;
|
14
|
+
requestMethod(uuid: string, key: string, value?: any, subitem?: string): void;
|
15
|
+
updateObject(uuid: string, key: string, value: any): void;
|
16
|
+
createTexture(uuid: string, key: string, value: any): void;
|
17
|
+
addGroup(data: GroupData): void;
|
18
|
+
removeGroup(name: string): void;
|
19
|
+
updateGroup(group: string, prop: string, value: any): void;
|
20
|
+
removeAllGroups(): void;
|
21
|
+
addSpline(spline: Curve<any>): void;
|
22
|
+
addRenderer(value: WebGLRenderer): void;
|
23
|
+
updateRenderer(data: any): void;
|
24
|
+
addScene(value: Scene): void;
|
25
|
+
refreshScene(value: string): void;
|
26
|
+
removeScene(value: Scene): void;
|
27
|
+
removeAllScenes(): void;
|
28
|
+
getScene(uuid: string): Scene | null;
|
29
|
+
setScene(value: Scene): void;
|
30
|
+
addCamera(camera: Camera): void;
|
31
|
+
removeCamera(camera: Camera): void;
|
32
|
+
handleApp(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
33
|
+
handleEditor(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
34
|
+
addRT(name: string, params?: RenderTargetOptions): void;
|
35
|
+
resize(width: number, height: number): void;
|
36
|
+
set dpr(value: number);
|
37
|
+
get dpr(): number;
|
38
|
+
get width(): number;
|
39
|
+
get height(): number;
|
40
|
+
get canvas(): HTMLCanvasElement | null;
|
41
|
+
}
|
package/types/core/types.d.ts
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
import { InspectorFieldType } from '@/editor/sidePanel/inspector/InspectorField';
|
2
|
-
export interface BroadcastData {
|
3
|
-
target: ApplicationMode;
|
4
|
-
event: EditorEvent;
|
5
|
-
data?: any;
|
6
|
-
}
|
7
|
-
export interface GroupItemData {
|
8
|
-
type: InspectorFieldType;
|
9
|
-
prop: string;
|
10
|
-
title?: string;
|
11
|
-
value?: any;
|
12
|
-
min?: number;
|
13
|
-
max?: number;
|
14
|
-
step?: number;
|
15
|
-
disabled?: boolean;
|
16
|
-
options?: any[];
|
17
|
-
}
|
18
|
-
export interface GroupData {
|
19
|
-
title: string;
|
20
|
-
items: GroupItemData[];
|
21
|
-
onUpdate: (prop: string, value: any) => void;
|
22
|
-
}
|
23
|
-
export interface GroupCallback {
|
24
|
-
title: string;
|
25
|
-
onUpdate: (prop: string, value: any) => void;
|
26
|
-
}
|
27
|
-
export type ApplicationMode = 'app' | 'editor';
|
28
|
-
export type VoidCallback = () => void;
|
29
|
-
export type DataUpdateCallback = (data: any) => void;
|
30
|
-
export type EditorEvent = 'custom' | 'setSheet' | 'setSheetObject' | 'updateSheetObject' | 'updateTimeline' | 'playSheet' | 'pauseSheet' | 'getObject' | 'setObject' | 'updateObject' | 'addScene' | 'refreshScene' | 'removeScene' | 'setScene' | 'createTexture' | 'requestMethod' | 'addCamera' | 'removeCamera' | 'addSpline' | 'addFolder' | 'bindObject' | 'updateBind' | 'addButton' | 'clickButton' | 'selectComponent' | 'draggableListUpdate' | 'addGroup' | 'removeGroup' | 'updateGroup';
|
31
|
-
export type VoidFunc = () => void;
|
32
|
-
export type BroadcastCallback = (data: BroadcastData) => void;
|
33
|
-
export type TheatreUpdateCallback = (data: any) => void;
|
34
|
-
export declare const noop: () => void;
|
35
|
-
export declare const defaultTheatreCallback: TheatreUpdateCallback;
|
1
|
+
import { InspectorFieldType } from '@/editor/sidePanel/inspector/InspectorField';
|
2
|
+
export interface BroadcastData {
|
3
|
+
target: ApplicationMode;
|
4
|
+
event: EditorEvent;
|
5
|
+
data?: any;
|
6
|
+
}
|
7
|
+
export interface GroupItemData {
|
8
|
+
type: InspectorFieldType;
|
9
|
+
prop: string;
|
10
|
+
title?: string;
|
11
|
+
value?: any;
|
12
|
+
min?: number;
|
13
|
+
max?: number;
|
14
|
+
step?: number;
|
15
|
+
disabled?: boolean;
|
16
|
+
options?: any[];
|
17
|
+
}
|
18
|
+
export interface GroupData {
|
19
|
+
title: string;
|
20
|
+
items: GroupItemData[];
|
21
|
+
onUpdate: (prop: string, value: any) => void;
|
22
|
+
}
|
23
|
+
export interface GroupCallback {
|
24
|
+
title: string;
|
25
|
+
onUpdate: (prop: string, value: any) => void;
|
26
|
+
}
|
27
|
+
export type ApplicationMode = 'app' | 'editor';
|
28
|
+
export type VoidCallback = () => void;
|
29
|
+
export type DataUpdateCallback = (data: any) => void;
|
30
|
+
export type EditorEvent = 'custom' | 'setSheet' | 'setSheetObject' | 'updateSheetObject' | 'updateTimeline' | 'playSheet' | 'pauseSheet' | 'getObject' | 'setObject' | 'updateObject' | 'addScene' | 'refreshScene' | 'removeScene' | 'setScene' | 'createTexture' | 'requestMethod' | 'addCamera' | 'removeCamera' | 'addSpline' | 'addRenderer' | 'updateRenderer' | 'addFolder' | 'bindObject' | 'updateBind' | 'addButton' | 'clickButton' | 'selectComponent' | 'draggableListUpdate' | 'addGroup' | 'removeGroup' | 'updateGroup';
|
31
|
+
export type VoidFunc = () => void;
|
32
|
+
export type BroadcastCallback = (data: BroadcastData) => void;
|
33
|
+
export type TheatreUpdateCallback = (data: any) => void;
|
34
|
+
export declare const noop: () => void;
|
35
|
+
export declare const defaultTheatreCallback: TheatreUpdateCallback;
|
package/types/editor/global.d.ts
CHANGED
@@ -1,26 +1,28 @@
|
|
1
|
-
import { EventDispatcher } from 'three';
|
2
|
-
export declare enum ToolEvents {
|
3
|
-
CUSTOM = "ToolEvents::custom",
|
4
|
-
SELECT_DROPDOWN = "ToolEvents::selectDropdown",
|
5
|
-
DRAG_UPDATE = "ToolEvents::dragUpdate",
|
6
|
-
ADD_SCENE = "ToolEvents::addScene",
|
7
|
-
REFRESH_SCENE = "ToolEvents::refreshScene",
|
8
|
-
REMOVE_SCENE = "ToolEvents::removeScene",
|
9
|
-
SET_SCENE = "ToolEvents::setScene",
|
10
|
-
GET_OBJECT = "ToolEvents::getObject",
|
11
|
-
SET_OBJECT = "ToolEvents::setObject",
|
12
|
-
UPDATE_OBJECT = "ToolEvents::updateObject",
|
13
|
-
CREATE_TEXTURE = "ToolEvents::createTexture",
|
14
|
-
REQUEST_METHOD = "ToolEvents::requestMethod",
|
15
|
-
ADD_CAMERA = "ToolEvents::addCamera",
|
16
|
-
REMOVE_CAMERA = "ToolEvents::removeCamera",
|
17
|
-
ADD_GROUP = "ToolEvents::addGroup",
|
18
|
-
REMOVE_GROUP = "ToolEvents::removeGroup",
|
19
|
-
ADD_SPLINE = "ToolEvents::addSpline"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
import { EventDispatcher } from 'three';
|
2
|
+
export declare enum ToolEvents {
|
3
|
+
CUSTOM = "ToolEvents::custom",
|
4
|
+
SELECT_DROPDOWN = "ToolEvents::selectDropdown",
|
5
|
+
DRAG_UPDATE = "ToolEvents::dragUpdate",
|
6
|
+
ADD_SCENE = "ToolEvents::addScene",
|
7
|
+
REFRESH_SCENE = "ToolEvents::refreshScene",
|
8
|
+
REMOVE_SCENE = "ToolEvents::removeScene",
|
9
|
+
SET_SCENE = "ToolEvents::setScene",
|
10
|
+
GET_OBJECT = "ToolEvents::getObject",
|
11
|
+
SET_OBJECT = "ToolEvents::setObject",
|
12
|
+
UPDATE_OBJECT = "ToolEvents::updateObject",
|
13
|
+
CREATE_TEXTURE = "ToolEvents::createTexture",
|
14
|
+
REQUEST_METHOD = "ToolEvents::requestMethod",
|
15
|
+
ADD_CAMERA = "ToolEvents::addCamera",
|
16
|
+
REMOVE_CAMERA = "ToolEvents::removeCamera",
|
17
|
+
ADD_GROUP = "ToolEvents::addGroup",
|
18
|
+
REMOVE_GROUP = "ToolEvents::removeGroup",
|
19
|
+
ADD_SPLINE = "ToolEvents::addSpline",
|
20
|
+
ADD_RENDERER = "ToolEvents::addRenderer",
|
21
|
+
UPDATE_RENDERER = "ToolEvents::updateRenderer"
|
22
|
+
}
|
23
|
+
export type ToolEvent = {
|
24
|
+
[key in ToolEvents]: {
|
25
|
+
value?: unknown;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
export declare const debugDispatcher: EventDispatcher<ToolEvent>;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import RemoteThree from '@/core/remote/RemoteThree';
|
2
|
-
import { RemoteObject } from '../../types';
|
3
|
-
type InspectAnimationProps = {
|
4
|
-
object: RemoteObject;
|
5
|
-
three: RemoteThree;
|
6
|
-
};
|
7
|
-
export default function InspectAnimation(props: InspectAnimationProps): import("react/jsx-runtime").JSX.Element;
|
8
|
-
export {};
|
1
|
+
import RemoteThree from '@/core/remote/RemoteThree';
|
2
|
+
import { RemoteObject } from '../../types';
|
3
|
+
type InspectAnimationProps = {
|
4
|
+
object: RemoteObject;
|
5
|
+
three: RemoteThree;
|
6
|
+
};
|
7
|
+
export default function InspectAnimation(props: InspectAnimationProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
2
|
+
import RemoteThree from '@/core/remote/RemoteThree';
|
3
|
+
type InspectRendererProps = {
|
4
|
+
three: RemoteThree;
|
5
|
+
};
|
6
|
+
type InspectRendererState = {
|
7
|
+
expanded: boolean;
|
8
|
+
lastUpdated: number;
|
9
|
+
};
|
10
|
+
export default class InspectRenderer extends Component<InspectRendererProps, InspectRendererState> {
|
11
|
+
private autoClear;
|
12
|
+
private autoClearColor;
|
13
|
+
private autoClearDepth;
|
14
|
+
private autoClearStencil;
|
15
|
+
private outputColorSpace;
|
16
|
+
private localClippingEnabled;
|
17
|
+
private clearColor;
|
18
|
+
private clearAlpha;
|
19
|
+
private toneMapping;
|
20
|
+
private toneMappingExposure;
|
21
|
+
constructor(props: InspectRendererProps);
|
22
|
+
componentwillunmount(): void;
|
23
|
+
private onAddRenderer;
|
24
|
+
render(): ReactNode;
|
25
|
+
private saveExpanded;
|
26
|
+
get expandedName(): string;
|
27
|
+
}
|
28
|
+
export {};
|