@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
@@ -0,0 +1 @@
1
+ "use strict";var g=Object.create;var b=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var P=(n,i,e,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of M(i))!v.call(n,t)&&t!==e&&b(n,t,{get:()=>i[t],enumerable:!(s=O(i,t))||s.enumerable});return n};var k=(n,i,e)=>(e=n!=null?g(A(n)):{},P(i||!n||!n.__esModule?b(e,"default",{value:n,enumerable:!0}):e,n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@tomorrowevening/theatre-core"),y=require("react");let m;function w(){const[n,i]=y.useState(m);return y.useEffect(()=>{m||import("@tomorrowevening/theatre-studio").then(e=>{m=e.default,m.initialize(),m.ui.hide(),i(m)})},[]),n}function S(n,i,e,s){s.sheetObject(n,i,{transform:{position:{x:e.position.x,y:e.position.y,z:e.position.z},rotation:{x:e.rotation.x,y:e.rotation.y,z:e.rotation.z},scale:{x:e.scale.x,y:e.scale.y,z:e.scale.z},visible:e.visible}},t=>{const a=t.transform;e.position.copy(a.position),e.rotation.copy(a.rotation),e.scale.copy(a.scale),e.visible=a.visible})}const z=["allowOverride","alphaHash","alphaTest","alphaToCoverage","blendAlpha","blendColor","blendDst","blendDstAlpha","blendEquation","blendEquationAlpha","blendSrc","blendSrcAlpha","blending","clipIntersection","clipShadows","clipping","clippingPlanes","colorWrite","combine","defaultAttributeValues","defines","depthFunc","depthTest","depthWrite","dithering","extensions","fog","forceSinglePass","fragmentShader","glslVersion","id","index0AttributeName","index1AttributeName","index2AttributeName","index3AttributeName","index4AttributeName","isMaterial","lights","linewidth","name","needsUpdate","polygonOffset","polygonOffsetFactor","polygonOffsetUnits","precision","premultipliedAlpha","shadowSide","side","stencilFail","stencilFunc","stencilFuncMask","stencilRef","stencilWrite","stencilWriteMask","stencilZFail","stencilZPass","toneMapped","transparent","type","uniformsGroups","uniformsNeedUpdate","userData","uuid","version","vertexColors","vertexShader","visible","wireframe","wireframeLinewidth","wireframeLinecap","wireframeLinejoin"];function f(n){const i=typeof n;if(n===null||n.isTexture)return"texture";if(i==="boolean")return"boolean";if(i==="number")return"number";if(i==="string")return"string";if(i==="object"){if(n.isColor)return"color";if(n.isVector2)return"vector2";if(n.isVector3)return"vector3";if(n.isVector4)return"vector4";if(n.isMatrix2)return"matrix2";if(n.isMatrix3)return"matrix3";if(n.isMatrix4)return"matrix4";if(n.isEuler)return"euler";if(Array.isArray(n))return"array"}return"object"}function d(n){const i=[];for(const s in n){const t=z.find(o=>o===s),a=s.indexOf("_")===0||s.indexOf("is")===0;if(!(t||a))if(s==="uniforms"){const o=n.uniforms;for(const c in o){const p=o[c].value,u=f(p);u==="array"||u==="object"||i.push({name:`uniforms.${c}.value`,type:u,value:p})}}else{const o=f(n[s]);i.push({name:s,type:o,value:n[s]})}}return i.filter(s=>s.type!=="array"&&s.type!=="object"&&s.type!=="texture")}function x(n){const i={},e={nudgeMultiplier:.01};return n.forEach(s=>{let t=s.value;switch(s.type){case"color":t=r.types.rgba({r:t.r,g:t.g,b:t.b,a:1});break;case"number":t=r.types.number(t,e);break;case"euler":case"vector3":t={x:r.types.number(t.x,e),y:r.types.number(t.y,e),z:r.types.number(t.z,e)};break;case"vector2":t={x:r.types.number(t.x,e),y:r.types.number(t.y,e)};break;case"vector4":t={x:r.types.number(t.x,e),y:r.types.number(t.y,e),z:r.types.number(t.z,e),w:r.types.number(t.w,e)};break;case"matrix2":t={0:r.types.number(t.elements[0],e),1:r.types.number(t.elements[1],e),2:r.types.number(t.elements[2],e),3:r.types.number(t.elements[3],e)};break;case"matrix3":t={0:r.types.number(t.elements[0],e),1:r.types.number(t.elements[1],e),2:r.types.number(t.elements[2],e),3:r.types.number(t.elements[3],e),4:r.types.number(t.elements[4],e),5:r.types.number(t.elements[5],e),6:r.types.number(t.elements[6],e),7:r.types.number(t.elements[7],e),8:r.types.number(t.elements[8],e)};break;case"matrix4":t={0:r.types.number(t.elements[0],e),1:r.types.number(t.elements[1],e),2:r.types.number(t.elements[2],e),3:r.types.number(t.elements[3],e),4:r.types.number(t.elements[4],e),5:r.types.number(t.elements[5],e),6:r.types.number(t.elements[6],e),7:r.types.number(t.elements[7],e),8:r.types.number(t.elements[8],e),9:r.types.number(t.elements[9],e),10:r.types.number(t.elements[10],e),11:r.types.number(t.elements[11],e),12:r.types.number(t.elements[12],e),13:r.types.number(t.elements[13],e),14:r.types.number(t.elements[14],e),15:r.types.number(t.elements[15],e)};break}if(s.name.includes(".")){const a=s.name.split(".");let l=i;for(let o=0;o<a.length-1;o++){const c=a[o];l[c]||(l[c]={}),l=l[c]}l[a[a.length-1]]=t}else i[s.name]=t}),i}function h(n,i,e){i.forEach(s=>{if(n[s.name]!==void 0)switch(s.type){case"boolean":case"number":n[s.name]=e.material[s.name];break;case"color":case"euler":case"matrix2":case"matrix3":case"matrix4":case"vector2":case"vector3":case"vector4":n[s.name].copy(e.material[s.name]);break}})}function T(n,i,e,s){if(!e.isMaterial)return;const t=d(e),a=x(t);s.sheetObject(n,i,{material:a},l=>{h(e,t,l)})}exports.animateObjectMaterial=T;exports.animateObjectTransform=S;exports.applyObjectMaterial=h;exports.getObjectMaterialObject=x;exports.getObjectMaterialProps=d;exports.useStudio=w;
@@ -1,37 +1,16 @@
1
1
  import { types as n } from "@tomorrowevening/theatre-core";
2
2
  import { useState as d, useEffect as p } from "react";
3
- let m;
3
+ let c;
4
4
  function v() {
5
- const [i, s] = d(m);
5
+ const [r, s] = d(c);
6
6
  return p(() => {
7
- m || import("@tomorrowevening/theatre-studio").then((e) => {
8
- m = e.default, m.initialize(), m.ui.hide(), s(m);
7
+ c || import("@tomorrowevening/theatre-studio").then((e) => {
8
+ c = e.default, c.initialize(), c.ui.hide(), s(c);
9
9
  });
10
- }, []), i;
10
+ }, []), r;
11
11
  }
12
- async function E() {
13
- for (; !document.getElementById("theatrejs-studio-root"); )
14
- await new Promise((r) => setTimeout(r, 100));
15
- const i = document.getElementById("theatrejs-studio-root");
16
- if (i === null || i.shadowRoot === null) return;
17
- const s = i.shadowRoot.getElementById("pointer-root");
18
- if (s === null) return;
19
- const e = s.children[0];
20
- if (e !== null) {
21
- try {
22
- const t = e.children[1].children[1];
23
- t.parentElement?.removeChild(t);
24
- } catch {
25
- }
26
- try {
27
- const r = e.children[3];
28
- r.style.top = "0", r.style.right = "300px";
29
- } catch {
30
- }
31
- }
32
- }
33
- function O(i, s, e, r) {
34
- r.sheetObject(i, s, {
12
+ function M(r, s, e, i) {
13
+ i.sheetObject(r, s, {
35
14
  transform: {
36
15
  position: {
37
16
  x: e.position.x,
@@ -51,11 +30,11 @@ function O(i, s, e, r) {
51
30
  visible: e.visible
52
31
  }
53
32
  }, (t) => {
54
- const o = t.transform;
55
- e.position.copy(o.position), e.rotation.copy(o.rotation), e.scale.copy(o.scale), e.visible = o.visible;
33
+ const a = t.transform;
34
+ e.position.copy(a.position), e.rotation.copy(a.rotation), e.scale.copy(a.scale), e.visible = a.visible;
56
35
  });
57
36
  }
58
- const h = [
37
+ const x = [
59
38
  "allowOverride",
60
39
  "alphaHash",
61
40
  "alphaTest",
@@ -128,9 +107,9 @@ const h = [
128
107
  "wireframeLinecap",
129
108
  "wireframeLinejoin"
130
109
  ];
131
- function f(i) {
132
- const s = typeof i;
133
- if (i === null || i.isTexture)
110
+ function f(r) {
111
+ const s = typeof r;
112
+ if (r === null || r.isTexture)
134
113
  return "texture";
135
114
  if (s === "boolean")
136
115
  return "boolean";
@@ -139,60 +118,60 @@ function f(i) {
139
118
  if (s === "string")
140
119
  return "string";
141
120
  if (s === "object") {
142
- if (i.isColor)
121
+ if (r.isColor)
143
122
  return "color";
144
- if (i.isVector2)
123
+ if (r.isVector2)
145
124
  return "vector2";
146
- if (i.isVector3)
125
+ if (r.isVector3)
147
126
  return "vector3";
148
- if (i.isVector4)
127
+ if (r.isVector4)
149
128
  return "vector4";
150
- if (i.isMatrix2)
129
+ if (r.isMatrix2)
151
130
  return "matrix2";
152
- if (i.isMatrix3)
131
+ if (r.isMatrix3)
153
132
  return "matrix3";
154
- if (i.isMatrix4)
133
+ if (r.isMatrix4)
155
134
  return "matrix4";
156
- if (i.isEuler)
135
+ if (r.isEuler)
157
136
  return "euler";
158
- if (Array.isArray(i))
137
+ if (Array.isArray(r))
159
138
  return "array";
160
139
  }
161
140
  return "object";
162
141
  }
163
- function y(i) {
142
+ function y(r) {
164
143
  const s = [];
165
- for (const r in i) {
166
- const t = h.find((a) => a === r), o = r.indexOf("_") === 0 || r.indexOf("is") === 0;
167
- if (!(t || o))
168
- if (r === "uniforms") {
169
- const a = i.uniforms;
170
- for (const c in a) {
171
- const b = a[c].value, u = f(b);
144
+ for (const i in r) {
145
+ const t = x.find((o) => o === i), a = i.indexOf("_") === 0 || i.indexOf("is") === 0;
146
+ if (!(t || a))
147
+ if (i === "uniforms") {
148
+ const o = r.uniforms;
149
+ for (const m in o) {
150
+ const b = o[m].value, u = f(b);
172
151
  u === "array" || u === "object" || s.push({
173
- name: `uniforms.${c}.value`,
152
+ name: `uniforms.${m}.value`,
174
153
  type: u,
175
154
  value: b
176
155
  });
177
156
  }
178
157
  } else {
179
- const a = f(i[r]);
158
+ const o = f(r[i]);
180
159
  s.push({
181
- name: r,
182
- type: a,
183
- value: i[r]
160
+ name: i,
161
+ type: o,
162
+ value: r[i]
184
163
  });
185
164
  }
186
165
  }
187
166
  return s.filter(
188
- (r) => r.type !== "array" && r.type !== "object" && r.type !== "texture"
167
+ (i) => i.type !== "array" && i.type !== "object" && i.type !== "texture"
189
168
  );
190
169
  }
191
- function x(i) {
170
+ function h(r) {
192
171
  const s = {}, e = { nudgeMultiplier: 0.01 };
193
- return i.forEach((r) => {
194
- let t = r.value;
195
- switch (r.type) {
172
+ return r.forEach((i) => {
173
+ let t = i.value;
174
+ switch (i.type) {
196
175
  case "color":
197
176
  t = n.rgba({ r: t.r, g: t.g, b: t.b, a: 1 });
198
177
  break;
@@ -263,25 +242,25 @@ function x(i) {
263
242
  };
264
243
  break;
265
244
  }
266
- if (r.name.includes(".")) {
267
- const o = r.name.split(".");
245
+ if (i.name.includes(".")) {
246
+ const a = i.name.split(".");
268
247
  let l = s;
269
- for (let a = 0; a < o.length - 1; a++) {
270
- const c = o[a];
271
- l[c] || (l[c] = {}), l = l[c];
248
+ for (let o = 0; o < a.length - 1; o++) {
249
+ const m = a[o];
250
+ l[m] || (l[m] = {}), l = l[m];
272
251
  }
273
- l[o[o.length - 1]] = t;
252
+ l[a[a.length - 1]] = t;
274
253
  } else
275
- s[r.name] = t;
254
+ s[i.name] = t;
276
255
  }), s;
277
256
  }
278
- function g(i, s, e) {
279
- s.forEach((r) => {
280
- if (i[r.name] !== void 0)
281
- switch (r.type) {
257
+ function g(r, s, e) {
258
+ s.forEach((i) => {
259
+ if (r[i.name] !== void 0)
260
+ switch (i.type) {
282
261
  case "boolean":
283
262
  case "number":
284
- i[r.name] = e.material[r.name];
263
+ r[i.name] = e.material[i.name];
285
264
  break;
286
265
  case "color":
287
266
  case "euler":
@@ -291,26 +270,25 @@ function g(i, s, e) {
291
270
  case "vector2":
292
271
  case "vector3":
293
272
  case "vector4":
294
- i[r.name].copy(e.material[r.name]);
273
+ r[i.name].copy(e.material[i.name]);
295
274
  break;
296
275
  }
297
276
  });
298
277
  }
299
- function M(i, s, e, r) {
278
+ function k(r, s, e, i) {
300
279
  if (!e.isMaterial) return;
301
- const t = y(e), o = x(t);
302
- r.sheetObject(i, s, {
303
- material: o
280
+ const t = y(e), a = h(t);
281
+ i.sheetObject(r, s, {
282
+ material: a
304
283
  }, (l) => {
305
284
  g(e, t, l);
306
285
  });
307
286
  }
308
287
  export {
309
- M as animateObjectMaterial,
310
- O as animateObjectTransform,
288
+ k as animateObjectMaterial,
289
+ M as animateObjectTransform,
311
290
  g as applyObjectMaterial,
312
- E as customizeTheatreElements,
313
- x as getObjectMaterialObject,
291
+ h as getObjectMaterialObject,
314
292
  y as getObjectMaterialProps,
315
293
  v as useStudio
316
294
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("three"),c=new n.BufferGeometry;c.setAttribute("position",new n.Float32BufferAttribute([-.5,-.5,0,1.5,-.5,0,-.5,1.5,0],3));c.setAttribute("normal",new n.Float32BufferAttribute([0,0,1,0,0,1],3));c.setAttribute("uv",new n.Float32BufferAttribute([0,0,2,0,0,2],2));const A=new n.OrthographicCamera(-.5,.5,.5,-.5,0,100),l=e=>{e?.dispose()},u=e=>{if(e)if(Array.isArray(e))e.forEach(t=>u(t));else{for(const t in e){const i=e[t];i!==null&&i instanceof n.Texture&&l(i)}if(e.isShaderMaterial===!0){const t=e;for(const i in t.uniforms){const s=t.uniforms[i];s.value!==null&&s.value instanceof n.Texture&&l(s.value)}}e.dispose()}},d=e=>{if(e){for(;e.children.length>0;){const t=e.children[0];t.type==="Audio"?(t.pause(),t.parent&&t.parent.remove(t)):d(t)}if(e.parent&&e.parent.remove(e),e.isMesh){const t=e;t.geometry?.dispose(),u(t.material)}e.dispose!==void 0&&e.dispose()}};exports.totalThreeObjects=0;const g=()=>{exports.totalThreeObjects=0},h=e=>{if(!e)return;let t=e.name.replaceAll(" ","").replaceAll("/",".");if(t.length===0&&(t=`obj_${exports.totalThreeObjects}`,exports.totalThreeObjects++),e.parent!==null&&e.parent.uuid.length>0&&(t=`${e.parent.uuid}.${t}`),e.uuid=t,e.isMesh!==void 0){const i=e;if(Array.isArray(i.material))i.material.forEach((s,r)=>{s.uuid=`${t}.material.${r}`});else{const s=i.material;s.uuid=`${t}.material`}}e.children.forEach(i=>h(i))};class m{static renderer;static canvas;static context=null;static scene=null;static camera=null;static material=null;static inited=!1;static width=100;static height=100;static init(){this.inited||(this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.context=this.canvas.getContext("2d"),this.inited=!0)}static renderToBlob(t){this.init();const i=t.repeat.clone(),s=t.offset.clone();if(t.repeat.set(1,1),t.offset.set(0,0),this.context!==null){this.context.clearRect(0,0,this.width,this.height);const r=t.image;if(r!=null&&r.width>0){this.canvas.title=t.sourceFile;const a=this.canvas.width/r.width,o=this.renderToCanvas(t);this.context.drawImage(o,0,0,r.width*a,r.height*a)}}return t.repeat.copy(i),t.offset.copy(s),this.canvas.toDataURL("image/png")}static renderToCanvas(t){if(this.material===null){this.camera=new n.OrthographicCamera(-.5,.5,.5,-.5,0,100),this.scene=new n.Scene,this.material=new n.MeshBasicMaterial;const i=new n.BufferGeometry;i.setAttribute("position",new n.Float32BufferAttribute([-.5,-.5,0,1.5,-.5,0,-.5,1.5,0],3)),i.setAttribute("normal",new n.Float32BufferAttribute([0,0,1,0,0,1],3)),i.setAttribute("uv",new n.Float32BufferAttribute([0,0,2,0,0,2],2));const s=new n.Mesh(i,this.material);this.scene.add(s)}if(t.isRenderTargetTexture)this.material.map=t,this.renderer.render(this.scene,this.camera);else{const i=this.renderer.outputColorSpace,s=t.colorSpace;this.renderer.outputColorSpace=n.LinearSRGBColorSpace,t.colorSpace=n.LinearSRGBColorSpace,this.material.map=t,this.renderer.render(this.scene,this.camera),this.renderer.outputColorSpace=i,t.colorSpace=s}return this.renderer.domElement}}function O(e){return new Promise(t=>{const i=new n.ObjectLoader;i.parseAsync(e.scene).then(s=>{const r=new n.AnimationMixer(s);if(e.animations.length>0){const o=e.animations.map(S=>n.AnimationClip.parse(S));r.clipAction(o[0]).play(),r.getRoot().animations=e.animations,r.getRoot().mixer=r}const a=[];e.cameras&&e.cameras.length>0&&e.cameras.forEach(o=>{const p=i.parse(o);a.push(p)}),t({animations:e.animations,model:s,mixer:r,cameras:a})})})}const M=(e,t,i,s)=>{e.setRenderTarget(s),e.clear(),e.render(t,i)};function f(e,t,i,s){e.applyMatrix4(new n.Matrix4().makeTranslation(t,-i,-s))}function v(e){e.computeBoundingBox();const t=e.boundingBox,i=(t.max.x-t.min.x)/2,s=(t.max.y-t.min.y)/2;f(e,i,s,0)}function F(e,t,i){e.left=t/-2,e.right=t/2,e.top=i/2,e.bottom=i/-2,e.position.x=t/2,e.position.y=i/-2,e.updateProjectionMatrix()}function y(e,t,i){const s=1.7777777777777777,r=t/i;let a=t,o=i;r>s?a=i*s:o=t/s,e.left=a/-2,e.right=a/2,e.top=o/2,e.bottom=o/-2,e.updateProjectionMatrix()}function b(){let t="transferControlToOffscreen"in document.createElement("canvas");if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){const s=navigator.userAgent.match(/version\/(\d+)/i);t=(s?parseInt(s[1]):0)>=17}return t}function T(e,t,i=!0,s=!1){e.renderOrder=-t;const r=e.material;Array.isArray(r)?r.forEach(a=>{a.colorWrite=i,a.depthWrite=s,a.stencilWrite=!0,a.stencilRef=t,a.stencilFunc=n.AlwaysStencilFunc,a.stencilFail=n.ReplaceStencilOp,a.stencilZFail=n.ReplaceStencilOp,a.stencilZPass=n.ReplaceStencilOp}):(r.colorWrite=i,r.depthWrite=s,r.stencilWrite=!0,r.stencilRef=t,r.stencilFunc=n.AlwaysStencilFunc,r.stencilFail=n.ReplaceStencilOp,r.stencilZFail=n.ReplaceStencilOp,r.stencilZPass=n.ReplaceStencilOp)}function w(e,t,i=!1){const s=e.material;Array.isArray(s)?s.forEach(r=>{r.stencilWrite=!0,r.stencilRef=t,r.stencilFunc=i?n.NotEqualStencilFunc:n.EqualStencilFunc,r.stencilFail=n.KeepStencilOp,r.stencilZFail=n.KeepStencilOp,r.stencilZPass=n.KeepStencilOp}):(s.stencilWrite=!0,s.stencilRef=t,s.stencilFunc=i?n.NotEqualStencilFunc:n.EqualStencilFunc,s.stencilFail=n.KeepStencilOp,s.stencilZFail=n.KeepStencilOp,s.stencilZPass=n.KeepStencilOp)}function B(e){e.blending=n.NormalBlending,e.blendEquation=n.AddEquation,e.blendSrc=n.SrcAlphaFactor,e.blendDst=n.OneMinusSrcAlphaFactor,e.needsUpdate=!0}function C(e){e.blending=n.CustomBlending,e.blendEquation=n.AddEquation,e.blendSrc=n.SrcAlphaFactor,e.blendDst=n.OneFactor,e.needsUpdate=!0}function x(e){e.blending=n.CustomBlending,e.blendEquation=n.AddEquation,e.blendSrc=n.DstColorFactor,e.blendDst=n.OneMinusSrcAlphaFactor,e.needsUpdate=!0}function E(e){e.blending=n.CustomBlending,e.blendEquation=n.AddEquation,e.blendSrc=n.OneMinusDstColorFactor,e.blendDst=n.OneFactor,e.needsUpdate=!0}exports.ExportTexture=m;exports.anchorGeometry=f;exports.anchorGeometryTL=v;exports.createMask=T;exports.dispose=d;exports.disposeMaterial=u;exports.disposeTexture=l;exports.hierarchyUUID=h;exports.orthoCamera=A;exports.parseModelLite=O;exports.renderToTexture=M;exports.resetThreeObjects=g;exports.setMaterialBlendAdd=C;exports.setMaterialBlendMultiply=x;exports.setMaterialBlendNormal=B;exports.setMaterialBlendScreen=E;exports.supportsOffscreenCanvas=b;exports.triangle=c;exports.updateCameraOrtho=F;exports.updateCameraOrtho16x9=y;exports.useMask=w;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("three"),r=e=>{e?.dispose()},n=e=>{if(e){if(Array.isArray(e)){e.forEach(s=>n(s));return}for(const s in e){const i=e[s];i instanceof t.Texture&&r(i)}if(e.isShaderMaterial===!0){const s=e;for(const i in s.uniforms){const o=s.uniforms[i];o?.value instanceof t.Texture&&r(o.value)}}e.dispose()}},f=e=>{if(e){for(;e.children.length>0;){const s=e.children[0];s.type==="Audio"?(s.pause(),s.parent&&s.parent.remove(s)):f(s)}if(e.parent&&e.parent.remove(e),e.isMesh){const s=e;s.geometry?.dispose(),n(s.material)}typeof e.dispose=="function"&&e.dispose()}};exports.dispose=f;exports.disposeMaterial=n;exports.disposeTexture=r;
@@ -0,0 +1,40 @@
1
+ import { Texture as r } from "three";
2
+ const o = (s) => {
3
+ s?.dispose();
4
+ }, f = (s) => {
5
+ if (s) {
6
+ if (Array.isArray(s)) {
7
+ s.forEach((i) => f(i));
8
+ return;
9
+ }
10
+ for (const i in s) {
11
+ const e = s[i];
12
+ e instanceof r && o(e);
13
+ }
14
+ if (s.isShaderMaterial === !0) {
15
+ const i = s;
16
+ for (const e in i.uniforms) {
17
+ const n = i.uniforms[e];
18
+ n?.value instanceof r && o(n.value);
19
+ }
20
+ }
21
+ s.dispose();
22
+ }
23
+ }, p = (s) => {
24
+ if (s) {
25
+ for (; s.children.length > 0; ) {
26
+ const i = s.children[0];
27
+ i.type === "Audio" ? (i.pause(), i.parent && i.parent.remove(i)) : p(i);
28
+ }
29
+ if (s.parent && s.parent.remove(s), s.isMesh) {
30
+ const i = s;
31
+ i.geometry?.dispose(), f(i.material);
32
+ }
33
+ typeof s.dispose == "function" && s.dispose();
34
+ }
35
+ };
36
+ export {
37
+ p as dispose,
38
+ f as disposeMaterial,
39
+ o as disposeTexture
40
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("three");let n=0;const o=()=>{n=0},h=i=>{if(!i)return;let e=i.name.replaceAll(" ","").replaceAll("/",".");if(e.length===0&&(e=`obj_${n}`,n++),i.parent!==null&&i.parent.uuid.length>0&&(e=`${i.parent.uuid}.${e}`),i.uuid=e,i.isMesh!==void 0){const t=i;if(Array.isArray(t.material))t.material.forEach((r,s)=>{r.uuid=`${e}.material.${s}`});else{const r=t.material;r.uuid=`${e}.material`}}i.children.forEach(t=>h(t))};class d{static renderer;static canvas;static context=null;static scene=null;static camera=null;static material=null;static inited=!1;static width=100;static height=100;static init(){this.inited||(this.canvas=document.createElement("canvas"),this.canvas.width=this.width,this.canvas.height=this.height,this.context=this.canvas.getContext("2d"),this.inited=!0)}static renderToBlob(e){this.init();const t=e.repeat.clone(),r=e.offset.clone();if(e.repeat.set(1,1),e.offset.set(0,0),this.context!==null){this.context.clearRect(0,0,this.width,this.height);const s=e.image;if(s!=null&&s.width>0){this.canvas.title=e.sourceFile;const c=this.canvas.width/s.width,l=this.renderToCanvas(e);this.context.drawImage(l,0,0,s.width*c,s.height*c)}}return e.repeat.copy(t),e.offset.copy(r),this.canvas.toDataURL("image/png")}static renderToCanvas(e){if(this.material===null){this.camera=new a.OrthographicCamera(-.5,.5,.5,-.5,0,100),this.scene=new a.Scene,this.material=new a.MeshBasicMaterial;const t=new a.BufferGeometry;t.setAttribute("position",new a.Float32BufferAttribute([-.5,-.5,0,1.5,-.5,0,-.5,1.5,0],3)),t.setAttribute("normal",new a.Float32BufferAttribute([0,0,1,0,0,1],3)),t.setAttribute("uv",new a.Float32BufferAttribute([0,0,2,0,0,2],2));const r=new a.Mesh(t,this.material);this.scene.add(r)}if(e.isRenderTargetTexture)this.material.map=e,this.renderer.render(this.scene,this.camera);else{const t=this.renderer.outputColorSpace,r=e.colorSpace;this.renderer.outputColorSpace=a.LinearSRGBColorSpace,e.colorSpace=a.LinearSRGBColorSpace,this.material.map=e,this.renderer.render(this.scene,this.camera),this.renderer.outputColorSpace=t,e.colorSpace=r}return this.renderer.domElement}}exports.ExportTexture=d;exports.hierarchyUUID=h;exports.resetThreeObjects=o;
@@ -0,0 +1,69 @@
1
+ import { OrthographicCamera as o, Scene as d, MeshBasicMaterial as m, BufferGeometry as p, Float32BufferAttribute as r, Mesh as u, LinearSRGBColorSpace as h } from "three";
2
+ let n = 0;
3
+ const g = () => {
4
+ n = 0;
5
+ }, f = (i) => {
6
+ if (!i) return;
7
+ let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
8
+ if (e.length === 0 && (e = `obj_${n}`, n++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
9
+ const t = i;
10
+ if (Array.isArray(t.material))
11
+ t.material.forEach((a, s) => {
12
+ a.uuid = `${e}.material.${s}`;
13
+ });
14
+ else {
15
+ const a = t.material;
16
+ a.uuid = `${e}.material`;
17
+ }
18
+ }
19
+ i.children.forEach((t) => f(t));
20
+ };
21
+ class v {
22
+ static renderer;
23
+ static canvas;
24
+ static context = null;
25
+ static scene = null;
26
+ static camera = null;
27
+ static material = null;
28
+ static inited = !1;
29
+ static width = 100;
30
+ static height = 100;
31
+ static init() {
32
+ this.inited || (this.canvas = document.createElement("canvas"), this.canvas.width = this.width, this.canvas.height = this.height, this.context = this.canvas.getContext("2d"), this.inited = !0);
33
+ }
34
+ static renderToBlob(e) {
35
+ this.init();
36
+ const t = e.repeat.clone(), a = e.offset.clone();
37
+ if (e.repeat.set(1, 1), e.offset.set(0, 0), this.context !== null) {
38
+ this.context.clearRect(0, 0, this.width, this.height);
39
+ const s = e.image;
40
+ if (s != null && s.width > 0) {
41
+ this.canvas.title = e.sourceFile;
42
+ const c = this.canvas.width / s.width, l = this.renderToCanvas(e);
43
+ this.context.drawImage(l, 0, 0, s.width * c, s.height * c);
44
+ }
45
+ }
46
+ return e.repeat.copy(t), e.offset.copy(a), this.canvas.toDataURL("image/png");
47
+ }
48
+ static renderToCanvas(e) {
49
+ if (this.material === null) {
50
+ this.camera = new o(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new d(), this.material = new m();
51
+ const t = new p();
52
+ t.setAttribute("position", new r([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new r([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new r([0, 0, 2, 0, 0, 2], 2));
53
+ const a = new u(t, this.material);
54
+ this.scene.add(a);
55
+ }
56
+ if (e.isRenderTargetTexture)
57
+ this.material.map = e, this.renderer.render(this.scene, this.camera);
58
+ else {
59
+ const t = this.renderer.outputColorSpace, a = e.colorSpace;
60
+ this.renderer.outputColorSpace = h, e.colorSpace = h, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = t, e.colorSpace = a;
61
+ }
62
+ return this.renderer.domElement;
63
+ }
64
+ }
65
+ export {
66
+ v as ExportTexture,
67
+ f as hierarchyUUID,
68
+ g as resetThreeObjects
69
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=a(["ctrlKey","metaKey","shiftKey","button","pointerId","pointerType","clientX","clientY","pageX","pageY"]),p=a(["clientX","clientY","deltaX","deltaY","deltaMode"]),y=a(["ctrlKey","metaKey","shiftKey","keyCode"]);function h(e,n){e.preventDefault(),p(e,n)}function f(e){e.preventDefault()}function m(e,n,t){for(const r of n)t[r]=e[r]}function a(e){return function(t,r){const o={type:t.type};m(t,e,o),r(o)}}function c(e,n){const t=[],r={type:e.type,touches:t};for(let o=0;o<e.touches.length;++o){const i=e.touches[o];t.push({pageX:i.pageX,pageY:i.pageY})}n(r)}const v={37:!0,38:!0,39:!0,40:!0};function w(e,n){const{keyCode:t}=e;v[t]&&(e.preventDefault(),y(e,n))}const g={contextmenu:f,mousedown:s,mousemove:s,mouseup:s,pointerdown:s,pointermove:s,pointerup:s,touchstart:c,touchmove:c,touchend:c,wheel:h,keydown:w};let E=0;class H{id;worker;constructor(n,t,r){this.id=E++,this.worker=t;const o=d=>{this.worker.postMessage({type:"event",id:this.id,data:d})};t.postMessage({type:"makeProxy",id:this.id});for(const[d,l]of Object.entries(r))n.addEventListener(d,u=>{l(u,o)});function i(){o({type:"resize",left:0,top:0,width:innerWidth,height:innerHeight})}window.addEventListener("resize",i),i()}}exports.ElementProxy=H;exports.WebworkerEventHandlers=g;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("three"),e=require("../core/types.cjs");class i extends n.EventDispatcher{style={};left=0;top=0;width=0;height=0;ownerDocument=void 0;constructor(){super(),this.ownerDocument=this}get clientWidth(){return this.width}set clientWidth(t){this.width=t}get clientHeight(){return this.height}set clientHeight(t){this.height=t}setPointerCapture(){}releasePointerCapture(){}getBoundingClientRect(){return{x:this.left,y:this.top,left:this.left,top:this.top,width:this.width,height:this.height,right:this.left+this.width,bottom:this.top+this.height,toJSON:()=>({})}}handleEvent(t){if(t.type==="size"){this.left=t.left,this.top=t.top,this.width=t.width,this.height=t.height;return}t.preventDefault=e.noop,t.stopPropagation=e.noop,this.dispatchEvent(t)}focus(){}getRootNode(){return this}}class o{targets={};constructor(){this.handleEvent=this.handleEvent.bind(this)}makeProxy(t){const{id:s}=t,r=new i;this.targets[s]=r}getProxy(t){return this.targets[t]}handleEvent(t){this.targets[t.id]?.handleEvent(t.data)}}exports.ElementProxyReceiver=i;exports.ProxyManager=o;
package/package.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "author": "Colin Duffy <http://tomorrowevening.com/>",
4
4
  "description": "An extendable set of Web Tools controlled via a separate window for non-intereference with content.",
5
5
  "license": "GPL-3.0-or-later",
6
- "main": "./dist/hermes.cjs.js",
6
+ "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "type": "module",
10
10
  "sideEffects": ["**/*.css"],
11
- "version": "0.1.42",
11
+ "version": "0.1.44",
12
12
  "homepage": "https://github.com/tomorrowevening/hermes#readme",
13
13
  "bugs": {
14
14
  "url": "https://github.com/tomorrowevening/hermes/issues"
@@ -22,15 +22,31 @@
22
22
  "files": [
23
23
  "dist",
24
24
  "types/**/*.d.ts",
25
- "!public/images",
26
- "!public/json",
27
- "!public/models"
25
+ "!dist/images/**",
26
+ "!dist/json/**",
27
+ "!dist/models/**",
28
+ "!dist/index-*.js",
29
+ "!dist/index-*.css",
30
+ "!dist/ThreeEditor-*.js",
31
+ "!dist/ThreeEditor-*.css",
32
+ "!dist/index.css",
33
+ "!dist/index.html"
28
34
  ],
29
35
  "exports": {
30
36
  ".": {
31
37
  "types": "./types/index.d.ts",
32
38
  "import": "./dist/index.js",
33
- "require": "./dist/hermes.cjs.js"
39
+ "require": "./dist/index.cjs"
40
+ },
41
+ "./editor": {
42
+ "types": "./types/editor/index.d.ts",
43
+ "import": "./dist/editor/index.js",
44
+ "require": "./dist/editor/index.cjs"
45
+ },
46
+ "./editor/*": {
47
+ "types": "./types/editor/*.d.ts",
48
+ "import": "./dist/editor/*.js",
49
+ "require": "./dist/editor/*.cjs"
34
50
  },
35
51
  "./hermes.css": "./dist/hermes.css"
36
52
  },
@@ -40,7 +56,7 @@
40
56
  },
41
57
  "scripts": {
42
58
  "server": "node server/index.mjs",
43
- "clean": "rimraf dist types",
59
+ "clean": "rimraf dist types example-dist",
44
60
  "dev": "vite",
45
61
  "declare": "tsc --declaration --emitDeclarationOnly --declarationDir types",
46
62
  "buildLib": "yarn declare && vite build",
@@ -33,7 +33,7 @@ export interface GroupCallback {
33
33
  export type ApplicationMode = 'app' | 'editor';
34
34
  export type VoidCallback = () => void;
35
35
  export type DataUpdateCallback = (data: any) => void;
36
- export type EditorEvent = 'custom' | 'setSheet' | 'setSheetObject' | 'updateSheetObject' | 'updateTimeline' | 'playSheet' | 'pauseSheet' | 'updateObject' | 'addScene' | 'refreshScene' | 'removeScene' | 'setScene' | 'createTexture' | 'addCamera' | 'removeCamera' | 'addSpline' | 'addRenderer' | 'updateRenderer' | 'requestSize' | 'requestRenderer' | 'requestScene' | 'addFolder' | 'bindObject' | 'updateBind' | 'addButton' | 'clickButton' | 'addGroup' | 'removeGroup' | 'updateGroup';
36
+ export type EditorEvent = 'custom' | 'createSheet' | 'setSheet' | 'createSheetObject' | 'setSheetObject' | 'updateSheetObject' | 'updateTimeline' | 'playSheet' | 'pauseSheet' | 'updateObject' | 'addScene' | 'refreshScene' | 'removeScene' | 'setScene' | 'createTexture' | 'addCamera' | 'removeCamera' | 'addSpline' | 'addRenderer' | 'updateRenderer' | 'requestSize' | 'requestRenderer' | 'requestScene' | 'addFolder' | 'bindObject' | 'updateBind' | 'addButton' | 'clickButton' | 'addGroup' | 'removeGroup' | 'updateGroup';
37
37
  export type VoidFunc = () => void;
38
38
  export type BroadcastCallback = (data: BroadcastData) => void;
39
39
  export type TheatreUpdateCallback = (data: any) => void;
@@ -0,0 +1,26 @@
1
+ export * from './sidePanel/utils';
2
+ export * from './utils';
3
+ export { default as NavButton } from './components/NavButton';
4
+ export { default as DraggableItem } from './components/DraggableItem';
5
+ export { default as Draggable } from './components/Draggable';
6
+ export { default as DropdownItem } from './components/DropdownItem';
7
+ export { default as Dropdown } from './components/Dropdown';
8
+ export { default as SidePanel } from './sidePanel/SidePanel';
9
+ export { default as Accordion } from './sidePanel/Accordion';
10
+ export { default as ChildObject } from './sidePanel/ChildObject';
11
+ export { default as ContainerObject } from './sidePanel/ContainerObject';
12
+ export { default as Inspector } from './sidePanel/inspector/Inspector';
13
+ export { default as MultiView } from './multiView/MultiView';
14
+ export { default as Editor } from './Editor';
15
+ export { default as ThreeEditor } from './ThreeEditor';
16
+ export { default as HermesApp } from './HermesApp';
17
+ export { default as Transform } from './tools/Transform';
18
+ export { default as Spline } from './tools/splineEditor/Spline';
19
+ export { default as SplineEditor } from './tools/splineEditor';
20
+ export { default as InfiniteGridMaterial } from './multiView/InfiniteGridMaterial';
21
+ export { default as InfiniteGridNodeMaterial } from './multiView/InfiniteGridNodeMaterial';
22
+ export { default as InfiniteGridHelper } from './multiView/InfiniteGridHelper';
23
+ export { default as InfiniteGridHelperGPU } from './multiView/InfiniteGridHelperGPU';
24
+ export { default as DepthNodeMaterial } from './multiView/DepthNodeMaterial';
25
+ export { default as UVMaterial } from './multiView/UVMaterial';
26
+ export { default as UVNodeMaterial } from './multiView/UVNodeMaterial';
package/types/index.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  export * from './core/types';
2
- export * from './editor/sidePanel/utils';
3
- export * from './editor/utils';
4
2
  export * from './utils/detectSettings';
5
3
  export * from './utils/ImageSequenceCapturer';
6
4
  export * from './utils/math';
7
5
  export * from './utils/theatre';
8
6
  export * from './utils/three';
9
- export * from './utils/post';
10
7
  export * from './webworkers/types';
11
8
  export * from './webworkers/EventHandling';
12
9
  export * from './webworkers/ProxyManager';
@@ -14,27 +11,4 @@ export { default as Application } from './core/Application';
14
11
  export { default as BaseRemote } from './core/remote/BaseRemote';
15
12
  export { default as RemoteTheatre } from './core/remote/RemoteTheatre';
16
13
  export { default as RemoteThree } from './core/remote/RemoteThree';
17
- export { default as NavButton } from './editor/components/NavButton';
18
- export { default as DraggableItem } from './editor/components/DraggableItem';
19
- export { default as Draggable } from './editor/components/Draggable';
20
- export { default as DropdownItem } from './editor/components/DropdownItem';
21
- export { default as Dropdown } from './editor/components/Dropdown';
22
- export { default as SidePanel } from './editor/sidePanel/SidePanel';
23
- export { default as Accordion } from './editor/sidePanel/Accordion';
24
- export { default as ChildObject } from './editor/sidePanel/ChildObject';
25
- export { default as ContainerObject } from './editor/sidePanel/ContainerObject';
26
- export { default as Inspector } from './editor/sidePanel/inspector/Inspector';
27
- export { default as MultiView } from './editor/multiView/MultiView';
28
- export { default as Editor } from './editor/Editor';
29
- export { default as ThreeEditor } from './editor/ThreeEditor';
30
14
  export { default as HermesApp } from './editor/HermesApp';
31
- export { default as Transform } from './editor/tools/Transform';
32
- export { default as Spline } from './editor/tools/splineEditor/Spline';
33
- export { default as SplineEditor } from './editor/tools/splineEditor';
34
- export { default as InfiniteGridMaterial } from './editor/multiView/InfiniteGridMaterial';
35
- export { default as InfiniteGridNodeMaterial } from './editor/multiView/InfiniteGridNodeMaterial';
36
- export { default as InfiniteGridHelper } from './editor/multiView/InfiniteGridHelper';
37
- export { default as InfiniteGridHelperGPU } from './editor/multiView/InfiniteGridHelperGPU';
38
- export { default as DepthNodeMaterial } from './editor/multiView/DepthNodeMaterial';
39
- export { default as UVMaterial } from './editor/multiView/UVMaterial';
40
- export { default as UVNodeMaterial } from './editor/multiView/UVNodeMaterial';
@@ -1,7 +1,6 @@
1
1
  export type QualityType = 'High' | 'Medium' | 'Low';
2
2
  export type AppSettings = {
3
3
  dpr: number;
4
- fps: number;
5
4
  width: number;
6
5
  height: number;
7
6
  mobile: boolean;
@@ -11,5 +10,4 @@ export type AppSettings = {
11
10
  dev: boolean;
12
11
  editor: boolean;
13
12
  };
14
- export declare function detectMaxFrameRate(callback: (fps: number) => void): void;
15
13
  export declare function detectSettings(dev?: boolean, editor?: boolean): Promise<AppSettings>;
@@ -1,6 +1,5 @@
1
1
  import RemoteTheatre from '../core/remote/RemoteTheatre';
2
2
  export declare function useStudio(): any;
3
- export declare function customizeTheatreElements(): Promise<void>;
4
3
  export declare function animateObjectTransform(sheet: string, key: string, obj: any, theatre: RemoteTheatre): void;
5
4
  type PropType = 'array' | 'boolean' | 'color' | 'euler' | 'matrix2' | 'matrix3' | 'matrix4' | 'number' | 'object' | 'string' | 'texture' | 'vector2' | 'vector3' | 'vector4';
6
5
  type PropToAdd = {
@@ -0,0 +1,4 @@
1
+ import { Material, Object3D, Texture } 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;
@@ -0,0 +1,17 @@
1
+ import { Object3D, Texture, WebGLRenderer } from 'three';
2
+ export declare const resetThreeObjects: () => void;
3
+ export declare const hierarchyUUID: (object: Object3D) => void;
4
+ export declare class ExportTexture {
5
+ static renderer: WebGLRenderer;
6
+ private static canvas;
7
+ private static context;
8
+ private static scene;
9
+ private static camera;
10
+ private static material;
11
+ private static inited;
12
+ private static width;
13
+ private static height;
14
+ private static init;
15
+ static renderToBlob(texture: Texture): string;
16
+ private static renderToCanvas;
17
+ }