@tomorrowevening/hermes 0.0.158 → 0.0.159

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/hermes.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Texture as Nh, OrthographicCamera as Ph, Scene as yu, MeshBasicMaterial as bn, BufferGeometry as Tn, Float32BufferAttribute as gn, Mesh as Y, LinearSRGBColorSpace as Pa, ObjectLoader as ox, AnimationMixer as lx, AnimationClip as cx, WebGLRenderTarget as Fm, RGBAFormat as hx, EventDispatcher as xu, Clock as Dm, Group as jo, RepeatWrapping as zd, Color as vn, ColorManagement as ir, FrontSide as ux, BackSide as Om, DoubleSide as _u, ZeroFactor as Im, OneFactor as Bm, SrcColorFactor as Lm, OneMinusSrcColorFactor as Um, SrcAlphaFactor as km, OneMinusSrcAlphaFactor as zm, DstAlphaFactor as Gm, OneMinusDstAlphaFactor as Vm, DstColorFactor as Hm, OneMinusDstColorFactor as Wm, SrcAlphaSaturateFactor as dx, ConstantColorFactor as $m, OneMinusConstantColorFactor as jm, ConstantAlphaFactor as qm, OneMinusConstantAlphaFactor as Ym, AddEquation as px, SubtractEquation as fx, ReverseSubtractEquation as mx, MinEquation as gx, MaxEquation as yx, NoBlending as xx, NormalBlending as _x, AdditiveBlending as bx, SubtractiveBlending as Tx, MultiplyBlending as Sx, CustomBlending as vx, Line as Ls, LineBasicMaterial as bu, Controls as Xm, Vector3 as Z, MOUSE as ur, TOUCH as nr, Quaternion as Jt, Spherical as Fh, Vector2 as gt, Ray as wx, Plane as Ex, MathUtils as Cx, ShaderMaterial as Zm, GLSL3 as Mx, PlaneGeometry as Km, Raycaster as Fa, Object3D as Tr, CylinderGeometry as kt, BoxGeometry as bt, OctahedronGeometry as Qa, TorusGeometry as Lr, SphereGeometry as Qm, Euler as Jm, Matrix4 as Rl, CatmullRomCurve3 as Gd, AxesHelper as Ax, MeshDepthMaterial as Rx, MeshNormalMaterial as Nx, Sphere as Px, Box3 as Fx, Vector4 as Dx, WebGLRenderer as da, PerspectiveCamera as Vd, CameraHelper as Ox, SkinnedMesh as Ix, SpotLightHelper as Bx, PointLightHelper as Lx, HemisphereLightHelper as Ux, DirectionalLightHelper as kx, SkeletonHelper as zx, SRGBColorSpace as Hd, NoToneMapping as Wd, NoColorSpace as Gx, LinearToneMapping as Vx, ReinhardToneMapping as Hx, CineonToneMapping as Wx, ACESFilmicToneMapping as $x, AgXToneMapping as jx, NeutralToneMapping as qx, CustomToneMapping as Yx } from "three";
1
+ import { Texture as Nh, OrthographicCamera as Ph, Scene as yu, MeshBasicMaterial as bn, BufferGeometry as Tn, Float32BufferAttribute as gn, Mesh as Y, LinearSRGBColorSpace as Pa, ObjectLoader as ox, AnimationMixer as lx, AnimationClip as cx, WebGLRenderTarget as Fm, RGBAFormat as hx, EventDispatcher as xu, Clock as Dm, Group as jo, RepeatWrapping as zd, Color as vn, ColorManagement as ir, FrontSide as ux, BackSide as Om, DoubleSide as _u, ZeroFactor as Im, OneFactor as Bm, SrcColorFactor as Lm, OneMinusSrcColorFactor as Um, SrcAlphaFactor as km, OneMinusSrcAlphaFactor as zm, DstAlphaFactor as Gm, OneMinusDstAlphaFactor as Vm, DstColorFactor as Hm, OneMinusDstColorFactor as Wm, SrcAlphaSaturateFactor as dx, ConstantColorFactor as $m, OneMinusConstantColorFactor as jm, ConstantAlphaFactor as qm, OneMinusConstantAlphaFactor as Ym, AddEquation as px, SubtractEquation as fx, ReverseSubtractEquation as mx, MinEquation as gx, MaxEquation as yx, NoBlending as xx, NormalBlending as _x, AdditiveBlending as bx, SubtractiveBlending as Tx, MultiplyBlending as Sx, CustomBlending as vx, Line as Ls, LineBasicMaterial as bu, Controls as Xm, Vector3 as Z, MOUSE as ur, TOUCH as nr, Quaternion as Jt, Spherical as Fh, Vector2 as yt, Ray as wx, Plane as Ex, MathUtils as Cx, ShaderMaterial as Zm, GLSL3 as Mx, PlaneGeometry as Km, Raycaster as Fa, Object3D as Tr, CylinderGeometry as kt, BoxGeometry as bt, OctahedronGeometry as Qa, TorusGeometry as Lr, SphereGeometry as Qm, Euler as Jm, Matrix4 as Rl, CatmullRomCurve3 as Gd, AxesHelper as Ax, MeshDepthMaterial as Rx, MeshNormalMaterial as Nx, Sphere as Px, Box3 as Fx, Vector4 as Dx, WebGLRenderer as da, PerspectiveCamera as Vd, CameraHelper as Ox, SkinnedMesh as Ix, SpotLightHelper as Bx, PointLightHelper as Lx, HemisphereLightHelper as Ux, DirectionalLightHelper as kx, SkeletonHelper as zx, SRGBColorSpace as Hd, NoToneMapping as Wd, NoColorSpace as Gx, LinearToneMapping as Vx, ReinhardToneMapping as Hx, CineonToneMapping as Wx, ACESFilmicToneMapping as $x, AgXToneMapping as jx, NeutralToneMapping as qx, CustomToneMapping as Yx } from "three";
2
2
  import { EffectPass as Xx, ShaderPass as Zx } from "postprocessing";
3
3
  import { createRafDriver as Kx } from "@theatre/core";
4
4
  import eg, { useState as Re, useRef as Ge, useEffect as wn, useMemo as Sa, Component as Va, createRef as Mi, forwardRef as Qx } from "react";
@@ -12,7 +12,7 @@ function Jx(a) {
12
12
  const e = JSON.stringify(a);
13
13
  return navigator.clipboard.writeText(e), e;
14
14
  }
15
- function yt() {
15
+ function mt() {
16
16
  return Math.round(Math.random() * 1e6).toString();
17
17
  }
18
18
  function e_(a) {
@@ -2642,7 +2642,7 @@ function B_(a) {
2642
2642
  );
2643
2643
  break;
2644
2644
  }
2645
- return /* @__PURE__ */ C.jsx("li", { className: t === e.title ? "selected" : "", children: i }, yt());
2645
+ return /* @__PURE__ */ C.jsx("li", { className: t === e.title ? "selected" : "", children: i }, mt());
2646
2646
  }
2647
2647
  function ol(a) {
2648
2648
  const [e, t] = Re(a.open !== void 0 ? a.open : !0), s = !e || a.children === void 0, i = Ge(null), n = () => {
@@ -2807,7 +2807,7 @@ function xn(a) {
2807
2807
  max: a.max,
2808
2808
  step: a.step,
2809
2809
  disabled: a.disabled,
2810
- name: yt(),
2810
+ name: mt(),
2811
2811
  onChange: (n) => {
2812
2812
  if (i(n.target.value), n.target.value.length === 0) return;
2813
2813
  const r = Number(n.target.value);
@@ -2824,7 +2824,7 @@ function xn(a) {
2824
2824
  disabled: a.disabled,
2825
2825
  ref: e,
2826
2826
  className: "min",
2827
- name: yt(),
2827
+ name: mt(),
2828
2828
  onChange: (n) => {
2829
2829
  if (n.target.value.length === 0) return;
2830
2830
  const r = Number(n.target.value);
@@ -2842,7 +2842,7 @@ function xn(a) {
2842
2842
  max: a.max,
2843
2843
  step: a.step,
2844
2844
  ref: t,
2845
- name: yt(),
2845
+ name: mt(),
2846
2846
  onChange: rl
2847
2847
  }
2848
2848
  )
@@ -2920,7 +2920,7 @@ function L_(a) {
2920
2920
  return /* @__PURE__ */ C.jsxs("div", { className: "vector2", children: [
2921
2921
  /* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
2922
2922
  /* @__PURE__ */ C.jsxs("div", { children: [
2923
- /* @__PURE__ */ C.jsx("label", { ref: o, children: "X" }),
2923
+ /* @__PURE__ */ C.jsx("span", { ref: o, children: "X" }),
2924
2924
  /* @__PURE__ */ C.jsx(
2925
2925
  "input",
2926
2926
  {
@@ -2930,7 +2930,7 @@ function L_(a) {
2930
2930
  min: m.min,
2931
2931
  max: m.max,
2932
2932
  step: A,
2933
- name: yt(),
2933
+ name: mt(),
2934
2934
  onChange: (N) => {
2935
2935
  if (d(N.target.value), N.target.value.length === 0) return;
2936
2936
  const k = Number(N.target.value);
@@ -2940,7 +2940,7 @@ function L_(a) {
2940
2940
  )
2941
2941
  ] }),
2942
2942
  /* @__PURE__ */ C.jsxs("div", { children: [
2943
- /* @__PURE__ */ C.jsx("label", { ref: l, children: "Y" }),
2943
+ /* @__PURE__ */ C.jsx("span", { ref: l, children: "Y" }),
2944
2944
  /* @__PURE__ */ C.jsx(
2945
2945
  "input",
2946
2946
  {
@@ -2950,7 +2950,7 @@ function L_(a) {
2950
2950
  min: m.min,
2951
2951
  max: m.max,
2952
2952
  step: A,
2953
- name: yt(),
2953
+ name: mt(),
2954
2954
  onChange: (N) => {
2955
2955
  if (f(N.target.value), N.target.value.length === 0) return;
2956
2956
  const k = Number(N.target.value);
@@ -2960,7 +2960,7 @@ function L_(a) {
2960
2960
  )
2961
2961
  ] }),
2962
2962
  /* @__PURE__ */ C.jsxs("div", { children: [
2963
- /* @__PURE__ */ C.jsx("label", { ref: c, children: "Min" }),
2963
+ /* @__PURE__ */ C.jsx("span", { ref: c, children: "Min" }),
2964
2964
  /* @__PURE__ */ C.jsx(
2965
2965
  "input",
2966
2966
  {
@@ -2968,13 +2968,13 @@ function L_(a) {
2968
2968
  type: "number",
2969
2969
  value: m.min,
2970
2970
  step: A,
2971
- name: yt(),
2971
+ name: mt(),
2972
2972
  onChange: E
2973
2973
  }
2974
2974
  )
2975
2975
  ] }),
2976
2976
  /* @__PURE__ */ C.jsxs("div", { children: [
2977
- /* @__PURE__ */ C.jsx("label", { ref: h, children: "Max" }),
2977
+ /* @__PURE__ */ C.jsx("span", { ref: h, children: "Max" }),
2978
2978
  /* @__PURE__ */ C.jsx(
2979
2979
  "input",
2980
2980
  {
@@ -2982,7 +2982,7 @@ function L_(a) {
2982
2982
  type: "number",
2983
2983
  value: m.max,
2984
2984
  step: A,
2985
- name: yt(),
2985
+ name: mt(),
2986
2986
  onChange: v
2987
2987
  }
2988
2988
  )
@@ -3375,7 +3375,7 @@ function sp(a) {
3375
3375
  const c = Ge(null);
3376
3376
  n.push(
3377
3377
  /* @__PURE__ */ C.jsxs("div", { children: [
3378
- /* @__PURE__ */ C.jsx("label", { ref: c, children: l.substring(1).toUpperCase() }),
3378
+ /* @__PURE__ */ C.jsx("span", { ref: c, children: l.substring(1).toUpperCase() }),
3379
3379
  /* @__PURE__ */ C.jsx(
3380
3380
  xn,
3381
3381
  {
@@ -3476,7 +3476,7 @@ function Q_(a) {
3476
3476
  const o = Ge(null);
3477
3477
  s.push(
3478
3478
  /* @__PURE__ */ C.jsxs("div", { children: [
3479
- /* @__PURE__ */ C.jsx("label", { ref: o, children: r + 1 }),
3479
+ /* @__PURE__ */ C.jsx("span", { ref: o, children: r + 1 }),
3480
3480
  /* @__PURE__ */ C.jsx(
3481
3481
  xn,
3482
3482
  {
@@ -4376,7 +4376,7 @@ function fb(a) {
4376
4376
  }, src: o.src.length > 0 ? o.src : np }),
4377
4377
  /* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
4378
4378
  /* @__PURE__ */ C.jsxs("div", { children: [
4379
- /* @__PURE__ */ C.jsx("label", { children: "Offset:" }),
4379
+ /* @__PURE__ */ C.jsx("span", { children: "Offset:" }),
4380
4380
  /* @__PURE__ */ C.jsx(
4381
4381
  "input",
4382
4382
  {
@@ -4384,7 +4384,7 @@ function fb(a) {
4384
4384
  type: "number",
4385
4385
  value: l,
4386
4386
  step: e,
4387
- name: yt(),
4387
+ name: mt(),
4388
4388
  onChange: g
4389
4389
  }
4390
4390
  ),
@@ -4395,13 +4395,13 @@ function fb(a) {
4395
4395
  type: "number",
4396
4396
  value: h,
4397
4397
  step: e,
4398
- name: yt(),
4398
+ name: mt(),
4399
4399
  onChange: g
4400
4400
  }
4401
4401
  )
4402
4402
  ] }),
4403
4403
  /* @__PURE__ */ C.jsxs("div", { children: [
4404
- /* @__PURE__ */ C.jsx("label", { children: "Repeat:" }),
4404
+ /* @__PURE__ */ C.jsx("span", { children: "Repeat:" }),
4405
4405
  /* @__PURE__ */ C.jsx(
4406
4406
  "input",
4407
4407
  {
@@ -4409,7 +4409,7 @@ function fb(a) {
4409
4409
  type: "number",
4410
4410
  value: d,
4411
4411
  step: e,
4412
- name: yt(),
4412
+ name: mt(),
4413
4413
  onChange: g
4414
4414
  }
4415
4415
  ),
@@ -4420,7 +4420,7 @@ function fb(a) {
4420
4420
  type: "number",
4421
4421
  value: f,
4422
4422
  step: e,
4423
- name: yt(),
4423
+ name: mt(),
4424
4424
  onChange: g
4425
4425
  }
4426
4426
  )
@@ -4449,7 +4449,7 @@ function qo(a) {
4449
4449
  const o = a.type === "field" || a.type === "string" && (t.length > 100 || t.search(`
4450
4450
  `) > -1), l = o || a.type === "image" || a.type === "vector2";
4451
4451
  return /* @__PURE__ */ C.jsxs("div", { className: `field ${l ? "block" : ""}`, style: r, children: [
4452
- a.type !== "button" && /* @__PURE__ */ C.jsx("label", { ref: i, children: al(a.title) }, "fieldLabel"),
4452
+ a.type !== "button" && /* @__PURE__ */ C.jsx("span", { ref: i, children: al(a.title) }, "fieldLabel"),
4453
4453
  a.type === "string" && !o && /* @__PURE__ */ C.jsx(
4454
4454
  "input",
4455
4455
  {
@@ -4457,7 +4457,7 @@ function qo(a) {
4457
4457
  disabled: a.disabled,
4458
4458
  onChange: n,
4459
4459
  value: t,
4460
- name: yt()
4460
+ name: mt()
4461
4461
  }
4462
4462
  ),
4463
4463
  (a.type === "field" || a.type === "string" && o) && /* @__PURE__ */ C.jsx(
@@ -4471,7 +4471,7 @@ function qo(a) {
4471
4471
  a.onKeyDown !== void 0 && a.onKeyDown(c);
4472
4472
  },
4473
4473
  value: t,
4474
- name: yt()
4474
+ name: mt()
4475
4475
  }
4476
4476
  ),
4477
4477
  a.type === "boolean" && /* @__PURE__ */ C.jsx(
@@ -4481,7 +4481,7 @@ function qo(a) {
4481
4481
  disabled: a.disabled,
4482
4482
  onChange: n,
4483
4483
  checked: t,
4484
- name: yt()
4484
+ name: mt()
4485
4485
  }
4486
4486
  ),
4487
4487
  a.type === "number" && /* @__PURE__ */ C.jsx(
@@ -4513,8 +4513,8 @@ function qo(a) {
4513
4513
  }
4514
4514
  ),
4515
4515
  a.type === "color" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
4516
- /* @__PURE__ */ C.jsx("input", { type: "text", value: t.toString(), onChange: n, disabled: a.disabled, className: "color", name: yt() }),
4517
- /* @__PURE__ */ C.jsx("input", { type: "color", value: t, onChange: n, disabled: a.disabled, name: yt() })
4516
+ /* @__PURE__ */ C.jsx("input", { type: "text", value: t.toString(), onChange: n, disabled: a.disabled, className: "color", name: mt() }),
4517
+ /* @__PURE__ */ C.jsx("input", { type: "color", value: t, onChange: n, disabled: a.disabled, name: mt() })
4518
4518
  ] }),
4519
4519
  a.type === "button" && /* @__PURE__ */ C.jsx(
4520
4520
  "button",
@@ -4527,7 +4527,16 @@ function qo(a) {
4527
4527
  }
4528
4528
  ),
4529
4529
  a.type === "image" && /* @__PURE__ */ C.jsx(fb, { title: a.title, prop: a.prop, value: a.value, onChange: a.onChange }),
4530
- a.type === "option" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx("select", { onChange: n, disabled: a.disabled, defaultValue: a.value, children: a.options?.map((c, h) => /* @__PURE__ */ C.jsx("option", { value: c.value, children: al(c.title) }, h)) }) }),
4530
+ a.type === "option" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx(
4531
+ "select",
4532
+ {
4533
+ onChange: n,
4534
+ disabled: a.disabled,
4535
+ defaultValue: a.value,
4536
+ name: mt(),
4537
+ children: a.options?.map((c, h) => /* @__PURE__ */ C.jsx("option", { value: c.value, children: al(c.title) }, h))
4538
+ }
4539
+ ) }),
4531
4540
  a.type === "vector2" && /* @__PURE__ */ C.jsx(L_, { step: a.step, value: t, min: 0, max: 1, onChange: n }),
4532
4541
  a.type === "grid3" && /* @__PURE__ */ C.jsx(sp, { step: a.step, value: t, onChange: n }),
4533
4542
  a.type === "grid4" && /* @__PURE__ */ C.jsx(Q_, { step: a.step, value: t, onChange: n }),
@@ -33533,7 +33542,7 @@ const hr = {
33533
33542
  LineStrip: "line-strip",
33534
33543
  TriangleList: "triangle-list",
33535
33544
  TriangleStrip: "triangle-strip"
33536
- }, mt = {
33545
+ }, gt = {
33537
33546
  Never: "never",
33538
33547
  Less: "less",
33539
33548
  Equal: "equal",
@@ -36865,28 +36874,28 @@ class c1 {
36865
36874
  const s = e.stencilFunc;
36866
36875
  switch (s) {
36867
36876
  case jb:
36868
- t = mt.Never;
36877
+ t = gt.Never;
36869
36878
  break;
36870
36879
  case su:
36871
- t = mt.Always;
36880
+ t = gt.Always;
36872
36881
  break;
36873
36882
  case qb:
36874
- t = mt.Less;
36883
+ t = gt.Less;
36875
36884
  break;
36876
36885
  case Xb:
36877
- t = mt.LessEqual;
36886
+ t = gt.LessEqual;
36878
36887
  break;
36879
36888
  case Yb:
36880
- t = mt.Equal;
36889
+ t = gt.Equal;
36881
36890
  break;
36882
36891
  case Qb:
36883
- t = mt.GreaterEqual;
36892
+ t = gt.GreaterEqual;
36884
36893
  break;
36885
36894
  case Zb:
36886
- t = mt.Greater;
36895
+ t = gt.Greater;
36887
36896
  break;
36888
36897
  case Kb:
36889
- t = mt.NotEqual;
36898
+ t = gt.NotEqual;
36890
36899
  break;
36891
36900
  default:
36892
36901
  console.error("THREE.WebGPURenderer: Invalid stencil function.", s);
@@ -37010,33 +37019,33 @@ class c1 {
37010
37019
  _getDepthCompare(e) {
37011
37020
  let t;
37012
37021
  if (e.depthTest === !1)
37013
- t = mt.Always;
37022
+ t = gt.Always;
37014
37023
  else {
37015
37024
  const s = e.depthFunc;
37016
37025
  switch (s) {
37017
37026
  case _g:
37018
- t = mt.Never;
37027
+ t = gt.Never;
37019
37028
  break;
37020
37029
  case bg:
37021
- t = mt.Always;
37030
+ t = gt.Always;
37022
37031
  break;
37023
37032
  case Tg:
37024
- t = mt.Less;
37033
+ t = gt.Less;
37025
37034
  break;
37026
37035
  case fl:
37027
- t = mt.LessEqual;
37036
+ t = gt.LessEqual;
37028
37037
  break;
37029
37038
  case Sg:
37030
- t = mt.Equal;
37039
+ t = gt.Equal;
37031
37040
  break;
37032
37041
  case vg:
37033
- t = mt.GreaterEqual;
37042
+ t = gt.GreaterEqual;
37034
37043
  break;
37035
37044
  case wg:
37036
- t = mt.Greater;
37045
+ t = gt.Greater;
37037
37046
  break;
37038
37047
  case Eg:
37039
- t = mt.NotEqual;
37048
+ t = gt.NotEqual;
37040
37049
  break;
37041
37050
  default:
37042
37051
  console.error("THREE.WebGPUPipelineUtils: Invalid depth function.", s);
@@ -39806,7 +39815,7 @@ class uN extends Xm {
39806
39815
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
39807
39816
  */
39808
39817
  constructor(e, t = null) {
39809
- super(e, t), this.state = Fe.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: ur.ROTATE, MIDDLE: ur.DOLLY, RIGHT: ur.PAN }, this.touches = { ONE: nr.ROTATE, TWO: nr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new Jt(), this._lastTargetPosition = new Z(), this._quat = new Jt().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Fh(), this._sphericalDelta = new Fh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new gt(), this._rotateEnd = new gt(), this._rotateDelta = new gt(), this._panStart = new gt(), this._panEnd = new gt(), this._panDelta = new gt(), this._dollyStart = new gt(), this._dollyEnd = new gt(), this._dollyDelta = new gt(), this._dollyDirection = new Z(), this._mouse = new gt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = pN.bind(this), this._onPointerDown = dN.bind(this), this._onPointerUp = fN.bind(this), this._onContextMenu = TN.bind(this), this._onMouseWheel = yN.bind(this), this._onKeyDown = xN.bind(this), this._onTouchStart = _N.bind(this), this._onTouchMove = bN.bind(this), this._onMouseDown = mN.bind(this), this._onMouseMove = gN.bind(this), this._interceptControlDown = SN.bind(this), this._interceptControlUp = vN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
39818
+ super(e, t), this.state = Fe.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: ur.ROTATE, MIDDLE: ur.DOLLY, RIGHT: ur.PAN }, this.touches = { ONE: nr.ROTATE, TWO: nr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new Jt(), this._lastTargetPosition = new Z(), this._quat = new Jt().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Fh(), this._sphericalDelta = new Fh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new yt(), this._rotateEnd = new yt(), this._rotateDelta = new yt(), this._panStart = new yt(), this._panEnd = new yt(), this._panDelta = new yt(), this._dollyStart = new yt(), this._dollyEnd = new yt(), this._dollyDelta = new yt(), this._dollyDirection = new Z(), this._mouse = new yt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = pN.bind(this), this._onPointerDown = dN.bind(this), this._onPointerUp = fN.bind(this), this._onContextMenu = TN.bind(this), this._onMouseWheel = yN.bind(this), this._onKeyDown = xN.bind(this), this._onTouchStart = _N.bind(this), this._onTouchMove = bN.bind(this), this._onMouseDown = mN.bind(this), this._onMouseMove = gN.bind(this), this._interceptControlDown = SN.bind(this), this._interceptControlUp = vN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
39810
39819
  }
39811
39820
  connect(e) {
39812
39821
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -40070,7 +40079,7 @@ class uN extends Xm {
40070
40079
  }
40071
40080
  _trackPointer(e) {
40072
40081
  let t = this._pointerPositions[e.pointerId];
40073
- t === void 0 && (t = new gt(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
40082
+ t === void 0 && (t = new yt(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
40074
40083
  }
40075
40084
  _getSecondPointerPosition(e) {
40076
40085
  const t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -42477,7 +42486,7 @@ class Pt extends xu {
42477
42486
  return Pt._instance || (Pt._instance = new Pt()), Pt._instance;
42478
42487
  }
42479
42488
  }
42480
- const HN = new bt(), Mh = new gt();
42489
+ const HN = new bt(), Mh = new yt();
42481
42490
  class Ah extends Tr {
42482
42491
  curve = new Gd();
42483
42492
  line;
@@ -42946,7 +42955,7 @@ class WN extends Tr {
42946
42955
  const s = e.target.getBoundingClientRect(), i = (e.clientX - s.left) / s.width * 2 - 1, n = -((e.clientY - s.top) / s.height) * 2 + 1;
42947
42956
  if (ht.instance) {
42948
42957
  const o = new Fa();
42949
- o.setFromCamera(new gt(i, n), this._camera);
42958
+ o.setFromCamera(new yt(i, n), this._camera);
42950
42959
  const l = o.intersectObjects(ht.instance.helpersContainer.children, !0);
42951
42960
  for (let c = 0; c < l.length; c++) {
42952
42961
  const h = l[c];
@@ -43050,7 +43059,7 @@ class ht extends Va {
43050
43059
  selectedItem = void 0;
43051
43060
  debugCamera;
43052
43061
  raycaster = new Fa();
43053
- pointer = new gt();
43062
+ pointer = new yt();
43054
43063
  cameraControls = void 0;
43055
43064
  // References
43056
43065
  canvasRef;
@@ -43071,7 +43080,7 @@ class ht extends Va {
43071
43080
  lastUpdate: Date.now()
43072
43081
  }, s.setItem(`${t}_mode`, this.state.mode), s.setItem(`${t}_tlCam`, s.getItem(`${t}_tlCam`) !== null ? s.getItem(`${t}_tlCam`) : "Debug"), s.setItem(`${t}_trCam`, s.getItem(`${t}_trCam`) !== null ? s.getItem(`${t}_trCam`) : "Orthographic"), s.setItem(`${t}_blCam`, s.getItem(`${t}_blCam`) !== null ? s.getItem(`${t}_blCam`) : "Front"), s.setItem(`${t}_brCam`, s.getItem(`${t}_brCam`) !== null ? s.getItem(`${t}_brCam`) : "Top"), s.setItem(`${t}_tlRender`, s.getItem(`${t}_tlRender`) !== null ? s.getItem(`${t}_tlRender`) : "Renderer"), s.setItem(`${t}_trRender`, s.getItem(`${t}_trRender`) !== null ? s.getItem(`${t}_trRender`) : "Renderer"), s.setItem(`${t}_blRender`, s.getItem(`${t}_blRender`) !== null ? s.getItem(`${t}_blRender`) : "Renderer"), s.setItem(`${t}_brRender`, s.getItem(`${t}_brRender`) !== null ? s.getItem(`${t}_brRender`) : "Renderer");
43073
43082
  const n = {
43074
- Vector2: gt,
43083
+ Vector2: yt,
43075
43084
  Vector3: Z,
43076
43085
  Vector4: Dx,
43077
43086
  Quaternion: Jt,
@@ -43441,7 +43450,7 @@ class ht extends Va {
43441
43450
  t !== void 0 && (this.helpersContainer.remove(t), t.dispose()), this.cameras.delete(e.value.name), this.setState({ lastUpdate: Date.now() });
43442
43451
  };
43443
43452
  onMouseMove = (e) => {
43444
- const t = new gt();
43453
+ const t = new yt();
43445
43454
  this.renderer?.getSize(t);
43446
43455
  const s = Math.min(e.clientX, t.x), i = Math.min(e.clientY, t.y);
43447
43456
  this.pointer.x = an(s, 0, t.x, -1, 1), this.pointer.y = an(i, 0, t.y, 1, -1);
@@ -43467,7 +43476,7 @@ class ht extends Va {
43467
43476
  };
43468
43477
  onClick = (e) => {
43469
43478
  if (this.state.interactionMode === "Orbit" || this.currentScene === void 0) return;
43470
- const t = new gt();
43479
+ const t = new yt();
43471
43480
  if (this.renderer.getSize(t), e.clientX >= t.x) return;
43472
43481
  this.onMouseMove(e);
43473
43482
  const s = this.raycaster.intersectObjects(this.currentScene.children);
@@ -43556,7 +43565,7 @@ class ht extends Va {
43556
43565
  const s = this.controls.get(e.name);
43557
43566
  if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI") return;
43558
43567
  const i = new uN(e, t);
43559
- switch (i.enableDamping = !0, i.dampingFactor = 0.2, e.name) {
43568
+ switch (i.enableDamping = !0, i.dampingFactor = 0.1, e.name) {
43560
43569
  case "Top":
43561
43570
  case "Bottom":
43562
43571
  case "Left":
@@ -44468,7 +44477,7 @@ export {
44468
44477
  rl as noop,
44469
44478
  Dh as normalize,
44470
44479
  hP as parseModelLite,
44471
- yt as randomID,
44480
+ mt as randomID,
44472
44481
  Zd as resetThreeObjects,
44473
44482
  vs as round,
44474
44483
  lP as roundTo,
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.158",
10
+ "version": "0.0.159",
11
11
  "homepage": "https://github.com/tomorrowevening/hermes#readme",
12
12
  "bugs": {
13
13
  "url": "https://github.com/tomorrowevening/hermes/issues"
@@ -10,7 +10,7 @@ export interface InspectNumberProps {
10
10
  step?: number;
11
11
  disabled?: boolean;
12
12
  className?: string;
13
- labelRef: RefObject<HTMLLabelElement>;
13
+ labelRef: RefObject<HTMLElement>;
14
14
  onChange?: (prop: string, value: number) => void;
15
15
  }
16
16
  export default function InspectNumber(props: InspectNumberProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { RefObject } from 'react';
2
2
  interface DragProps {
3
- label: RefObject<HTMLLabelElement>;
3
+ label: RefObject<HTMLElement>;
4
4
  input: RefObject<HTMLInputElement>;
5
5
  sliderRef?: RefObject<HTMLInputElement>;
6
6
  defaultValue: number;