@zyzgroup/core-web 0.1.9 → 0.1.10
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/zyzgroup_core_web.iife.js +4 -4
- package/dist/zyzgroup_core_web.iife.js.map +1 -1
- package/dist/zyzgroup_core_web.js +14 -12
- package/dist/zyzgroup_core_web.js.map +1 -1
- package/dist/zyzgroup_core_web.umd.cjs +4 -4
- package/dist/zyzgroup_core_web.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/types/dom/DOMEventBus.d.ts +4 -4
- package/types/dom/DOMEventBus.d.ts.map +1 -1
- package/types/dom/DOMParse.d.ts +2 -2
- package/types/dom/DOMParse.d.ts.map +1 -1
- package/types/math/Shape.d.ts +2 -2
- package/types/math/Shape.d.ts.map +1 -1
- package/types/math/core/Box2.d.ts.map +1 -0
- package/types/math/{math/math → core}/Box3.d.ts +2 -2
- package/types/math/core/Box3.d.ts.map +1 -0
- package/types/math/{math/core → core}/BufferAttribute.d.ts +2 -2
- package/types/math/core/BufferAttribute.d.ts.map +1 -0
- package/types/math/core/Color.d.ts.map +1 -0
- package/types/math/core/ColorManagement.d.ts.map +1 -0
- package/types/math/core/Cylindrical.d.ts.map +1 -0
- package/types/math/core/Euler.d.ts.map +1 -0
- package/types/math/{math/math → core}/Frustum.d.ts +1 -1
- package/types/math/core/Frustum.d.ts.map +1 -0
- package/types/math/core/Layers.d.ts.map +1 -0
- package/types/math/core/Line3.d.ts.map +1 -0
- package/types/math/core/Matrix.d.ts.map +1 -0
- package/types/math/core/Matrix2.d.ts.map +1 -0
- package/types/math/core/Matrix3.d.ts.map +1 -0
- package/types/math/core/Matrix4.d.ts.map +1 -0
- package/types/math/{math/core → core}/Object3D.d.ts +10 -7
- package/types/math/core/Object3D.d.ts.map +1 -0
- package/types/math/core/Plane.d.ts.map +1 -0
- package/types/math/core/Quaternion.d.ts.map +1 -0
- package/types/math/core/Ray.d.ts.map +1 -0
- package/types/math/core/Sphere.d.ts.map +1 -0
- package/types/math/core/Spherical.d.ts.map +1 -0
- package/types/math/core/SphericalHarmonics3.d.ts.map +1 -0
- package/types/math/core/Triangle.d.ts.map +1 -0
- package/types/math/core/Vector.d.ts.map +1 -0
- package/types/math/{math/math → core}/Vector2.d.ts +1 -1
- package/types/math/core/Vector2.d.ts.map +1 -0
- package/types/math/{math/math → core}/Vector3.d.ts +1 -1
- package/types/math/core/Vector3.d.ts.map +1 -0
- package/types/math/core/Vector4.d.ts.map +1 -0
- package/types/math/{math → core}/constants.d.ts.map +1 -1
- package/types/math/core/index.d.ts +9 -0
- package/types/math/core/index.d.ts.map +1 -0
- package/types/math/index.d.ts +1 -1
- package/types/math/index.d.ts.map +1 -1
- package/types/math/math/cameras/Camera.d.ts +0 -11
- package/types/math/math/cameras/Camera.d.ts.map +1 -1
- package/types/math/math/controls/Controls.d.ts +0 -24
- package/types/math/math/controls/Controls.d.ts.map +1 -1
- package/types/math/math/core/GLBufferAttribute.d.ts +0 -18
- package/types/math/math/core/GLBufferAttribute.d.ts.map +1 -1
- package/types/math/math/core/BufferAttribute.d.ts.map +0 -1
- package/types/math/math/core/EventDispatcher.d.ts +0 -14
- package/types/math/math/core/EventDispatcher.d.ts.map +0 -1
- package/types/math/math/core/Layers.d.ts.map +0 -1
- package/types/math/math/core/Object3D.d.ts.map +0 -1
- package/types/math/math/index.d.ts +0 -10
- package/types/math/math/index.d.ts.map +0 -1
- package/types/math/math/math/Box2.d.ts.map +0 -1
- package/types/math/math/math/Box3.d.ts.map +0 -1
- package/types/math/math/math/Color.d.ts.map +0 -1
- package/types/math/math/math/ColorManagement.d.ts.map +0 -1
- package/types/math/math/math/Cylindrical.d.ts.map +0 -1
- package/types/math/math/math/Euler.d.ts.map +0 -1
- package/types/math/math/math/Frustum.d.ts.map +0 -1
- package/types/math/math/math/Line3.d.ts.map +0 -1
- package/types/math/math/math/Matrix.d.ts.map +0 -1
- package/types/math/math/math/Matrix2.d.ts.map +0 -1
- package/types/math/math/math/Matrix3.d.ts.map +0 -1
- package/types/math/math/math/Matrix4.d.ts.map +0 -1
- package/types/math/math/math/Plane.d.ts.map +0 -1
- package/types/math/math/math/Quaternion.d.ts.map +0 -1
- package/types/math/math/math/Ray.d.ts.map +0 -1
- package/types/math/math/math/Sphere.d.ts.map +0 -1
- package/types/math/math/math/Spherical.d.ts.map +0 -1
- package/types/math/math/math/SphericalHarmonics3.d.ts.map +0 -1
- package/types/math/math/math/Triangle.d.ts.map +0 -1
- package/types/math/math/math/Vector.d.ts.map +0 -1
- package/types/math/math/math/Vector2.d.ts.map +0 -1
- package/types/math/math/math/Vector3.d.ts.map +0 -1
- package/types/math/math/math/Vector4.d.ts.map +0 -1
- /package/types/math/{math/math → core}/Box2.d.ts +0 -0
- /package/types/math/{math/math → core}/Color.d.ts +0 -0
- /package/types/math/{math/math → core}/ColorManagement.d.ts +0 -0
- /package/types/math/{math/math → core}/Cylindrical.d.ts +0 -0
- /package/types/math/{math/math → core}/Euler.d.ts +0 -0
- /package/types/math/{math/core → core}/Layers.d.ts +0 -0
- /package/types/math/{math/math → core}/Line3.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix2.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix3.d.ts +0 -0
- /package/types/math/{math/math → core}/Matrix4.d.ts +0 -0
- /package/types/math/{math/math → core}/Plane.d.ts +0 -0
- /package/types/math/{math/math → core}/Quaternion.d.ts +0 -0
- /package/types/math/{math/math → core}/Ray.d.ts +0 -0
- /package/types/math/{math/math → core}/Sphere.d.ts +0 -0
- /package/types/math/{math/math → core}/Spherical.d.ts +0 -0
- /package/types/math/{math/math → core}/SphericalHarmonics3.d.ts +0 -0
- /package/types/math/{math/math → core}/Triangle.d.ts +0 -0
- /package/types/math/{math/math → core}/Vector.d.ts +0 -0
- /package/types/math/{math/math → core}/Vector4.d.ts +0 -0
- /package/types/math/{math → core}/constants.d.ts +0 -0
|
@@ -446,18 +446,20 @@ class ks {
|
|
|
446
446
|
constructor() {
|
|
447
447
|
this.events = {};
|
|
448
448
|
}
|
|
449
|
-
|
|
450
|
-
return this.events[t]
|
|
451
|
-
}
|
|
452
|
-
addListener(t, e) {
|
|
453
|
-
return this.on(t, e), this;
|
|
449
|
+
has(t, e) {
|
|
450
|
+
return this.events[t] !== void 0 && this.events[t].indexOf(e) !== -1;
|
|
454
451
|
}
|
|
455
452
|
prependListener(t, e) {
|
|
456
453
|
return this.events[t] || (this.events[t] = []), this.events[t].unshift(e), this;
|
|
457
454
|
}
|
|
455
|
+
addListener(t, e) {
|
|
456
|
+
return this.events[t] || (this.events[t] = []), this.events[t].push(e), this;
|
|
457
|
+
}
|
|
458
|
+
on(t, e) {
|
|
459
|
+
return this.addListener(t, e), this;
|
|
460
|
+
}
|
|
458
461
|
removeListener(t, e) {
|
|
459
|
-
|
|
460
|
-
return this.events[t] = this.events[t].filter((s) => s !== e), this;
|
|
462
|
+
return this.events[t] && (this.events[t] = this.events[t].filter((s) => s !== e)), this;
|
|
461
463
|
}
|
|
462
464
|
off(t, e) {
|
|
463
465
|
return this.removeListener(t, e), this;
|
|
@@ -466,8 +468,8 @@ class ks {
|
|
|
466
468
|
return t ? this.events[t] = [] : this.events = {}, this;
|
|
467
469
|
}
|
|
468
470
|
emit(t, ...e) {
|
|
469
|
-
return this.events[t] && this.events[t].forEach((
|
|
470
|
-
|
|
471
|
+
return this.events[t] && this.events[t].slice(0).forEach((i) => {
|
|
472
|
+
i(...e);
|
|
471
473
|
}), this;
|
|
472
474
|
}
|
|
473
475
|
once(t, e) {
|
|
@@ -11633,7 +11635,7 @@ class sd extends ks {
|
|
|
11633
11635
|
}, tt = (D) => {
|
|
11634
11636
|
this.emit("dragend", D);
|
|
11635
11637
|
}, kt = (D) => {
|
|
11636
|
-
D.dataTransfer, this.emit("drop", D, D.dataTransfer?.files);
|
|
11638
|
+
D.dataTransfer, this.emit("drop", D, D.dataTransfer?.files || null);
|
|
11637
11639
|
};
|
|
11638
11640
|
this.container.addEventListener("mousedown", t, !1), this.container.addEventListener("mouseup", e, !1), this.container.addEventListener("mousemove", s, !1), this.container.addEventListener("mouseover", i, !1), this.container.addEventListener("mouseout", r, !1), this.container.addEventListener("mouseenter", o, !1), this.container.addEventListener("mouseleave", a, !1), this.container.addEventListener("click", h, !1), this.container.addEventListener("dblclick", c, !1), this.container.addEventListener("wheel", l, !1), this.container.addEventListener("contextmenu", f, !1), this.container.addEventListener("touchstart", g, !1), this.container.addEventListener("touchend", x, !1), this.container.addEventListener("touchcancel", y, !1), this.container.addEventListener("touchmove", E, !1), this.container.addEventListener("pointerdown", v, !1), this.container.addEventListener("pointerup", b, !1), this.container.addEventListener("pointercancel", w, !1), this.container.addEventListener("pointermove", m, !1), this.hammer.on("pan", p), this.hammer.on("panstart", P), this.hammer.on("panmove", S), this.hammer.on("panend", O), this.hammer.on("pancancel", z), this.hammer.on("panleft", G), this.hammer.on("panright", J), this.hammer.on("panup", Z), this.hammer.on("pandown", it), this.hammer.on("pinch", Tt), this.hammer.on("press", dt), this.hammer.on("rotate", ye), this.hammer.on("swipe", Ht), this.hammer.on("swipeleft", ie), this.hammer.on("swiperight", we), this.hammer.on("swipeup", L), this.hammer.on("swipedown", M), this.hammer.on("tap", F), document.addEventListener("pointerdown", V, !1), this.container instanceof HTMLInputElement && this.container.addEventListener("change", ot, !1), this.container.addEventListener("dragstart", At, !1), this.container.addEventListener("dragover", Ze, !1), this.container.addEventListener("dragenter", Ke, !1), this.container.addEventListener("dragend", tt, !1), this.container.addEventListener("drop", kt, !1);
|
|
11639
11641
|
const W = () => {
|
|
@@ -12582,7 +12584,7 @@ class nd {
|
|
|
12582
12584
|
}), this.app.on("tap", () => {
|
|
12583
12585
|
for (const r of this.shapes)
|
|
12584
12586
|
if (this.currentMouseInShape == r) {
|
|
12585
|
-
r.emit("clicked");
|
|
12587
|
+
r.emit("clicked", r);
|
|
12586
12588
|
let o = r.parent;
|
|
12587
12589
|
for (; o; )
|
|
12588
12590
|
o.emit("clicked", r), o = o.parent;
|
|
@@ -15474,7 +15476,7 @@ class am {
|
|
|
15474
15476
|
}), this.app.on("tap", () => {
|
|
15475
15477
|
for (const s of this.shapes)
|
|
15476
15478
|
if (this.currentMouseInShape == s) {
|
|
15477
|
-
s.emit("clicked");
|
|
15479
|
+
s.emit("clicked", s);
|
|
15478
15480
|
let i = s.parent;
|
|
15479
15481
|
for (; i; )
|
|
15480
15482
|
i.emit("clicked", s), i = i.parent;
|