@splnlss/3d-story-viewer 0.8.0 → 0.8.2
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/build/computeElevation.cjs +1 -1
- package/build/computeElevation.js +2 -2
- package/build/{index-Hz3jbrou.js → index-BgprA821.js} +166 -77
- package/build/index-XZNzHig1.cjs +1 -0
- package/build/{main-Bdopx4KL.js → main-BUCkukV4.js} +7919 -7105
- package/build/main-yri0wVzb.cjs +1 -0
- package/build/{spark.module-BUdzSHba.cjs → spark.module-CKmN4uMZ.cjs} +1 -1
- package/build/{spark.module-B1FWS-vq.js → spark.module-T7c-X7OV.js} +2 -2
- package/build/types/src/viewer/ContentLayer/TilesLayer.d.ts +4 -4
- package/build/types/src/viewer/GlobeManager.d.ts +3 -2
- package/build/types/src/viewer/TileDecoders.d.ts +11 -0
- package/build/types/src/viewer/WebXRSession.d.ts +75 -0
- package/build/types/src/viewer/XRAttributionPanel.d.ts +23 -0
- package/build/types/src/viewer/XRComfortOverlay.d.ts +15 -0
- package/build/types/src/viewer/XRFrameInput.d.ts +30 -0
- package/build/types/src/viewer/XRNavigationCue.d.ts +10 -0
- package/build/types/src/viewer/XRPlayerRig.d.ts +48 -0
- package/build/types/src/viewer/XRRenderBridge.d.ts +25 -0
- package/build/types/src/viewer/index.d.ts +84 -0
- package/build/types/src/viewer/updateTilesCamera.d.ts +2 -0
- package/build/viewer.cjs +1 -1
- package/build/viewer.js +3 -3
- package/package.json +1 -1
- package/build/index-D87IZDc6.cjs +0 -1
- package/build/main-CaYKxosA.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-XZNzHig1.cjs");module.exports=e.computeElevation;
|
|
@@ -14837,6 +14837,84 @@ class PlaneGeometry extends BufferGeometry {
|
|
|
14837
14837
|
return new PlaneGeometry(data.width, data.height, data.widthSegments, data.heightSegments);
|
|
14838
14838
|
}
|
|
14839
14839
|
}
|
|
14840
|
+
class RingGeometry extends BufferGeometry {
|
|
14841
|
+
/**
|
|
14842
|
+
* Constructs a new ring geometry.
|
|
14843
|
+
*
|
|
14844
|
+
* @param {number} [innerRadius=0.5] - The inner radius of the ring.
|
|
14845
|
+
* @param {number} [outerRadius=1] - The outer radius of the ring.
|
|
14846
|
+
* @param {number} [thetaSegments=32] - Number of segments. A higher number means the ring will be more round. Minimum is `3`.
|
|
14847
|
+
* @param {number} [phiSegments=1] - Number of segments per ring segment. Minimum is `1`.
|
|
14848
|
+
* @param {number} [thetaStart=0] - Starting angle in radians.
|
|
14849
|
+
* @param {number} [thetaLength=Math.PI*2] - Central angle in radians.
|
|
14850
|
+
*/
|
|
14851
|
+
constructor(innerRadius = 0.5, outerRadius = 1, thetaSegments = 32, phiSegments = 1, thetaStart = 0, thetaLength = Math.PI * 2) {
|
|
14852
|
+
super();
|
|
14853
|
+
this.type = "RingGeometry";
|
|
14854
|
+
this.parameters = {
|
|
14855
|
+
innerRadius,
|
|
14856
|
+
outerRadius,
|
|
14857
|
+
thetaSegments,
|
|
14858
|
+
phiSegments,
|
|
14859
|
+
thetaStart,
|
|
14860
|
+
thetaLength
|
|
14861
|
+
};
|
|
14862
|
+
thetaSegments = Math.max(3, thetaSegments);
|
|
14863
|
+
phiSegments = Math.max(1, phiSegments);
|
|
14864
|
+
const indices = [];
|
|
14865
|
+
const vertices = [];
|
|
14866
|
+
const normals = [];
|
|
14867
|
+
const uvs = [];
|
|
14868
|
+
let radius = innerRadius;
|
|
14869
|
+
const radiusStep = (outerRadius - innerRadius) / phiSegments;
|
|
14870
|
+
const vertex2 = new Vector3$1();
|
|
14871
|
+
const uv = new Vector2();
|
|
14872
|
+
for (let j = 0; j <= phiSegments; j++) {
|
|
14873
|
+
for (let i = 0; i <= thetaSegments; i++) {
|
|
14874
|
+
const segment = thetaStart + i / thetaSegments * thetaLength;
|
|
14875
|
+
vertex2.x = radius * Math.cos(segment);
|
|
14876
|
+
vertex2.y = radius * Math.sin(segment);
|
|
14877
|
+
vertices.push(vertex2.x, vertex2.y, vertex2.z);
|
|
14878
|
+
normals.push(0, 0, 1);
|
|
14879
|
+
uv.x = (vertex2.x / outerRadius + 1) / 2;
|
|
14880
|
+
uv.y = (vertex2.y / outerRadius + 1) / 2;
|
|
14881
|
+
uvs.push(uv.x, uv.y);
|
|
14882
|
+
}
|
|
14883
|
+
radius += radiusStep;
|
|
14884
|
+
}
|
|
14885
|
+
for (let j = 0; j < phiSegments; j++) {
|
|
14886
|
+
const thetaSegmentLevel = j * (thetaSegments + 1);
|
|
14887
|
+
for (let i = 0; i < thetaSegments; i++) {
|
|
14888
|
+
const segment = i + thetaSegmentLevel;
|
|
14889
|
+
const a = segment;
|
|
14890
|
+
const b = segment + thetaSegments + 1;
|
|
14891
|
+
const c = segment + thetaSegments + 2;
|
|
14892
|
+
const d = segment + 1;
|
|
14893
|
+
indices.push(a, b, d);
|
|
14894
|
+
indices.push(b, c, d);
|
|
14895
|
+
}
|
|
14896
|
+
}
|
|
14897
|
+
this.setIndex(indices);
|
|
14898
|
+
this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
|
|
14899
|
+
this.setAttribute("normal", new Float32BufferAttribute(normals, 3));
|
|
14900
|
+
this.setAttribute("uv", new Float32BufferAttribute(uvs, 2));
|
|
14901
|
+
}
|
|
14902
|
+
copy(source) {
|
|
14903
|
+
super.copy(source);
|
|
14904
|
+
this.parameters = Object.assign({}, source.parameters);
|
|
14905
|
+
return this;
|
|
14906
|
+
}
|
|
14907
|
+
/**
|
|
14908
|
+
* Factory method for creating an instance of this class from the given
|
|
14909
|
+
* JSON object.
|
|
14910
|
+
*
|
|
14911
|
+
* @param {Object} data - A JSON object representing the serialized geometry.
|
|
14912
|
+
* @return {RingGeometry} A new instance.
|
|
14913
|
+
*/
|
|
14914
|
+
static fromJSON(data) {
|
|
14915
|
+
return new RingGeometry(data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength);
|
|
14916
|
+
}
|
|
14917
|
+
}
|
|
14840
14918
|
function cloneUniforms(src) {
|
|
14841
14919
|
const dst = {};
|
|
14842
14920
|
for (const u in src) {
|
|
@@ -31445,6 +31523,15 @@ function getEnuBasis(longitude, latitude) {
|
|
|
31445
31523
|
up: [cosLatitude * cosLongitude, cosLatitude * sinLongitude, sinLatitude]
|
|
31446
31524
|
};
|
|
31447
31525
|
}
|
|
31526
|
+
function enuToEcefDelta(translation, longitude, latitude) {
|
|
31527
|
+
validateTuple(translation, "ENU translation");
|
|
31528
|
+
const { east, north, up } = getEnuBasis(longitude, latitude);
|
|
31529
|
+
return [
|
|
31530
|
+
east[0] * translation[0] + north[0] * translation[1] + up[0] * translation[2],
|
|
31531
|
+
east[1] * translation[0] + north[1] * translation[1] + up[1] * translation[2],
|
|
31532
|
+
east[2] * translation[0] + north[2] * translation[1] + up[2] * translation[2]
|
|
31533
|
+
];
|
|
31534
|
+
}
|
|
31448
31535
|
function geodeticOffsetToEcefDelta(position, offset) {
|
|
31449
31536
|
validateLongitudeLatitude(position.lon, position.lat, "Layer root");
|
|
31450
31537
|
requireFiniteNumber(position.alt, "Layer root altitude");
|
|
@@ -39283,7 +39370,7 @@ export {
|
|
|
39283
39370
|
SkinnedMesh as Z,
|
|
39284
39371
|
LineSegments as _,
|
|
39285
39372
|
Vector2 as a,
|
|
39286
|
-
|
|
39373
|
+
RGB_BPTC_UNSIGNED_Format as a$,
|
|
39287
39374
|
LineLoop as a0,
|
|
39288
39375
|
Points as a1,
|
|
39289
39376
|
Group as a2,
|
|
@@ -39294,33 +39381,33 @@ export {
|
|
|
39294
39381
|
Bone as a7,
|
|
39295
39382
|
InterpolateDiscrete as a8,
|
|
39296
39383
|
InterpolateLinear as a9,
|
|
39297
|
-
|
|
39298
|
-
|
|
39299
|
-
|
|
39300
|
-
|
|
39301
|
-
|
|
39302
|
-
|
|
39303
|
-
|
|
39304
|
-
|
|
39305
|
-
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
|
|
39311
|
-
|
|
39312
|
-
|
|
39313
|
-
|
|
39314
|
-
|
|
39315
|
-
|
|
39316
|
-
|
|
39317
|
-
|
|
39318
|
-
|
|
39319
|
-
|
|
39320
|
-
|
|
39321
|
-
|
|
39322
|
-
|
|
39323
|
-
|
|
39384
|
+
RED_RGTC1_Format as aA,
|
|
39385
|
+
SIGNED_RED_RGTC1_Format as aB,
|
|
39386
|
+
RGBA_S3TC_DXT5_Format as aC,
|
|
39387
|
+
RGB_S3TC_DXT1_Format as aD,
|
|
39388
|
+
RGBA_S3TC_DXT1_Format as aE,
|
|
39389
|
+
RGBA_ASTC_6x6_Format as aF,
|
|
39390
|
+
RGBA_ASTC_4x4_Format as aG,
|
|
39391
|
+
SIGNED_RG11_EAC_Format as aH,
|
|
39392
|
+
RG11_EAC_Format as aI,
|
|
39393
|
+
SIGNED_R11_EAC_Format as aJ,
|
|
39394
|
+
R11_EAC_Format as aK,
|
|
39395
|
+
RGB_ETC2_Format as aL,
|
|
39396
|
+
RGBA_ETC2_EAC_Format as aM,
|
|
39397
|
+
RGBFormat as aN,
|
|
39398
|
+
RedFormat as aO,
|
|
39399
|
+
RGFormat as aP,
|
|
39400
|
+
RGBAFormat as aQ,
|
|
39401
|
+
UnsignedByteType as aR,
|
|
39402
|
+
HalfFloatType as aS,
|
|
39403
|
+
UnsignedInt101111Type as aT,
|
|
39404
|
+
UnsignedInt5999Type as aU,
|
|
39405
|
+
UnsignedShortType as aV,
|
|
39406
|
+
FloatType as aW,
|
|
39407
|
+
DataTexture as aX,
|
|
39408
|
+
Data3DTexture as aY,
|
|
39409
|
+
RGB_PVRTC_4BPPV1_Format as aZ,
|
|
39410
|
+
RGB_ETC1_Format as a_,
|
|
39324
39411
|
InterleavedBufferAttribute as aa,
|
|
39325
39412
|
Texture as ab,
|
|
39326
39413
|
VectorKeyframeTrack as ac,
|
|
@@ -39338,62 +39425,64 @@ export {
|
|
|
39338
39425
|
DefaultLoadingManager as ao,
|
|
39339
39426
|
Matrix3$1 as ap,
|
|
39340
39427
|
TextureUtils as aq,
|
|
39341
|
-
|
|
39342
|
-
|
|
39343
|
-
|
|
39344
|
-
|
|
39345
|
-
|
|
39346
|
-
|
|
39347
|
-
|
|
39348
|
-
|
|
39349
|
-
|
|
39428
|
+
CompressedCubeTexture as ar,
|
|
39429
|
+
CompressedArrayTexture as as,
|
|
39430
|
+
CompressedTexture as at,
|
|
39431
|
+
NoColorSpace as au,
|
|
39432
|
+
RGBA_PVRTC_2BPPV1_Format as av,
|
|
39433
|
+
RGBA_PVRTC_4BPPV1_Format as aw,
|
|
39434
|
+
RGBA_BPTC_Format as ax,
|
|
39435
|
+
RED_GREEN_RGTC2_Format as ay,
|
|
39436
|
+
SIGNED_RED_GREEN_RGTC2_Format as az,
|
|
39350
39437
|
Mesh as b,
|
|
39351
|
-
|
|
39352
|
-
|
|
39353
|
-
|
|
39354
|
-
|
|
39355
|
-
|
|
39356
|
-
|
|
39357
|
-
|
|
39358
|
-
|
|
39359
|
-
|
|
39360
|
-
|
|
39361
|
-
|
|
39362
|
-
|
|
39363
|
-
|
|
39364
|
-
|
|
39365
|
-
|
|
39366
|
-
|
|
39367
|
-
|
|
39368
|
-
|
|
39369
|
-
|
|
39370
|
-
|
|
39371
|
-
|
|
39372
|
-
|
|
39373
|
-
|
|
39374
|
-
|
|
39375
|
-
|
|
39376
|
-
|
|
39377
|
-
|
|
39378
|
-
|
|
39379
|
-
|
|
39380
|
-
|
|
39381
|
-
|
|
39382
|
-
|
|
39438
|
+
Float32BufferAttribute as b0,
|
|
39439
|
+
LinearMipMapLinearFilter as b1,
|
|
39440
|
+
Triangle as b2,
|
|
39441
|
+
CanvasTexture as b3,
|
|
39442
|
+
WebGLRenderer as b4,
|
|
39443
|
+
WebGLRenderTarget as b5,
|
|
39444
|
+
OneFactor as b6,
|
|
39445
|
+
ZeroFactor as b7,
|
|
39446
|
+
CustomBlending as b8,
|
|
39447
|
+
Box2 as b9,
|
|
39448
|
+
RGIntegerFormat as bA,
|
|
39449
|
+
UnsignedIntType as bB,
|
|
39450
|
+
RGBAIntegerFormat as bC,
|
|
39451
|
+
WebGLArrayRenderTarget as bD,
|
|
39452
|
+
GLSL3 as bE,
|
|
39453
|
+
Timer as bF,
|
|
39454
|
+
WebGLCubeRenderTarget as bG,
|
|
39455
|
+
CubeCamera as bH,
|
|
39456
|
+
Camera as bI,
|
|
39457
|
+
PMREMGenerator as bJ,
|
|
39458
|
+
InstancedBufferGeometry as bK,
|
|
39459
|
+
RawShaderMaterial as bL,
|
|
39460
|
+
Matrix2 as ba,
|
|
39461
|
+
Vector4 as bb,
|
|
39462
|
+
DataTextureLoader as bc,
|
|
39463
|
+
DataUtils as bd,
|
|
39464
|
+
REVISION as be,
|
|
39465
|
+
TextureSource as bf,
|
|
39466
|
+
ImageUtils as bg,
|
|
39467
|
+
Scene as bh,
|
|
39468
|
+
ecefToGeodeticPosition as bi,
|
|
39469
|
+
getEnuBasis as bj,
|
|
39470
|
+
BackSide as bk,
|
|
39471
|
+
BoxGeometry as bl,
|
|
39383
39472
|
normalizeLayerOffset as bm,
|
|
39384
39473
|
geodeticOffsetToEcefDelta as bn,
|
|
39385
39474
|
validateGeodeticPosition as bo,
|
|
39386
39475
|
validateTuple as bp,
|
|
39387
39476
|
validateScale as bq,
|
|
39388
39477
|
geodeticToEcefPosition as br,
|
|
39389
|
-
|
|
39390
|
-
|
|
39391
|
-
|
|
39392
|
-
|
|
39393
|
-
|
|
39394
|
-
|
|
39395
|
-
|
|
39396
|
-
|
|
39478
|
+
enuToEcefDelta as bs,
|
|
39479
|
+
RingGeometry as bt,
|
|
39480
|
+
AgXToneMapping as bu,
|
|
39481
|
+
EquirectangularReflectionMapping as bv,
|
|
39482
|
+
validateRotation as bw,
|
|
39483
|
+
requireFiniteNumber as bx,
|
|
39484
|
+
computeElevation as by,
|
|
39485
|
+
DataArrayTexture as bz,
|
|
39397
39486
|
ShaderMaterial as c,
|
|
39398
39487
|
Plane as d,
|
|
39399
39488
|
Raycaster as e,
|