@tomorrowevening/hermes 0.0.116 → 0.0.117
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +9 -9
- package/dist/hermes.es.js +471 -457
- package/package.json +1 -1
- package/types/core/remote/RemoteThree.d.ts +42 -42
- package/types/editor/utils.d.ts +5 -5
- package/types/index.d.ts +29 -29
- package/types/utils/detectSettings.d.ts +15 -15
- package/types/utils/math.d.ts +5 -5
- package/types/utils/three.d.ts +21 -21
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.117",
|
11
11
|
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
12
12
|
"bugs": {
|
13
13
|
"url": "https://github.com/tomorrowevening/hermes/issues"
|
@@ -1,42 +1,42 @@
|
|
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
|
-
canvas: HTMLCanvasElement | null;
|
7
|
-
inputElement: any;
|
8
|
-
scene?: Scene;
|
9
|
-
scenes: Map<string, Scene>;
|
10
|
-
renderer?: WebGLRenderer;
|
11
|
-
renderTargets: Map<string, WebGLRenderTarget>;
|
12
|
-
private groups;
|
13
|
-
dispose(): void;
|
14
|
-
getObject(uuid: string): void;
|
15
|
-
setObject(value: any): void;
|
16
|
-
requestMethod(uuid: string, key: string, value?: any, subitem?: string): void;
|
17
|
-
updateObject(uuid: string, key: string, value: any): void;
|
18
|
-
createTexture(uuid: string, key: string, value: any): void;
|
19
|
-
addGroup(data: GroupData): void;
|
20
|
-
removeGroup(name: string): void;
|
21
|
-
updateGroup(group: string, prop: string, value: any): void;
|
22
|
-
removeAllGroups(): void;
|
23
|
-
addSpline(spline: Curve<any>): void;
|
24
|
-
setRenderer(value: WebGLRenderer, inputElement?: any): void;
|
25
|
-
updateRenderer(data: any): void;
|
26
|
-
addScene(value: Scene): void;
|
27
|
-
refreshScene(value: string): void;
|
28
|
-
removeScene(value: Scene): void;
|
29
|
-
removeAllScenes(): void;
|
30
|
-
getScene(uuid: string): Scene | null;
|
31
|
-
setScene(value: Scene): void;
|
32
|
-
addCamera(camera: Camera): void;
|
33
|
-
removeCamera(camera: Camera): void;
|
34
|
-
handleApp(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
35
|
-
handleEditor(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
36
|
-
addRT(name: string, params?: RenderTargetOptions): void;
|
37
|
-
resize(width: number, height: number): void;
|
38
|
-
set dpr(value: number);
|
39
|
-
get dpr(): number;
|
40
|
-
get width(): number;
|
41
|
-
get height(): number;
|
42
|
-
}
|
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
|
+
canvas: HTMLCanvasElement | null;
|
7
|
+
inputElement: any;
|
8
|
+
scene?: Scene;
|
9
|
+
scenes: Map<string, Scene>;
|
10
|
+
renderer?: WebGLRenderer;
|
11
|
+
renderTargets: Map<string, WebGLRenderTarget>;
|
12
|
+
private groups;
|
13
|
+
dispose(): void;
|
14
|
+
getObject(uuid: string): void;
|
15
|
+
setObject(value: any): void;
|
16
|
+
requestMethod(uuid: string, key: string, value?: any, subitem?: string): void;
|
17
|
+
updateObject(uuid: string, key: string, value: any): void;
|
18
|
+
createTexture(uuid: string, key: string, value: any): void;
|
19
|
+
addGroup(data: GroupData): void;
|
20
|
+
removeGroup(name: string): void;
|
21
|
+
updateGroup(group: string, prop: string, value: any): void;
|
22
|
+
removeAllGroups(): void;
|
23
|
+
addSpline(spline: Curve<any>): void;
|
24
|
+
setRenderer(value: WebGLRenderer, inputElement?: any): void;
|
25
|
+
updateRenderer(data: any): void;
|
26
|
+
addScene(value: Scene): void;
|
27
|
+
refreshScene(value: string): void;
|
28
|
+
removeScene(value: Scene): void;
|
29
|
+
removeAllScenes(): void;
|
30
|
+
getScene(uuid: string): Scene | null;
|
31
|
+
setScene(value: Scene): void;
|
32
|
+
addCamera(camera: Camera): void;
|
33
|
+
removeCamera(camera: Camera): void;
|
34
|
+
handleApp(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
35
|
+
handleEditor(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
36
|
+
addRT(name: string, params?: RenderTargetOptions): void;
|
37
|
+
resize(width: number, height: number): void;
|
38
|
+
set dpr(value: number);
|
39
|
+
get dpr(): number;
|
40
|
+
get width(): number;
|
41
|
+
get height(): number;
|
42
|
+
}
|
package/types/editor/utils.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export declare function capitalize(value: string): string;
|
2
|
-
export declare function copyToClipboard(data: any): string;
|
3
|
-
export declare function randomID(): string;
|
4
|
-
export declare function isColor(obj: any): boolean;
|
5
|
-
export declare function colorToHex(obj: any): string;
|
1
|
+
export declare function capitalize(value: string): string;
|
2
|
+
export declare function copyToClipboard(data: any): string;
|
3
|
+
export declare function randomID(): string;
|
4
|
+
export declare function isColor(obj: any): boolean;
|
5
|
+
export declare function colorToHex(obj: any): string;
|
package/types/index.d.ts
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
export * from './core/types';
|
2
|
-
export * from './editor/utils';
|
3
|
-
export * from './utils/three';
|
4
|
-
export * from './utils/detectSettings';
|
5
|
-
export { default as Application } from './core/Application';
|
6
|
-
export { debugDispatcher, ToolEvents } from './editor/global';
|
7
|
-
export { default as BaseRemote } from './core/remote/BaseRemote';
|
8
|
-
export { default as RemoteComponents } from './core/remote/RemoteComponents';
|
9
|
-
export * from './editor/theatreUtils';
|
10
|
-
export { default as RemoteTheatre } from './core/remote/RemoteTheatre';
|
11
|
-
export { default as RemoteThree } from './core/remote/RemoteThree';
|
12
|
-
export { default as NavButton } from './editor/components/NavButton';
|
13
|
-
export { default as DraggableItem } from './editor/components/DraggableItem';
|
14
|
-
export { default as Draggable } from './editor/components/Draggable';
|
15
|
-
export { default as DropdownItem } from './editor/components/DropdownItem';
|
16
|
-
export { default as Dropdown } from './editor/components/Dropdown';
|
17
|
-
export { default as RemoteController } from './core/RemoteController';
|
18
|
-
export { default as SidePanel } from './editor/sidePanel/SidePanel';
|
19
|
-
export { default as Accordion } from './editor/sidePanel/Accordion';
|
20
|
-
export { default as ChildObject } from './editor/sidePanel/ChildObject';
|
21
|
-
export { default as ContainerObject } from './editor/sidePanel/ContainerObject';
|
22
|
-
export { default as Inspector } from './editor/sidePanel/inspector/Inspector';
|
23
|
-
export { default as SceneInspector } from './editor/sidePanel/inspector/SceneInspector';
|
24
|
-
export { default as MultiView } from './editor/multiView/MultiView';
|
25
|
-
export { default as Editor } from './editor/Editor';
|
26
|
-
export { default as ThreeEditor } from './editor/ThreeEditor';
|
27
|
-
export { default as Transform } from './editor/tools/Transform';
|
28
|
-
export { default as Spline } from './editor/tools/splineEditor/Spline';
|
29
|
-
export { default as SplineEditor } from './editor/tools/splineEditor/index';
|
1
|
+
export * from './core/types';
|
2
|
+
export * from './editor/utils';
|
3
|
+
export * from './utils/three';
|
4
|
+
export * from './utils/detectSettings';
|
5
|
+
export { default as Application } from './core/Application';
|
6
|
+
export { debugDispatcher, ToolEvents } from './editor/global';
|
7
|
+
export { default as BaseRemote } from './core/remote/BaseRemote';
|
8
|
+
export { default as RemoteComponents } from './core/remote/RemoteComponents';
|
9
|
+
export * from './editor/theatreUtils';
|
10
|
+
export { default as RemoteTheatre } from './core/remote/RemoteTheatre';
|
11
|
+
export { default as RemoteThree } from './core/remote/RemoteThree';
|
12
|
+
export { default as NavButton } from './editor/components/NavButton';
|
13
|
+
export { default as DraggableItem } from './editor/components/DraggableItem';
|
14
|
+
export { default as Draggable } from './editor/components/Draggable';
|
15
|
+
export { default as DropdownItem } from './editor/components/DropdownItem';
|
16
|
+
export { default as Dropdown } from './editor/components/Dropdown';
|
17
|
+
export { default as RemoteController } from './core/RemoteController';
|
18
|
+
export { default as SidePanel } from './editor/sidePanel/SidePanel';
|
19
|
+
export { default as Accordion } from './editor/sidePanel/Accordion';
|
20
|
+
export { default as ChildObject } from './editor/sidePanel/ChildObject';
|
21
|
+
export { default as ContainerObject } from './editor/sidePanel/ContainerObject';
|
22
|
+
export { default as Inspector } from './editor/sidePanel/inspector/Inspector';
|
23
|
+
export { default as SceneInspector } from './editor/sidePanel/inspector/SceneInspector';
|
24
|
+
export { default as MultiView } from './editor/multiView/MultiView';
|
25
|
+
export { default as Editor } from './editor/Editor';
|
26
|
+
export { default as ThreeEditor } from './editor/ThreeEditor';
|
27
|
+
export { default as Transform } from './editor/tools/Transform';
|
28
|
+
export { default as Spline } from './editor/tools/splineEditor/Spline';
|
29
|
+
export { default as SplineEditor } from './editor/tools/splineEditor/index';
|
@@ -1,15 +1,15 @@
|
|
1
|
-
export declare enum QualityType {
|
2
|
-
'High' = 0,
|
3
|
-
'Medium' = 1,
|
4
|
-
'Low' = 2
|
5
|
-
}
|
6
|
-
export type AppSettings = {
|
7
|
-
dpr: number;
|
8
|
-
fps: number;
|
9
|
-
width: number;
|
10
|
-
height: number;
|
11
|
-
mobile: boolean;
|
12
|
-
supportOffScreenCanvas: boolean;
|
13
|
-
quality: QualityType;
|
14
|
-
};
|
15
|
-
export declare function detectSettings(canvas: HTMLCanvasElement): Promise<AppSettings>;
|
1
|
+
export declare enum QualityType {
|
2
|
+
'High' = 0,
|
3
|
+
'Medium' = 1,
|
4
|
+
'Low' = 2
|
5
|
+
}
|
6
|
+
export type AppSettings = {
|
7
|
+
dpr: number;
|
8
|
+
fps: number;
|
9
|
+
width: number;
|
10
|
+
height: number;
|
11
|
+
mobile: boolean;
|
12
|
+
supportOffScreenCanvas: boolean;
|
13
|
+
quality: QualityType;
|
14
|
+
};
|
15
|
+
export declare function detectSettings(canvas: HTMLCanvasElement): Promise<AppSettings>;
|
package/types/utils/math.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export declare function clamp(min: number, max: number, value: number): number;
|
2
|
-
export declare function normalize(min: number, max: number, value: number): number;
|
3
|
-
export declare function mix(min: number, max: number, value: number): number;
|
4
|
-
export declare function distance(x: number, y: number): number;
|
5
|
-
export declare function round(value: number, precision?: number): number;
|
1
|
+
export declare function clamp(min: number, max: number, value: number): number;
|
2
|
+
export declare function normalize(min: number, max: number, value: number): number;
|
3
|
+
export declare function mix(min: number, max: number, value: number): number;
|
4
|
+
export declare function distance(x: number, y: number): number;
|
5
|
+
export declare function round(value: number, precision?: number): number;
|
package/types/utils/three.d.ts
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
import { Material, Object3D, Texture, WebGLRenderer } from 'three';
|
2
|
-
export declare const disposeTexture: (texture?: Texture) => void;
|
3
|
-
export declare const disposeMaterial: (material?: Material | Material[]) => void;
|
4
|
-
export declare const dispose: (object: Object3D) => void;
|
5
|
-
export declare let totalThreeObjects: number;
|
6
|
-
export declare const resetThreeObjects: () => void;
|
7
|
-
export declare const hierarchyUUID: (object: Object3D) => void;
|
8
|
-
export declare class ExportTexture {
|
9
|
-
static renderer: WebGLRenderer;
|
10
|
-
private static canvas;
|
11
|
-
private static context;
|
12
|
-
private static scene;
|
13
|
-
private static camera;
|
14
|
-
private static material;
|
15
|
-
private static inited;
|
16
|
-
private static width;
|
17
|
-
private static height;
|
18
|
-
private static init;
|
19
|
-
static renderToBlob(texture: Texture): string;
|
20
|
-
private static renderToCanvas;
|
21
|
-
}
|
1
|
+
import { Material, Object3D, Texture, WebGLRenderer } from 'three';
|
2
|
+
export declare const disposeTexture: (texture?: Texture) => void;
|
3
|
+
export declare const disposeMaterial: (material?: Material | Material[]) => void;
|
4
|
+
export declare const dispose: (object: Object3D) => void;
|
5
|
+
export declare let totalThreeObjects: number;
|
6
|
+
export declare const resetThreeObjects: () => void;
|
7
|
+
export declare const hierarchyUUID: (object: Object3D) => void;
|
8
|
+
export declare class ExportTexture {
|
9
|
+
static renderer: WebGLRenderer;
|
10
|
+
private static canvas;
|
11
|
+
private static context;
|
12
|
+
private static scene;
|
13
|
+
private static camera;
|
14
|
+
private static material;
|
15
|
+
private static inited;
|
16
|
+
private static width;
|
17
|
+
private static height;
|
18
|
+
private static init;
|
19
|
+
static renderToBlob(texture: Texture): string;
|
20
|
+
private static renderToCanvas;
|
21
|
+
}
|