@tomorrowevening/hermes 0.0.97 → 0.0.99
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +674 -674
- package/README.md +16 -16
- package/dist/hermes.cjs.js +149 -149
- package/dist/hermes.es.js +6224 -6247
- package/package.json +80 -80
- package/types/core/remote/RemoteThree.d.ts +38 -40
- package/types/editor/global.d.ts +25 -20
package/package.json
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
{
|
2
|
-
"name": "@tomorrowevening/hermes",
|
3
|
-
"author": "Colin Duffy <http://tomorrowevening.com/>",
|
4
|
-
"description": "An extendable set of Web Tools controlled via a separate window for non-intereference with content.",
|
5
|
-
"license": "GPL-3.0-or-later",
|
6
|
-
"main": "./dist/hermes.cjs.js",
|
7
|
-
"module": "./dist/hermes.esm.js",
|
8
|
-
"types": "./types/index.d.ts",
|
9
|
-
"type": "module",
|
10
|
-
"version": "0.0.
|
11
|
-
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
12
|
-
"bugs": {
|
13
|
-
"url": "https://github.com/tomorrowevening/hermes/issues"
|
14
|
-
},
|
15
|
-
"keywords": [
|
16
|
-
"Editor",
|
17
|
-
"Remote",
|
18
|
-
"TheatreJS",
|
19
|
-
"ThreeJS"
|
20
|
-
],
|
21
|
-
"files": [
|
22
|
-
"dist/hermes.es.js",
|
23
|
-
"dist/hermes.cjs.js",
|
24
|
-
"dist/style.css",
|
25
|
-
"types/**/*.d.ts"
|
26
|
-
],
|
27
|
-
"exports": {
|
28
|
-
".": {
|
29
|
-
"import": "./dist/hermes.es.js",
|
30
|
-
"require": "./dist/hermes.cjs.js",
|
31
|
-
"types": "./types/index.d.ts"
|
32
|
-
},
|
33
|
-
"./dist/style.css": "./dist/style.css",
|
34
|
-
"./server/index.mjs": "./server/index.mjs"
|
35
|
-
},
|
36
|
-
"repository": {
|
37
|
-
"type": "git",
|
38
|
-
"url": "git+https://github.com/tomorrowevening/hermes.git"
|
39
|
-
},
|
40
|
-
"scripts": {
|
41
|
-
"server": "node server/index.mjs",
|
42
|
-
"clean": "rm -r dist && rm -r types",
|
43
|
-
"dev": "vite",
|
44
|
-
"declare": "tsc --declaration --emitDeclarationOnly --declarationDir types",
|
45
|
-
"buildLib": "yarn declare && vite build",
|
46
|
-
"buildExample": "vite build --config vite.config.example.ts",
|
47
|
-
"build": "yarn buildLib && yarn buildExample",
|
48
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
49
|
-
"preview": "vite preview"
|
50
|
-
},
|
51
|
-
"dependencies": {
|
52
|
-
},
|
53
|
-
"devDependencies": {
|
54
|
-
"@theatre/core": "0.7.0",
|
55
|
-
"@theatre/studio": "0.7.0",
|
56
|
-
"@types/react": "^18.2.15",
|
57
|
-
"@types/react-dom": "^18.2.7",
|
58
|
-
"@types/three": "^0.164.0",
|
59
|
-
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
60
|
-
"@typescript-eslint/parser": "^6.4.0",
|
61
|
-
"@vitejs/plugin-react": "^4.0.3",
|
62
|
-
"camera-controls": "^2.9.0",
|
63
|
-
"eslint": "^8.45.0",
|
64
|
-
"eslint-plugin-react": "^7.33.2",
|
65
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
66
|
-
"eslint-plugin-react-refresh": "^0.4.3",
|
67
|
-
"framer-motion": "^10.16.0",
|
68
|
-
"path": "^0.12.7",
|
69
|
-
"postprocessing": "^6.35.3",
|
70
|
-
"react": "^18.2.0",
|
71
|
-
"react-dom": "^18.2.0",
|
72
|
-
"sass": "^1.66.1",
|
73
|
-
"stats-gl": "2.0.1",
|
74
|
-
"three": "^0.164.1",
|
75
|
-
"typescript": "^5.0.2",
|
76
|
-
"vite": "^4.4.5",
|
77
|
-
"vite-plugin-glsl": "^1.2.1",
|
78
|
-
"ws": "^8.16.0"
|
79
|
-
}
|
80
|
-
}
|
1
|
+
{
|
2
|
+
"name": "@tomorrowevening/hermes",
|
3
|
+
"author": "Colin Duffy <http://tomorrowevening.com/>",
|
4
|
+
"description": "An extendable set of Web Tools controlled via a separate window for non-intereference with content.",
|
5
|
+
"license": "GPL-3.0-or-later",
|
6
|
+
"main": "./dist/hermes.cjs.js",
|
7
|
+
"module": "./dist/hermes.esm.js",
|
8
|
+
"types": "./types/index.d.ts",
|
9
|
+
"type": "module",
|
10
|
+
"version": "0.0.99",
|
11
|
+
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
12
|
+
"bugs": {
|
13
|
+
"url": "https://github.com/tomorrowevening/hermes/issues"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"Editor",
|
17
|
+
"Remote",
|
18
|
+
"TheatreJS",
|
19
|
+
"ThreeJS"
|
20
|
+
],
|
21
|
+
"files": [
|
22
|
+
"dist/hermes.es.js",
|
23
|
+
"dist/hermes.cjs.js",
|
24
|
+
"dist/style.css",
|
25
|
+
"types/**/*.d.ts"
|
26
|
+
],
|
27
|
+
"exports": {
|
28
|
+
".": {
|
29
|
+
"import": "./dist/hermes.es.js",
|
30
|
+
"require": "./dist/hermes.cjs.js",
|
31
|
+
"types": "./types/index.d.ts"
|
32
|
+
},
|
33
|
+
"./dist/style.css": "./dist/style.css",
|
34
|
+
"./server/index.mjs": "./server/index.mjs"
|
35
|
+
},
|
36
|
+
"repository": {
|
37
|
+
"type": "git",
|
38
|
+
"url": "git+https://github.com/tomorrowevening/hermes.git"
|
39
|
+
},
|
40
|
+
"scripts": {
|
41
|
+
"server": "node server/index.mjs",
|
42
|
+
"clean": "rm -r dist && rm -r types",
|
43
|
+
"dev": "vite",
|
44
|
+
"declare": "tsc --declaration --emitDeclarationOnly --declarationDir types",
|
45
|
+
"buildLib": "yarn declare && vite build",
|
46
|
+
"buildExample": "vite build --config vite.config.example.ts",
|
47
|
+
"build": "yarn buildLib && yarn buildExample",
|
48
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
49
|
+
"preview": "vite preview"
|
50
|
+
},
|
51
|
+
"dependencies": {
|
52
|
+
},
|
53
|
+
"devDependencies": {
|
54
|
+
"@theatre/core": "0.7.0",
|
55
|
+
"@theatre/studio": "0.7.0",
|
56
|
+
"@types/react": "^18.2.15",
|
57
|
+
"@types/react-dom": "^18.2.7",
|
58
|
+
"@types/three": "^0.164.0",
|
59
|
+
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
60
|
+
"@typescript-eslint/parser": "^6.4.0",
|
61
|
+
"@vitejs/plugin-react": "^4.0.3",
|
62
|
+
"camera-controls": "^2.9.0",
|
63
|
+
"eslint": "^8.45.0",
|
64
|
+
"eslint-plugin-react": "^7.33.2",
|
65
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
66
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
67
|
+
"framer-motion": "^10.16.0",
|
68
|
+
"path": "^0.12.7",
|
69
|
+
"postprocessing": "^6.35.3",
|
70
|
+
"react": "^18.2.0",
|
71
|
+
"react-dom": "^18.2.0",
|
72
|
+
"sass": "^1.66.1",
|
73
|
+
"stats-gl": "2.0.1",
|
74
|
+
"three": "^0.164.1",
|
75
|
+
"typescript": "^5.0.2",
|
76
|
+
"vite": "^4.4.5",
|
77
|
+
"vite-plugin-glsl": "^1.2.1",
|
78
|
+
"ws": "^8.16.0"
|
79
|
+
}
|
80
|
+
}
|
@@ -1,40 +1,38 @@
|
|
1
|
-
import { Camera, 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
|
-
addScene(value: Scene): void;
|
22
|
-
refreshScene(value: string): void;
|
23
|
-
removeScene(value: Scene): void;
|
24
|
-
removeAllScenes(): void;
|
25
|
-
getScene(uuid: string): Scene | null;
|
26
|
-
setScene(value: Scene): void;
|
27
|
-
addCamera(camera: Camera): void;
|
28
|
-
removeCamera(camera: Camera): void;
|
29
|
-
handleApp(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
30
|
-
handleEditor(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
get
|
37
|
-
get
|
38
|
-
|
39
|
-
get canvas(): HTMLCanvasElement | null;
|
40
|
-
}
|
1
|
+
import { Camera, 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
|
+
addScene(value: Scene): void;
|
22
|
+
refreshScene(value: string): void;
|
23
|
+
removeScene(value: Scene): void;
|
24
|
+
removeAllScenes(): void;
|
25
|
+
getScene(uuid: string): Scene | null;
|
26
|
+
setScene(value: Scene): void;
|
27
|
+
addCamera(camera: Camera): void;
|
28
|
+
removeCamera(camera: Camera): void;
|
29
|
+
handleApp(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
30
|
+
handleEditor(app: Application, remote: BaseRemote, msg: BroadcastData): void;
|
31
|
+
addRT(name: string, params?: RenderTargetOptions): void;
|
32
|
+
resize(width: number, height: number): void;
|
33
|
+
set dpr(value: number);
|
34
|
+
get dpr(): number;
|
35
|
+
get width(): number;
|
36
|
+
get height(): number;
|
37
|
+
get canvas(): HTMLCanvasElement | null;
|
38
|
+
}
|
package/types/editor/global.d.ts
CHANGED
@@ -1,20 +1,25 @@
|
|
1
|
-
import { EventDispatcher } from 'three';
|
2
|
-
export declare
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
+
}
|
20
|
+
export type ToolEvent = {
|
21
|
+
[key in ToolEvents]: {
|
22
|
+
value?: unknown;
|
23
|
+
};
|
24
|
+
};
|
25
|
+
export declare const debugDispatcher: EventDispatcher<ToolEvent>;
|