vis-core 0.21.30 → 0.21.31
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/index.js +11 -11
- package/dist/index.module.js +20 -20
- package/dist/version.d.ts +1 -1
- package/dist/vis/city/index.d.ts +2 -1
- package/dist/vis/city/objects/index.d.ts +3 -2
- package/dist/vis/map2/city.d.ts +2 -1
- package/dist/vis/map2/map.d.ts +2 -1
- package/dist/vis/map2/objects/index.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.module.js
CHANGED
|
@@ -4575,7 +4575,7 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
|
4575
4575
|
}
|
|
4576
4576
|
}
|
|
4577
4577
|
const _vector1 = /* @__PURE__ */ new Vector3(), _vector2 = /* @__PURE__ */ new Vector3(), _normalMatrix$1 = /* @__PURE__ */ new Matrix3();
|
|
4578
|
-
let Plane$
|
|
4578
|
+
let Plane$1 = class {
|
|
4579
4579
|
constructor(e = new Vector3(1, 0, 0), c = 0) {
|
|
4580
4580
|
this.isPlane = !0, this.normal = e, this.constant = c;
|
|
4581
4581
|
}
|
|
@@ -4647,7 +4647,7 @@ let Plane$2 = class {
|
|
|
4647
4647
|
};
|
|
4648
4648
|
const _sphere$5 = /* @__PURE__ */ new Sphere$1(), _vector$7 = /* @__PURE__ */ new Vector3();
|
|
4649
4649
|
class Frustum {
|
|
4650
|
-
constructor(e = new Plane$
|
|
4650
|
+
constructor(e = new Plane$1(), c = new Plane$1(), st = new Plane$1(), Zt = new Plane$1(), Wt = new Plane$1(), Yt = new Plane$1()) {
|
|
4651
4651
|
this.planes = [e, c, st, Zt, Wt, Yt];
|
|
4652
4652
|
}
|
|
4653
4653
|
set(e, c, st, Zt, Wt, Yt) {
|
|
@@ -9343,7 +9343,7 @@ function WebGLCapabilities(ct, e, c, st) {
|
|
|
9343
9343
|
function WebGLClipping(ct) {
|
|
9344
9344
|
const e = this;
|
|
9345
9345
|
let c = null, st = 0, Zt = !1, Wt = !1;
|
|
9346
|
-
const Yt = new Plane$
|
|
9346
|
+
const Yt = new Plane$1(), vt = new Matrix3(), Tt = { value: null, needsUpdate: !1 };
|
|
9347
9347
|
this.uniform = Tt, this.numPlanes = 0, this.numIntersection = 0, this.init = function(de, Xe) {
|
|
9348
9348
|
const Ke = de.length !== 0 || Xe || // enable state of previous frame - the clipping code has to
|
|
9349
9349
|
// run another frame in order to reset the state:
|
|
@@ -22136,7 +22136,7 @@ const THREE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
22136
22136
|
PMREMGenerator,
|
|
22137
22137
|
Path: Path$1,
|
|
22138
22138
|
PerspectiveCamera,
|
|
22139
|
-
Plane: Plane$
|
|
22139
|
+
Plane: Plane$1,
|
|
22140
22140
|
PlaneGeometry,
|
|
22141
22141
|
PlaneHelper,
|
|
22142
22142
|
PointLight,
|
|
@@ -31369,7 +31369,7 @@ const closestPointLineToLine = function() {
|
|
|
31369
31369
|
}
|
|
31370
31370
|
};
|
|
31371
31371
|
}(), sphereIntersectTriangle = function() {
|
|
31372
|
-
const ct = new Vector3(), e = new Vector3(), c = new Plane$
|
|
31372
|
+
const ct = new Vector3(), e = new Vector3(), c = new Plane$1(), st = new Line3();
|
|
31373
31373
|
return function(Wt, Yt) {
|
|
31374
31374
|
const { radius: vt, center: Tt } = Wt, { a: Jt, b: $t, c: de } = Yt;
|
|
31375
31375
|
if (st.start = Jt, st.end = $t, st.closestPointToPoint(Tt, !0, ct).distanceTo(Tt) <= vt || (st.start = Jt, st.end = de, st.closestPointToPoint(Tt, !0, ct).distanceTo(Tt) <= vt) || (st.start = $t, st.end = de, st.closestPointToPoint(Tt, !0, ct).distanceTo(Tt) <= vt)) return !0;
|
|
@@ -31386,7 +31386,7 @@ function isNearZero(ct) {
|
|
|
31386
31386
|
}
|
|
31387
31387
|
class ExtendedTriangle extends Triangle {
|
|
31388
31388
|
constructor(...e) {
|
|
31389
|
-
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new Vector3()), this.satBounds = new Array(4).fill().map(() => new SeparatingAxisBounds()), this.points = [this.a, this.b, this.c], this.sphere = new Sphere$1(), this.plane = new Plane$
|
|
31389
|
+
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new Vector3()), this.satBounds = new Array(4).fill().map(() => new SeparatingAxisBounds()), this.points = [this.a, this.b, this.c], this.sphere = new Sphere$1(), this.plane = new Plane$1(), this.needsUpdate = !0;
|
|
31390
31390
|
}
|
|
31391
31391
|
intersectsSphere(e) {
|
|
31392
31392
|
return sphereIntersectTriangle(e, this);
|
|
@@ -32894,7 +32894,7 @@ function isTriDegenerate(ct, e = EPSILON$1) {
|
|
|
32894
32894
|
const c = _AB.angleTo(_AC), st = _AB.angleTo(_CB), Zt = Math.PI - c - st;
|
|
32895
32895
|
return Math.abs(c) < e || Math.abs(st) < e || Math.abs(Zt) < e || ct.a.distanceToSquared(ct.b) < e || ct.a.distanceToSquared(ct.c) < e || ct.b.distanceToSquared(ct.c) < e;
|
|
32896
32896
|
}
|
|
32897
|
-
const EPSILON = 1e-10, COPLANAR_EPSILON = 1e-10, PARALLEL_EPSILON = 1e-10, _edge$1 = new Line3(), _foundEdge = new Line3(), _vec = new Vector3(), _triangleNormal = new Vector3(), _planeNormal = new Vector3(), _plane = new Plane$
|
|
32897
|
+
const EPSILON = 1e-10, COPLANAR_EPSILON = 1e-10, PARALLEL_EPSILON = 1e-10, _edge$1 = new Line3(), _foundEdge = new Line3(), _vec = new Vector3(), _triangleNormal = new Vector3(), _planeNormal = new Vector3(), _plane = new Plane$1(), _splittingTriangle = new ExtendedTriangle();
|
|
32898
32898
|
class TrianglePool {
|
|
32899
32899
|
constructor() {
|
|
32900
32900
|
this._pool = [], this._index = 0;
|
|
@@ -38197,7 +38197,7 @@ class Octahedron extends D$1 {
|
|
|
38197
38197
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
38198
38198
|
}
|
|
38199
38199
|
}
|
|
38200
|
-
class Plane
|
|
38200
|
+
class Plane extends D$1 {
|
|
38201
38201
|
create() {
|
|
38202
38202
|
const e = new PlaneGeometry(1, 1, 2, 2);
|
|
38203
38203
|
this.createMesh(e), this.scale.multiplyScalar(20);
|
|
@@ -38283,7 +38283,7 @@ const baseObjs = {
|
|
|
38283
38283
|
Arc,
|
|
38284
38284
|
Model
|
|
38285
38285
|
}, expObjs = {
|
|
38286
|
-
Plane
|
|
38286
|
+
Plane,
|
|
38287
38287
|
CrossPlane,
|
|
38288
38288
|
PlaneShadow,
|
|
38289
38289
|
Ring,
|
|
@@ -48310,7 +48310,7 @@ function createAreaLightMaterial(ct) {
|
|
|
48310
48310
|
const e = new MeshBasicMaterial();
|
|
48311
48311
|
return e.color.setScalar(ct), e;
|
|
48312
48312
|
}
|
|
48313
|
-
const version = "0.21.
|
|
48313
|
+
const version = "0.21.31";
|
|
48314
48314
|
class Event {
|
|
48315
48315
|
constructor() {
|
|
48316
48316
|
J0(this, "event", new EventEmitter());
|
|
@@ -51638,7 +51638,7 @@ const PENCIL_CONFIG$3 = {
|
|
|
51638
51638
|
class Reflector extends Mesh {
|
|
51639
51639
|
constructor(e, c = {}) {
|
|
51640
51640
|
super(e), this.isReflector = !0, this.type = "Reflector", this.camera = new PerspectiveCamera();
|
|
51641
|
-
const st = this, Zt = c.color !== void 0 ? new Color$1(c.color) : new Color$1(8355711), Wt = c.textureWidth || 512, Yt = c.textureHeight || 512, vt = c.clipBias || 0, Tt = c.shader || Reflector.ReflectorShader, Jt = c.multisample !== void 0 ? c.multisample : 4, $t = new Plane$
|
|
51641
|
+
const st = this, Zt = c.color !== void 0 ? new Color$1(c.color) : new Color$1(8355711), Wt = c.textureWidth || 512, Yt = c.textureHeight || 512, vt = c.clipBias || 0, Tt = c.shader || Reflector.ReflectorShader, Jt = c.multisample !== void 0 ? c.multisample : 4, $t = new Plane$1(), de = new Vector3(), Xe = new Vector3(), Ke = new Vector3(), Qe = new Matrix4(), qe = new Vector3(0, 0, -1), $e = new Vector4(), Je = new Vector3(), _e = new Vector3(), t0 = new Vector4(), e0 = new Matrix4(), i0 = this.camera, n0 = new WebGLRenderTarget(Wt, Yt, { samples: Jt, type: HalfFloatType }), s0 = new ShaderMaterial({
|
|
51642
51642
|
name: Tt.name !== void 0 ? Tt.name : "unspecified",
|
|
51643
51643
|
uniforms: UniformsUtils.clone(Tt.uniforms),
|
|
51644
51644
|
fragmentShader: Tt.fragmentShader,
|
|
@@ -51748,7 +51748,7 @@ class Refractor extends Mesh {
|
|
|
51748
51748
|
super(e), this.isRefractor = !0, this.type = "Refractor", this.camera = new PerspectiveCamera();
|
|
51749
51749
|
const st = this, Zt = c.color !== void 0 ? new Color$1(c.color) : new Color$1(8355711), Wt = c.textureWidth || 512, Yt = c.textureHeight || 512, vt = c.clipBias || 0, Tt = c.shader || Refractor.RefractorShader, Jt = c.multisample !== void 0 ? c.multisample : 4, $t = this.camera;
|
|
51750
51750
|
$t.matrixAutoUpdate = !1, $t.userData.refractor = !0;
|
|
51751
|
-
const de = new Plane$
|
|
51751
|
+
const de = new Plane$1(), Xe = new Matrix4(), Ke = new WebGLRenderTarget(Wt, Yt, { samples: Jt, type: HalfFloatType });
|
|
51752
51752
|
this.material = new ShaderMaterial({
|
|
51753
51753
|
name: Tt.name !== void 0 ? Tt.name : "unspecified",
|
|
51754
51754
|
uniforms: UniformsUtils.clone(Tt.uniforms),
|
|
@@ -51768,7 +51768,7 @@ class Refractor extends Mesh {
|
|
|
51768
51768
|
st.matrixWorld.decompose(e0, i0, n0), t0.set(0, 0, 1).applyQuaternion(i0).normalize(), t0.negate(), de.setFromNormalAndCoplanarPoint(t0, e0);
|
|
51769
51769
|
};
|
|
51770
51770
|
}(), $e = function() {
|
|
51771
|
-
const t0 = new Plane$
|
|
51771
|
+
const t0 = new Plane$1(), e0 = new Vector4(), i0 = new Vector4();
|
|
51772
51772
|
return function(s0) {
|
|
51773
51773
|
$t.matrixWorld.copy(s0.matrixWorld), $t.matrixWorldInverse.copy($t.matrixWorld).invert(), $t.projectionMatrix.copy(s0.projectionMatrix), $t.far = s0.far, t0.copy(de), t0.applyMatrix4($t.matrixWorldInverse), e0.set(t0.normal.x, t0.normal.y, t0.normal.z, t0.constant);
|
|
51774
51774
|
const l0 = $t.projectionMatrix;
|
|
@@ -52084,7 +52084,7 @@ Water.WaterShader = {
|
|
|
52084
52084
|
}`
|
|
52085
52085
|
)
|
|
52086
52086
|
};
|
|
52087
|
-
class
|
|
52087
|
+
class CityPlane extends D$1 {
|
|
52088
52088
|
constructor(c) {
|
|
52089
52089
|
super();
|
|
52090
52090
|
J0(this, "options");
|
|
@@ -52618,7 +52618,7 @@ const objs$3 = Ei(bi({}, objs$5), {
|
|
|
52618
52618
|
PlaneMap: PlaneMap$1,
|
|
52619
52619
|
ContinentsBg,
|
|
52620
52620
|
Mountain: PlaneMap,
|
|
52621
|
-
|
|
52621
|
+
CityPlane,
|
|
52622
52622
|
Building,
|
|
52623
52623
|
Area,
|
|
52624
52624
|
Road,
|
|
@@ -52898,7 +52898,7 @@ const objs$3 = Ei(bi({}, objs$5), {
|
|
|
52898
52898
|
const Wt = ct.loader.getAsset("/image/map2/plane.webp");
|
|
52899
52899
|
Wt.wrapS = RepeatWrapping, Wt.wrapT = RepeatWrapping, Wt.repeat.set(4, 4);
|
|
52900
52900
|
const Yt = yield ct.drawController.draw(
|
|
52901
|
-
"
|
|
52901
|
+
"CityPlane",
|
|
52902
52902
|
{
|
|
52903
52903
|
width: c,
|
|
52904
52904
|
height: st,
|
|
@@ -53171,7 +53171,7 @@ class Map$1 extends Map$2 {
|
|
|
53171
53171
|
duration: 0
|
|
53172
53172
|
}), this.options.bottomPlane) {
|
|
53173
53173
|
const vt = yield this.drawController.draw(
|
|
53174
|
-
"
|
|
53174
|
+
"CityPlane",
|
|
53175
53175
|
{
|
|
53176
53176
|
width: st,
|
|
53177
53177
|
height: Zt,
|
|
@@ -53222,12 +53222,12 @@ const objs$2 = Ei(bi({}, objs$5), {
|
|
|
53222
53222
|
Building,
|
|
53223
53223
|
Road,
|
|
53224
53224
|
Area,
|
|
53225
|
-
|
|
53225
|
+
CityPlane,
|
|
53226
53226
|
Target
|
|
53227
53227
|
}), setWaterMaterial = (ct, e = {}) => {
|
|
53228
53228
|
const c = e.textureWidth !== void 0 ? e.textureWidth : 512, st = e.textureHeight !== void 0 ? e.textureHeight : 512, Zt = e.alpha !== void 0 ? e.alpha : 1, Wt = e.waterNormals !== void 0 ? e.waterNormals : null, Yt = new Color$1(
|
|
53229
53229
|
e.waterColor !== void 0 ? e.waterColor : ct.material.color
|
|
53230
|
-
), vt = e.eye !== void 0 ? e.eye : new Vector3(0, 0, 0), Tt = e.distortionScale !== void 0 ? e.distortionScale : 0, Jt = e.side !== void 0 ? e.side : FrontSide, $t = e.fog !== void 0 ? e.fog : !1, de = new Plane$
|
|
53230
|
+
), vt = e.eye !== void 0 ? e.eye : new Vector3(0, 0, 0), Tt = e.distortionScale !== void 0 ? e.distortionScale : 0, Jt = e.side !== void 0 ? e.side : FrontSide, $t = e.fog !== void 0 ? e.fog : !1, de = new Plane$1(), Xe = new Vector3(), Ke = new Vector3(), Qe = new Vector3(), qe = new Matrix4(), $e = new Vector3(0, 0, -1), Je = new Vector4(), _e = new Vector3(), t0 = new Vector3(), e0 = new Vector4(), i0 = new Matrix4(), n0 = new PerspectiveCamera(), s0 = new WebGLRenderTarget(c, st), l0 = {
|
|
53231
53231
|
name: "MirrorShader",
|
|
53232
53232
|
uniforms: UniformsUtils.merge([
|
|
53233
53233
|
UniformsLib.fog,
|
|
@@ -53606,7 +53606,7 @@ class City$1 extends Base {
|
|
|
53606
53606
|
qe = n0, $e = s0, Je.set((i0[0] + e0[0]) / 2, -(i0[1] + e0[1]) / 2, -0.05);
|
|
53607
53607
|
}
|
|
53608
53608
|
const _e = this.mList.getMaterial("city-plane"), t0 = yield this.drawController.draw(
|
|
53609
|
-
"
|
|
53609
|
+
"CityPlane",
|
|
53610
53610
|
{
|
|
53611
53611
|
width: qe * 10,
|
|
53612
53612
|
height: $e * 10,
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "0.21.
|
|
1
|
+
declare const _default: "0.21.31";
|
|
2
2
|
export default _default;
|
package/dist/vis/city/index.d.ts
CHANGED
|
@@ -38,8 +38,9 @@ export default class extends Base {
|
|
|
38
38
|
Building: typeof Building;
|
|
39
39
|
Road: typeof Road;
|
|
40
40
|
Area: typeof import("./objects/area").default;
|
|
41
|
-
|
|
41
|
+
CityPlane: typeof import("./objects/plane").default;
|
|
42
42
|
Target: typeof import("./objects/target").default;
|
|
43
|
+
Plane: typeof import("../all/objects/Plane").default;
|
|
43
44
|
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
44
45
|
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
45
46
|
Ring: typeof import("../all/objects/Ring").default;
|
|
@@ -2,14 +2,15 @@ import { Draw as DrawController } from 'gl-draw/dist/plugins';
|
|
|
2
2
|
import Building from './building';
|
|
3
3
|
import Road from './road';
|
|
4
4
|
import Area from './area';
|
|
5
|
-
import
|
|
5
|
+
import CityPlane from './plane';
|
|
6
6
|
import Target from './target';
|
|
7
7
|
declare const objs: {
|
|
8
8
|
Building: typeof Building;
|
|
9
9
|
Road: typeof Road;
|
|
10
10
|
Area: typeof Area;
|
|
11
|
-
|
|
11
|
+
CityPlane: typeof CityPlane;
|
|
12
12
|
Target: typeof Target;
|
|
13
|
+
Plane: typeof import("../../all/objects/Plane").default;
|
|
13
14
|
CrossPlane: typeof import("../../all/objects/CrossPlane").default;
|
|
14
15
|
PlaneShadow: typeof import("../../all/objects/PlaneShadow").default;
|
|
15
16
|
Ring: typeof import("../../all/objects/Ring").default;
|
package/dist/vis/map2/city.d.ts
CHANGED
|
@@ -4,11 +4,12 @@ export default class extends City {
|
|
|
4
4
|
PlaneMap: typeof import("../map/objects/PlaneMap").default;
|
|
5
5
|
ContinentsBg: typeof import("../map/objects/ContinentsBg").default;
|
|
6
6
|
Mountain: typeof import("../map/objects/Mountain").default;
|
|
7
|
-
|
|
7
|
+
CityPlane: typeof import("../city/objects/plane").default;
|
|
8
8
|
Building: typeof import("../city/objects/building").default;
|
|
9
9
|
Area: typeof import("../city/objects/area").default;
|
|
10
10
|
Road: typeof import("../city/objects/road").default;
|
|
11
11
|
Target: typeof import("../city/objects/target").default;
|
|
12
|
+
Plane: typeof import("../all/objects/Plane").default;
|
|
12
13
|
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
13
14
|
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
14
15
|
Ring: typeof import("../all/objects/Ring").default;
|
package/dist/vis/map2/map.d.ts
CHANGED
|
@@ -15,11 +15,12 @@ export default class extends Map {
|
|
|
15
15
|
PlaneMap: typeof import("../map/objects/PlaneMap").default;
|
|
16
16
|
ContinentsBg: typeof import("../map/objects/ContinentsBg").default;
|
|
17
17
|
Mountain: typeof import("../map/objects/Mountain").default;
|
|
18
|
-
|
|
18
|
+
CityPlane: typeof import("../city/objects/plane").default;
|
|
19
19
|
Building: typeof import("../city/objects/building").default;
|
|
20
20
|
Area: typeof import("../city/objects/area").default;
|
|
21
21
|
Road: typeof import("../city/objects/road").default;
|
|
22
22
|
Target: typeof import("../city/objects/target").default;
|
|
23
|
+
Plane: typeof import("../all/objects/Plane").default;
|
|
23
24
|
CrossPlane: typeof import("../all/objects/CrossPlane").default;
|
|
24
25
|
PlaneShadow: typeof import("../all/objects/PlaneShadow").default;
|
|
25
26
|
Ring: typeof import("../all/objects/Ring").default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import PlaneMap from "../../map/objects/PlaneMap";
|
|
2
2
|
import Mountain from "../../map/objects/Mountain";
|
|
3
3
|
import ContinentsBg from "../../map/objects/ContinentsBg";
|
|
4
|
-
import
|
|
4
|
+
import CityPlane from "../../city/objects/plane";
|
|
5
5
|
import Building from "../../city/objects/building";
|
|
6
6
|
import Area from "../../city/objects/area";
|
|
7
7
|
import Road from "../../city/objects/road";
|
|
@@ -10,11 +10,12 @@ declare const objs: {
|
|
|
10
10
|
PlaneMap: typeof PlaneMap;
|
|
11
11
|
ContinentsBg: typeof ContinentsBg;
|
|
12
12
|
Mountain: typeof Mountain;
|
|
13
|
-
|
|
13
|
+
CityPlane: typeof CityPlane;
|
|
14
14
|
Building: typeof Building;
|
|
15
15
|
Area: typeof Area;
|
|
16
16
|
Road: typeof Road;
|
|
17
17
|
Target: typeof Target;
|
|
18
|
+
Plane: typeof import("../../all/objects/Plane").default;
|
|
18
19
|
CrossPlane: typeof import("../../all/objects/CrossPlane").default;
|
|
19
20
|
PlaneShadow: typeof import("../../all/objects/PlaneShadow").default;
|
|
20
21
|
Ring: typeof import("../../all/objects/Ring").default;
|