@tomorrowevening/hermes 0.0.116 → 0.0.118
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +14 -14
- package/dist/hermes.es.js +611 -590
- 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 +2 -1
- 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.118",
|
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,7 +1,8 @@
|
|
1
1
|
export * from './core/types';
|
2
2
|
export * from './editor/utils';
|
3
|
-
export * from './utils/three';
|
4
3
|
export * from './utils/detectSettings';
|
4
|
+
export * from './utils/math';
|
5
|
+
export * from './utils/three';
|
5
6
|
export { default as Application } from './core/Application';
|
6
7
|
export { debugDispatcher, ToolEvents } from './editor/global';
|
7
8
|
export { default as BaseRemote } from './core/remote/BaseRemote';
|
@@ -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
|
+
}
|