@tomorrowevening/hermes 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ThreeEditor-CB5dBR7Q.js → ThreeEditor-B4bS88iZ.js} +11 -11
- package/dist/core/remote/RemoteThree.js +68 -59
- package/dist/editor/ThreeEditor.js +13 -10
- package/dist/editor/sidePanel/utils.js +94 -87
- package/dist/hermes.cjs.js +8 -8
- package/dist/{index-DepTXu6T.js → index-XMQFdKEt.js} +616 -616
- package/dist/index.html +1 -1
- package/dist/index.js +129 -120
- package/package.json +1 -1
- package/types/core/remote/RemoteThree.d.ts +10 -1
- package/types/editor/sidePanel/utils.d.ts +7 -0
- package/types/index.d.ts +1 -0
package/dist/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
|
|
9
9
|
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
|
|
10
10
|
<link rel="manifest" href="/images/site.webmanifest">
|
|
11
|
-
<script type="module" crossorigin src="/index-
|
|
11
|
+
<script type="module" crossorigin src="/index-XMQFdKEt.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="/index-C92ji5gy.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -1,125 +1,134 @@
|
|
|
1
1
|
import { defaultTheatreCallback as t, noop as a } from "./core/types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
2
|
+
import { EDITOR_UTILS as p, convertImageToBase64 as l, determineIcon as f, getSubItem as m, setItemProps as s, stripObject as d, stripScene as i, textureFromSrc as n } from "./editor/sidePanel/utils.js";
|
|
3
|
+
import { capitalize as u, colorToHex as c, copyToClipboard as M, isColor as T, randomID as b } from "./editor/utils.js";
|
|
4
|
+
import { detectMaxFrameRate as h, detectSettings as I } from "./utils/detectSettings.js";
|
|
5
|
+
import { ImageSequenceCapturer as C } from "./utils/ImageSequenceCapturer.js";
|
|
6
|
+
import { clamp as S, cubicBezier as y, damp as E, distance as B, getAngle as D, map as G, mix as P, normalize as H, rgbaToHex as R, roundTo as U } from "./utils/math.js";
|
|
7
|
+
import { animateObjectMaterial as A, animateObjectTransform as N, applyObjectMaterial as k, customizeTheatreElements as w, getObjectMaterialObject as z, getObjectMaterialProps as L, useStudio as V } from "./utils/theatre.js";
|
|
8
|
+
import { ExportTexture as q, anchorGeometry as W, anchorGeometryTL as _, createMask as J, dispose as K, disposeMaterial as Q, disposeTexture as X, hierarchyUUID as Y, orthoCamera as Z, parseModelLite as $, renderToTexture as ee, resetThreeObjects as re, setMaterialBlendAdd as te, setMaterialBlendMultiply as ae, setMaterialBlendNormal as oe, setMaterialBlendScreen as pe, supportsOffscreenCanvas as le, totalThreeObjects as fe, triangle as me, updateCameraOrtho as se, updateCameraOrtho16x9 as de, useMask as ie } from "./utils/three.js";
|
|
9
|
+
import { clearComposerGroups as xe, generateCubemap as ue, inspectComposer as ce, inspectComposerPass as Me } from "./utils/post.js";
|
|
10
|
+
import { ElementProxy as be, WebworkerEventHandlers as ge } from "./webworkers/EventHandling.js";
|
|
11
|
+
import { ElementProxyReceiver as Ie, ProxyManager as Oe } from "./webworkers/ProxyManager.js";
|
|
12
|
+
import { default as je } from "./core/Application.js";
|
|
13
|
+
import { default as ye } from "./core/remote/BaseRemote.js";
|
|
14
|
+
import { default as Be } from "./core/remote/RemoteTheatre.js";
|
|
15
|
+
import { default as Ge } from "./core/remote/RemoteThree.js";
|
|
16
|
+
import { default as He } from "./editor/components/NavButton.js";
|
|
17
|
+
import { default as Ue } from "./editor/components/DraggableItem.js";
|
|
18
|
+
import { default as Ae } from "./editor/components/Draggable.js";
|
|
19
|
+
import { default as ke } from "./editor/components/DropdownItem.js";
|
|
20
|
+
import { default as ze } from "./editor/components/Dropdown.js";
|
|
21
|
+
import { default as Ve } from "./editor/sidePanel/SidePanel.js";
|
|
22
|
+
import { default as qe } from "./editor/sidePanel/Accordion.js";
|
|
23
|
+
import { default as _e } from "./editor/sidePanel/ChildObject.js";
|
|
24
|
+
import { default as Ke } from "./editor/sidePanel/ContainerObject.js";
|
|
25
|
+
import { default as Xe } from "./editor/sidePanel/inspector/Inspector.js";
|
|
26
|
+
import { default as Ze } from "./editor/multiView/MultiView.js";
|
|
27
|
+
import { default as er } from "./editor/Editor.js";
|
|
28
|
+
import { default as tr } from "./editor/ThreeEditor.js";
|
|
29
|
+
import { default as or } from "./editor/HermesApp.js";
|
|
30
|
+
import { default as lr } from "./editor/tools/Transform.js";
|
|
31
|
+
import { default as mr } from "./editor/tools/splineEditor/Spline.js";
|
|
32
|
+
import { default as dr } from "./editor/tools/splineEditor/index.js";
|
|
33
|
+
import { default as nr } from "./editor/multiView/InfiniteGridMaterial.js";
|
|
34
|
+
import { default as ur } from "./editor/multiView/InfiniteGridNodeMaterial.js";
|
|
35
|
+
import { default as Mr } from "./editor/multiView/InfiniteGridHelper.js";
|
|
36
|
+
import { default as br } from "./editor/multiView/InfiniteGridHelperGPU.js";
|
|
37
|
+
import { default as hr } from "./editor/multiView/DepthNodeMaterial.js";
|
|
38
|
+
import { default as Or } from "./editor/multiView/UVMaterial.js";
|
|
39
|
+
import { default as jr } from "./editor/multiView/UVNodeMaterial.js";
|
|
39
40
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
41
|
+
qe as Accordion,
|
|
42
|
+
je as Application,
|
|
43
|
+
ye as BaseRemote,
|
|
44
|
+
_e as ChildObject,
|
|
45
|
+
Ke as ContainerObject,
|
|
46
|
+
hr as DepthNodeMaterial,
|
|
47
|
+
Ae as Draggable,
|
|
48
|
+
Ue as DraggableItem,
|
|
49
|
+
ze as Dropdown,
|
|
50
|
+
ke as DropdownItem,
|
|
51
|
+
p as EDITOR_UTILS,
|
|
52
|
+
er as Editor,
|
|
53
|
+
be as ElementProxy,
|
|
54
|
+
Ie as ElementProxyReceiver,
|
|
55
|
+
q as ExportTexture,
|
|
56
|
+
or as HermesApp,
|
|
57
|
+
C as ImageSequenceCapturer,
|
|
58
|
+
Mr as InfiniteGridHelper,
|
|
59
|
+
br as InfiniteGridHelperGPU,
|
|
60
|
+
nr as InfiniteGridMaterial,
|
|
61
|
+
ur as InfiniteGridNodeMaterial,
|
|
62
|
+
Xe as Inspector,
|
|
63
|
+
Ze as MultiView,
|
|
64
|
+
He as NavButton,
|
|
65
|
+
Oe as ProxyManager,
|
|
66
|
+
Be as RemoteTheatre,
|
|
67
|
+
Ge as RemoteThree,
|
|
68
|
+
Ve as SidePanel,
|
|
69
|
+
mr as Spline,
|
|
70
|
+
dr as SplineEditor,
|
|
71
|
+
tr as ThreeEditor,
|
|
72
|
+
lr as Transform,
|
|
73
|
+
Or as UVMaterial,
|
|
74
|
+
jr as UVNodeMaterial,
|
|
75
|
+
ge as WebworkerEventHandlers,
|
|
76
|
+
W as anchorGeometry,
|
|
77
|
+
_ as anchorGeometryTL,
|
|
78
|
+
A as animateObjectMaterial,
|
|
79
|
+
N as animateObjectTransform,
|
|
80
|
+
k as applyObjectMaterial,
|
|
81
|
+
u as capitalize,
|
|
82
|
+
S as clamp,
|
|
83
|
+
xe as clearComposerGroups,
|
|
84
|
+
c as colorToHex,
|
|
85
|
+
l as convertImageToBase64,
|
|
86
|
+
M as copyToClipboard,
|
|
87
|
+
J as createMask,
|
|
88
|
+
y as cubicBezier,
|
|
89
|
+
w as customizeTheatreElements,
|
|
90
|
+
E as damp,
|
|
88
91
|
t as defaultTheatreCallback,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
L as
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
92
|
+
h as detectMaxFrameRate,
|
|
93
|
+
I as detectSettings,
|
|
94
|
+
f as determineIcon,
|
|
95
|
+
K as dispose,
|
|
96
|
+
Q as disposeMaterial,
|
|
97
|
+
X as disposeTexture,
|
|
98
|
+
B as distance,
|
|
99
|
+
ue as generateCubemap,
|
|
100
|
+
D as getAngle,
|
|
101
|
+
z as getObjectMaterialObject,
|
|
102
|
+
L as getObjectMaterialProps,
|
|
103
|
+
m as getSubItem,
|
|
104
|
+
Y as hierarchyUUID,
|
|
105
|
+
ce as inspectComposer,
|
|
106
|
+
Me as inspectComposerPass,
|
|
107
|
+
T as isColor,
|
|
108
|
+
G as map,
|
|
109
|
+
P as mix,
|
|
105
110
|
a as noop,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
111
|
+
H as normalize,
|
|
112
|
+
Z as orthoCamera,
|
|
113
|
+
$ as parseModelLite,
|
|
114
|
+
b as randomID,
|
|
115
|
+
ee as renderToTexture,
|
|
116
|
+
re as resetThreeObjects,
|
|
117
|
+
R as rgbaToHex,
|
|
118
|
+
U as roundTo,
|
|
119
|
+
s as setItemProps,
|
|
120
|
+
te as setMaterialBlendAdd,
|
|
121
|
+
ae as setMaterialBlendMultiply,
|
|
122
|
+
oe as setMaterialBlendNormal,
|
|
123
|
+
pe as setMaterialBlendScreen,
|
|
124
|
+
d as stripObject,
|
|
125
|
+
i as stripScene,
|
|
126
|
+
le as supportsOffscreenCanvas,
|
|
127
|
+
n as textureFromSrc,
|
|
128
|
+
fe as totalThreeObjects,
|
|
129
|
+
me as triangle,
|
|
130
|
+
se as updateCameraOrtho,
|
|
131
|
+
de as updateCameraOrtho16x9,
|
|
132
|
+
ie as useMask,
|
|
133
|
+
V as useStudio
|
|
125
134
|
};
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": ["**/*.css"],
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.42",
|
|
12
12
|
"homepage": "https://github.com/tomorrowevening/hermes#readme",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/tomorrowevening/hermes/issues"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Camera, Curve, EventDispatcher, EventListener, Object3D, RenderTarget, RenderTargetOptions, Scene } from 'three/webgpu';
|
|
1
|
+
import { Camera, Curve, EventDispatcher, EventListener, Object3D, RenderTarget, RenderTargetOptions, Scene, Texture } from 'three/webgpu';
|
|
2
2
|
import BaseRemote from './BaseRemote';
|
|
3
3
|
import { BroadcastData, GroupData } from '../types';
|
|
4
4
|
export declare enum ToolEvents {
|
|
@@ -24,6 +24,13 @@ export type ToolEvent = {
|
|
|
24
24
|
value?: unknown;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
+
export interface EditorUtils {
|
|
28
|
+
stripObject: (obj: Object3D) => unknown;
|
|
29
|
+
stripScene: (obj: Object3D) => unknown;
|
|
30
|
+
getSubItem: (child: unknown, key: string) => unknown;
|
|
31
|
+
setItemProps: (child: unknown, key: string, value: unknown) => void;
|
|
32
|
+
textureFromSrc: (src: string) => Promise<Texture>;
|
|
33
|
+
}
|
|
27
34
|
export default class RemoteThree extends BaseRemote implements EventDispatcher<ToolEvent> {
|
|
28
35
|
name: string;
|
|
29
36
|
canvas: HTMLCanvasElement | null;
|
|
@@ -35,7 +42,9 @@ export default class RemoteThree extends BaseRemote implements EventDispatcher<T
|
|
|
35
42
|
private renderTargetsResize;
|
|
36
43
|
private groups;
|
|
37
44
|
private _listeners;
|
|
45
|
+
private editorUtils?;
|
|
38
46
|
constructor(name: string, debug?: boolean, editor?: boolean);
|
|
47
|
+
setEditorUtils(utils: EditorUtils | undefined): void;
|
|
39
48
|
dispose(): void;
|
|
40
49
|
addEventListener<T extends ToolEvents>(type: T, listener: EventListener<ToolEvent[T], T, this>): void;
|
|
41
50
|
hasEventListener<T extends ToolEvents>(type: T, listener: EventListener<ToolEvent[T], T, this>): boolean;
|
|
@@ -7,3 +7,10 @@ export declare function stripObject(obj: Object3D): RemoteObject;
|
|
|
7
7
|
export declare function getSubItem(child: any, key: string): any;
|
|
8
8
|
export declare function setItemProps(child: any, key: string, value: any): void;
|
|
9
9
|
export declare function textureFromSrc(imgSource: string): Promise<Texture>;
|
|
10
|
+
export declare const EDITOR_UTILS: {
|
|
11
|
+
stripObject: typeof stripObject;
|
|
12
|
+
stripScene: typeof stripScene;
|
|
13
|
+
getSubItem: typeof getSubItem;
|
|
14
|
+
setItemProps: typeof setItemProps;
|
|
15
|
+
textureFromSrc: typeof textureFromSrc;
|
|
16
|
+
};
|