@tomorrowevening/hermes 0.1.42 → 0.1.44

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.
Files changed (102) hide show
  1. package/dist/core/Application.cjs +1 -0
  2. package/dist/core/Application.js +0 -1
  3. package/dist/core/remote/BaseRemote.cjs +1 -0
  4. package/dist/core/remote/RemoteTheatre.cjs +1 -0
  5. package/dist/core/remote/RemoteTheatre.js +59 -29
  6. package/dist/core/remote/RemoteThree.cjs +1 -0
  7. package/dist/core/remote/RemoteThree.js +4 -3
  8. package/dist/core/types.cjs +1 -0
  9. package/dist/editor/Editor.cjs +1 -0
  10. package/dist/editor/HermesApp.cjs +1 -0
  11. package/dist/editor/ThreeEditor.cjs +1 -0
  12. package/dist/editor/components/Draggable.cjs +1 -0
  13. package/dist/editor/components/DraggableItem.cjs +1 -0
  14. package/dist/editor/components/Dropdown.cjs +1 -0
  15. package/dist/editor/components/DropdownItem.cjs +1 -0
  16. package/dist/editor/components/NavButton.cjs +1 -0
  17. package/dist/editor/components/content.cjs +1 -0
  18. package/dist/editor/components/icons/CloseIcon.cjs +1 -0
  19. package/dist/editor/components/icons/DragIcon.cjs +3 -0
  20. package/dist/editor/index.cjs +1 -0
  21. package/dist/editor/index.js +65 -0
  22. package/dist/editor/multiView/CameraWindow.cjs +1 -0
  23. package/dist/editor/multiView/DepthNodeMaterial.cjs +1 -0
  24. package/dist/editor/multiView/InfiniteGridHelper.cjs +1 -0
  25. package/dist/editor/multiView/InfiniteGridHelperGPU.cjs +1 -0
  26. package/dist/editor/multiView/InfiniteGridMaterial.cjs +78 -0
  27. package/dist/editor/multiView/InfiniteGridNodeMaterial.cjs +1 -0
  28. package/dist/editor/multiView/MultiView.cjs +1 -0
  29. package/dist/editor/multiView/Toggle.cjs +1 -0
  30. package/dist/editor/multiView/UVMaterial.cjs +41 -0
  31. package/dist/editor/multiView/UVNodeMaterial.cjs +1 -0
  32. package/dist/editor/sidePanel/Accordion.cjs +1 -0
  33. package/dist/editor/sidePanel/ChildObject.cjs +1 -0
  34. package/dist/editor/sidePanel/ContainerObject.cjs +1 -0
  35. package/dist/editor/sidePanel/DebugData.cjs +1 -0
  36. package/dist/editor/sidePanel/SidePanel.cjs +1 -0
  37. package/dist/editor/sidePanel/inspector/InspectGrid3.cjs +1 -0
  38. package/dist/editor/sidePanel/inspector/InspectGrid4.cjs +1 -0
  39. package/dist/editor/sidePanel/inspector/InspectImage.cjs +1 -0
  40. package/dist/editor/sidePanel/inspector/InspectNumber.cjs +1 -0
  41. package/dist/editor/sidePanel/inspector/InspectVector2.cjs +1 -0
  42. package/dist/editor/sidePanel/inspector/Inspector.cjs +1 -0
  43. package/dist/editor/sidePanel/inspector/InspectorField.cjs +2 -0
  44. package/dist/editor/sidePanel/inspector/InspectorGroup.cjs +1 -0
  45. package/dist/editor/sidePanel/inspector/utils/DragNumber.cjs +1 -0
  46. package/dist/editor/sidePanel/inspector/utils/InspectAnimation.cjs +1 -0
  47. package/dist/editor/sidePanel/inspector/utils/InspectCamera.cjs +1 -0
  48. package/dist/editor/sidePanel/inspector/utils/InspectLight.cjs +1 -0
  49. package/dist/editor/sidePanel/inspector/utils/InspectMaterial.cjs +1 -0
  50. package/dist/editor/sidePanel/inspector/utils/InspectTransform.cjs +1 -0
  51. package/dist/editor/sidePanel/utils.cjs +1 -0
  52. package/dist/editor/sidePanel/utils.js +1 -1
  53. package/dist/editor/tools/Transform.cjs +1 -0
  54. package/dist/editor/tools/splineEditor/Spline.cjs +1 -0
  55. package/dist/editor/tools/splineEditor/index.cjs +1 -0
  56. package/dist/editor/utils.cjs +1 -0
  57. package/dist/index.cjs +1 -0
  58. package/dist/index.js +61 -129
  59. package/dist/utils/ImageSequenceCapturer.cjs +13 -0
  60. package/dist/utils/detectSettings.cjs +1 -0
  61. package/dist/utils/detectSettings.js +11 -29
  62. package/dist/utils/math.cjs +1 -0
  63. package/dist/utils/theatre.cjs +1 -0
  64. package/dist/utils/theatre.js +60 -82
  65. package/dist/utils/three.cjs +1 -0
  66. package/dist/utils/threeDispose.cjs +1 -0
  67. package/dist/utils/threeDispose.js +40 -0
  68. package/dist/utils/threeEditorDebug.cjs +1 -0
  69. package/dist/utils/threeEditorDebug.js +69 -0
  70. package/dist/webworkers/EventHandling.cjs +1 -0
  71. package/dist/webworkers/ProxyManager.cjs +1 -0
  72. package/package.json +23 -7
  73. package/types/core/types.d.ts +1 -1
  74. package/types/editor/index.d.ts +26 -0
  75. package/types/index.d.ts +0 -26
  76. package/types/utils/detectSettings.d.ts +0 -2
  77. package/types/utils/theatre.d.ts +0 -1
  78. package/types/utils/threeDispose.d.ts +4 -0
  79. package/types/utils/threeEditorDebug.d.ts +17 -0
  80. package/dist/ThreeEditor-B4bS88iZ.js +0 -111
  81. package/dist/ThreeEditor-lbW0auGy.css +0 -1
  82. package/dist/hermes.cjs.js +0 -133
  83. package/dist/images/android-chrome-192x192.png +0 -0
  84. package/dist/images/android-chrome-512x512.png +0 -0
  85. package/dist/images/apple-touch-icon.png +0 -0
  86. package/dist/images/favicon-16x16.png +0 -0
  87. package/dist/images/favicon-32x32.png +0 -0
  88. package/dist/images/favicon.ico +0 -0
  89. package/dist/images/milkyWay/dark-s_nx.jpg +0 -0
  90. package/dist/images/milkyWay/dark-s_ny.jpg +0 -0
  91. package/dist/images/milkyWay/dark-s_nz.jpg +0 -0
  92. package/dist/images/milkyWay/dark-s_px.jpg +0 -0
  93. package/dist/images/milkyWay/dark-s_py.jpg +0 -0
  94. package/dist/images/milkyWay/dark-s_pz.jpg +0 -0
  95. package/dist/images/site.webmanifest +0 -1
  96. package/dist/images/uv_grid_opengl.jpg +0 -0
  97. package/dist/index-C92ji5gy.css +0 -1
  98. package/dist/index-XMQFdKEt.js +0 -10226
  99. package/dist/index.html +0 -17
  100. package/dist/json/animation.json +0 -235
  101. package/dist/models/Flair.fbx +0 -0
  102. package/dist/utils/post.js +0 -206
package/dist/index.html DELETED
@@ -1,17 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Application</title>
7
- <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
8
- <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
9
- <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
10
- <link rel="manifest" href="/images/site.webmanifest">
11
- <script type="module" crossorigin src="/index-XMQFdKEt.js"></script>
12
- <link rel="stylesheet" crossorigin href="/index-C92ji5gy.css">
13
- </head>
14
- <body>
15
- <div id="root"></div>
16
- </body>
17
- </html>
@@ -1,235 +0,0 @@
1
- {
2
- "sheetsById": {
3
- "App": {
4
- "staticOverrides": {
5
- "byObject": {}
6
- },
7
- "sequence": {
8
- "subUnitsPerUnit": 30,
9
- "length": 4,
10
- "type": "PositionalSequence",
11
- "tracksByObject": {
12
- "Box": {
13
- "trackData": {
14
- "k7DGAvD5a2": {
15
- "type": "BasicKeyframedTrack",
16
- "__debugName": "Box:[\"x\"]",
17
- "keyframes": [
18
- {
19
- "id": "MT52PtiiHH",
20
- "position": 0,
21
- "connectedRight": true,
22
- "handles": [
23
- 0.5,
24
- 1,
25
- 0.5,
26
- 0
27
- ],
28
- "type": "bezier",
29
- "value": 100
30
- },
31
- {
32
- "id": "_DETcJ0oJz",
33
- "position": 1,
34
- "connectedRight": true,
35
- "handles": [
36
- 0.5,
37
- 1,
38
- 0.5,
39
- 0
40
- ],
41
- "type": "hold",
42
- "value": 200
43
- },
44
- {
45
- "id": "f5sYIarQWM",
46
- "position": 2,
47
- "connectedRight": true,
48
- "handles": [
49
- 0.5,
50
- 1,
51
- 0.5,
52
- 0
53
- ],
54
- "type": "bezier",
55
- "value": 200
56
- },
57
- {
58
- "id": "ukHQLzeh5C",
59
- "position": 3,
60
- "connectedRight": true,
61
- "handles": [
62
- 0.5,
63
- 1,
64
- 0.5,
65
- 0
66
- ],
67
- "type": "bezier",
68
- "value": 100
69
- }
70
- ]
71
- },
72
- "tH-CrBGLJ9": {
73
- "type": "BasicKeyframedTrack",
74
- "__debugName": "Box:[\"y\"]",
75
- "keyframes": [
76
- {
77
- "id": "GRhCK_c2py",
78
- "position": 0,
79
- "connectedRight": true,
80
- "handles": [
81
- 0.5,
82
- 1,
83
- 0.5,
84
- 0
85
- ],
86
- "type": "hold",
87
- "value": 100
88
- },
89
- {
90
- "id": "1CqRbreqrP",
91
- "position": 1,
92
- "connectedRight": true,
93
- "handles": [
94
- 0.5,
95
- 1,
96
- 0.5,
97
- 0
98
- ],
99
- "type": "bezier",
100
- "value": 100
101
- },
102
- {
103
- "id": "Vec464HrYw",
104
- "position": 2,
105
- "connectedRight": true,
106
- "handles": [
107
- 0.5,
108
- 1,
109
- 0.5,
110
- 0
111
- ],
112
- "type": "hold",
113
- "value": 200
114
- },
115
- {
116
- "id": "JIwCXSZpS_",
117
- "position": 3,
118
- "connectedRight": true,
119
- "handles": [
120
- 0.5,
121
- 1,
122
- 0.5,
123
- 0
124
- ],
125
- "type": "bezier",
126
- "value": 200
127
- },
128
- {
129
- "id": "PYOQN46Eug",
130
- "position": 4,
131
- "connectedRight": true,
132
- "handles": [
133
- 0.5,
134
- 1,
135
- 0.5,
136
- 0
137
- ],
138
- "type": "bezier",
139
- "value": 100
140
- }
141
- ]
142
- }
143
- },
144
- "trackIdByPropPath": {
145
- "[\"x\"]": "k7DGAvD5a2",
146
- "[\"y\"]": "tH-CrBGLJ9"
147
- }
148
- }
149
- }
150
- }
151
- },
152
- "Scene1": {
153
- "staticOverrides": {
154
- "byObject": {}
155
- },
156
- "sequence": {
157
- "subUnitsPerUnit": 30,
158
- "length": 10,
159
- "type": "PositionalSequence",
160
- "tracksByObject": {
161
- }
162
- }
163
- },
164
- "Scene2": {
165
- "staticOverrides": {
166
- "byObject": {}
167
- },
168
- "sequence": {
169
- "subUnitsPerUnit": 30,
170
- "length": 2,
171
- "type": "PositionalSequence",
172
- "tracksByObject": {
173
- "Dancer": {
174
- "trackData": {
175
- "RJBuhDhdE7": {
176
- "type": "BasicKeyframedTrack",
177
- "__debugName": "Dancer:[\"position\",\"y\"]",
178
- "keyframes": [
179
- {
180
- "id": "YXHiDzn7We",
181
- "position": 0,
182
- "connectedRight": true,
183
- "handles": [
184
- 0.5,
185
- 1,
186
- 0.5,
187
- 0
188
- ],
189
- "type": "bezier",
190
- "value": 0
191
- },
192
- {
193
- "id": "B6J_E-UbfN",
194
- "position": 1,
195
- "connectedRight": true,
196
- "handles": [
197
- 0.5,
198
- 1,
199
- 0.5,
200
- 0
201
- ],
202
- "type": "bezier",
203
- "value": 50
204
- },
205
- {
206
- "id": "BJouSMqE99",
207
- "position": 2,
208
- "connectedRight": true,
209
- "handles": [
210
- 0.5,
211
- 1,
212
- 0.5,
213
- 0
214
- ],
215
- "type": "bezier",
216
- "value": 0
217
- }
218
- ]
219
- }
220
- },
221
- "trackIdByPropPath": {
222
- "[\"position\",\"y\"]": "RJBuhDhdE7"
223
- }
224
- }
225
- }
226
- }
227
- }
228
- },
229
- "definitionVersion": "0.4.0",
230
- "revisionHistory": [
231
- "6qvoi1xDufJ3mDcJ",
232
- "qZZT0D8q5aaicaVF",
233
- "0_X3SHD4kxF4l9IB"
234
- ]
235
- }
Binary file
@@ -1,206 +0,0 @@
1
- import { WebGLRenderTarget as x, RGBAFormat as m } from "three";
2
- import { ExportTexture as g } from "./three.js";
3
- let b = [];
4
- function E(r, n, a = !0) {
5
- g.renderer = n.renderer;
6
- const p = [];
7
- p.push({
8
- type: "boolean",
9
- prop: "Enabled",
10
- value: r.enabled
11
- });
12
- let f = (u, e) => {
13
- console.log("Default Handle Pass:", u, e);
14
- };
15
- if (r.name === "EffectPass")
16
- r.effects.forEach((u) => {
17
- u.uniforms.size > 0 && u.uniforms.forEach((e, o) => {
18
- if (o === "map") return;
19
- const t = `${u.name.replace("Effect", "")} ${o}`;
20
- if (e.value === null && a)
21
- p.push({
22
- prop: o,
23
- title: t,
24
- type: "image",
25
- value: {
26
- offset: [0, 0],
27
- repeat: [1, 1],
28
- src: ""
29
- }
30
- });
31
- else if (e.value.isTexture && a) {
32
- const s = e.value, i = g.renderToBlob(s);
33
- p.push({
34
- prop: o,
35
- title: t,
36
- type: "image",
37
- value: {
38
- offset: [s.offset.x, s.offset.y],
39
- repeat: [s.repeat.x, s.repeat.y],
40
- src: i
41
- }
42
- });
43
- } else typeof e.value == "number" ? p.push({
44
- prop: o,
45
- title: t,
46
- type: "number",
47
- value: e.value,
48
- step: 0.01
49
- }) : typeof e.value == "string" ? p.push({
50
- prop: o,
51
- title: t,
52
- type: "string",
53
- value: e.value
54
- }) : typeof e.value == "boolean" && p.push({
55
- prop: o,
56
- title: t,
57
- type: "boolean",
58
- value: e.value
59
- });
60
- });
61
- }), f = (u, e) => {
62
- r.effects.forEach((o) => {
63
- o.uniforms.size > 0 && o.uniforms.forEach((t, s) => {
64
- s === u && (t.value = e);
65
- });
66
- });
67
- };
68
- else if (r.name === "ShaderPass") {
69
- const u = r.fullscreenMaterial;
70
- for (const e in u.uniforms) {
71
- if (e === "inputBuffer" || e === "map") continue;
72
- const o = u.uniforms[e], t = `${u.name.replace("Material", "")} ${e}`;
73
- if (o.value === null && a)
74
- p.push({
75
- title: t,
76
- prop: e,
77
- type: "image",
78
- value: {
79
- offset: [0, 0],
80
- repeat: [1, 1],
81
- src: ""
82
- }
83
- });
84
- else if (o.value.isTexture && a) {
85
- const s = o.value, i = g.renderToBlob(s);
86
- p.push({
87
- title: t,
88
- prop: e,
89
- type: "image",
90
- value: {
91
- offset: [s.offset.x, s.offset.y],
92
- repeat: [s.repeat.x, s.repeat.y],
93
- src: i
94
- }
95
- });
96
- } else typeof o.value == "number" ? p.push({
97
- title: t,
98
- prop: e,
99
- type: "number",
100
- value: o.value,
101
- step: 0.01
102
- }) : typeof o.value == "string" ? p.push({
103
- title: t,
104
- prop: e,
105
- type: "string",
106
- value: o.value
107
- }) : typeof o.value == "boolean" && p.push({
108
- title: t,
109
- prop: e,
110
- type: "boolean",
111
- value: o.value
112
- });
113
- }
114
- f = (e, o) => {
115
- const t = u.uniforms[e];
116
- t.value = o;
117
- };
118
- } else
119
- return;
120
- const l = `${r.name}: ${r.scene.name}`;
121
- n.addGroup({
122
- title: l,
123
- items: p,
124
- onUpdate: (u, e) => {
125
- u === "Enabled" ? r.enabled = e : f(u, e);
126
- }
127
- }), b.push(l);
128
- }
129
- function M(r, n) {
130
- r.passes.forEach((a) => {
131
- E(a, n);
132
- });
133
- }
134
- function B(r) {
135
- b.forEach((n) => {
136
- r.removeGroup(n);
137
- }), b = [];
138
- }
139
- function C(r, n, a, p = 1024) {
140
- return new Promise((f) => {
141
- const l = n.aspect, u = n.fov, e = n.rotation.clone(), o = a.outputBuffer;
142
- n.aspect = 1, n.fov = 90, n.updateProjectionMatrix();
143
- const t = new x(p, p, {
144
- format: m,
145
- depthBuffer: !0,
146
- stencilBuffer: !1
147
- });
148
- a.outputBuffer = t, c(r, t, n, "nx", a, p).then(() => {
149
- c(r, t, n, "ny", a, p).then(() => {
150
- c(r, t, n, "nz", a, p).then(() => {
151
- c(r, t, n, "px", a, p).then(() => {
152
- c(r, t, n, "py", a, p).then(() => {
153
- c(r, t, n, "pz", a, p).then(() => {
154
- n.aspect = l, n.fov = u, n.rotation.copy(e), n.updateMatrixWorld(), n.updateProjectionMatrix(), a.outputBuffer = o, t.dispose(), f();
155
- });
156
- });
157
- });
158
- });
159
- });
160
- });
161
- });
162
- }
163
- function c(r, n, a, p, f, l) {
164
- return new Promise((u) => {
165
- const e = Math.PI / 2;
166
- switch (p) {
167
- case "nx":
168
- a.rotation.set(0, -e, 0);
169
- break;
170
- case "ny":
171
- a.rotation.set(-e, 0, Math.PI);
172
- break;
173
- case "nz":
174
- a.rotation.set(0, 0, 0);
175
- break;
176
- case "px":
177
- a.rotation.set(0, e, 0);
178
- break;
179
- case "py":
180
- a.rotation.set(e, 0, Math.PI);
181
- break;
182
- case "pz":
183
- a.rotation.set(0, Math.PI, 0);
184
- break;
185
- }
186
- a.updateMatrixWorld(), f.render();
187
- const o = new Uint8Array(l * l * 4);
188
- r.readRenderTargetPixels(n, 0, 0, l, l, o);
189
- const t = document.createElement("canvas");
190
- t.width = t.height = l;
191
- const s = t.getContext("2d"), i = s.createImageData(l, l);
192
- i.data.set(o), s.putImageData(i, 0, 0);
193
- const d = document.createElement("canvas");
194
- d.width = d.height = l;
195
- const h = d.getContext("2d");
196
- h.translate(0, l), h.scale(1, -1), h.drawImage(t, 0, 0);
197
- const y = d.toDataURL("image/png"), v = document.createElement("a");
198
- v.href = y, v.download = `${a.name}_${p}.png`, document.body.appendChild(v), v.click(), v.remove(), u();
199
- });
200
- }
201
- export {
202
- B as clearComposerGroups,
203
- C as generateCubemap,
204
- M as inspectComposer,
205
- E as inspectComposerPass
206
- };