@itwin/rpcinterface-full-stack-tests 4.0.0-dev.56 → 4.0.0-dev.59
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/lib/dist/_d48c.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +161 -67
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/object-storage.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_5_0_node_modules_itwin_obj-e3e81d.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_d48c.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\
|
|
1
|
+
{"version":3,"file":"_d48c.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\4\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.3.1\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -52912,6 +52912,13 @@ class TextureMapping {
|
|
|
52912
52912
|
this.weight = props?.textureWeight ?? 1;
|
|
52913
52913
|
this.mode = props?.mapMode ?? Mode.Parametric;
|
|
52914
52914
|
this.worldMapping = props?.worldMapping ?? false;
|
|
52915
|
+
this.useConstantLod = props?.useConstantLod ?? false;
|
|
52916
|
+
this.constantLodParams = {
|
|
52917
|
+
repetitions: props?.constantLodParams?.repetitions ?? 1,
|
|
52918
|
+
offset: props?.constantLodParams?.offset ?? { x: 0, y: 0 },
|
|
52919
|
+
minDistClamp: props?.constantLodParams?.minDistClamp ?? 1,
|
|
52920
|
+
maxDistClamp: props?.constantLodParams?.maxDistClamp ?? 4096 * 1024 * 1024,
|
|
52921
|
+
};
|
|
52915
52922
|
}
|
|
52916
52923
|
/**
|
|
52917
52924
|
* Generates UV parameters for textured surfaces. Returns undefined on failure.
|
|
@@ -116669,7 +116676,6 @@ class BranchUniforms {
|
|
|
116669
116676
|
this._mvp32 = new _Matrix__WEBPACK_IMPORTED_MODULE_4__.Matrix4();
|
|
116670
116677
|
this._m32 = new _Matrix__WEBPACK_IMPORTED_MODULE_4__.Matrix4();
|
|
116671
116678
|
this._v32 = new _Matrix__WEBPACK_IMPORTED_MODULE_4__.Matrix3();
|
|
116672
|
-
this._mvn32 = new _Matrix__WEBPACK_IMPORTED_MODULE_4__.Matrix3();
|
|
116673
116679
|
// Working state
|
|
116674
116680
|
this._scratchTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
116675
116681
|
this._scratchTransform2 = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
|
|
@@ -116752,10 +116758,6 @@ class BranchUniforms {
|
|
|
116752
116758
|
if (this.update(uniform, geom, isViewCoords))
|
|
116753
116759
|
uniform.setMatrix3(this._v32);
|
|
116754
116760
|
}
|
|
116755
|
-
bindModelViewNTransform(uniform, geom, isViewCoords) {
|
|
116756
|
-
if (this.update(uniform, geom, isViewCoords))
|
|
116757
|
-
uniform.setMatrix3(this._mvn32);
|
|
116758
|
-
}
|
|
116759
116761
|
update(uniform, geometry, isViewCoords) {
|
|
116760
116762
|
const uniforms = this._target.uniforms[isViewCoords ? "viewRect" : "frustum"];
|
|
116761
116763
|
if (!(0,_Sync__WEBPACK_IMPORTED_MODULE_6__.sync)(uniforms, this))
|
|
@@ -116787,7 +116789,6 @@ class BranchUniforms {
|
|
|
116787
116789
|
}
|
|
116788
116790
|
else {
|
|
116789
116791
|
const viewMatrix = this._target.uniforms.frustum.viewMatrix;
|
|
116790
|
-
mv = viewMatrix.clone(this._scratchTransform);
|
|
116791
116792
|
if (undefined !== instancedGeom) {
|
|
116792
116793
|
// For instanced geometry, the "model view" matrix is really a transform from center of instanced geometry range to view.
|
|
116793
116794
|
// Shader will compute final model-view matrix based on this and the per-instance transform.
|
|
@@ -116795,10 +116796,10 @@ class BranchUniforms {
|
|
|
116795
116796
|
const viewToWorldRot = viewMatrix.matrix.inverse(this._scratchViewToWorld);
|
|
116796
116797
|
const rotateAboutOrigin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(vio, viewToWorldRot, this._scratchTransform2);
|
|
116797
116798
|
const viModelMatrix = rotateAboutOrigin.multiplyTransformTransform(instancedGeom.getRtcModelTransform(modelMatrix), this._scratchVIModelMatrix);
|
|
116798
|
-
mv.multiplyTransformTransform(viModelMatrix,
|
|
116799
|
+
mv = viewMatrix.multiplyTransformTransform(viModelMatrix, this._scratchTransform);
|
|
116799
116800
|
}
|
|
116800
116801
|
else {
|
|
116801
|
-
mv.multiplyTransformTransform(instancedGeom.getRtcModelTransform(modelMatrix),
|
|
116802
|
+
mv = viewMatrix.multiplyTransformTransform(instancedGeom.getRtcModelTransform(modelMatrix), this._scratchTransform);
|
|
116802
116803
|
}
|
|
116803
116804
|
}
|
|
116804
116805
|
else {
|
|
@@ -116806,10 +116807,10 @@ class BranchUniforms {
|
|
|
116806
116807
|
const viewToWorldRot = viewMatrix.matrix.inverse(this._scratchViewToWorld);
|
|
116807
116808
|
const rotateAboutOrigin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(vio, viewToWorldRot, this._scratchTransform2);
|
|
116808
116809
|
const viModelMatrix = rotateAboutOrigin.multiplyTransformTransform(modelMatrix, this._scratchVIModelMatrix);
|
|
116809
|
-
mv.multiplyTransformTransform(viModelMatrix,
|
|
116810
|
+
mv = viewMatrix.multiplyTransformTransform(viModelMatrix, this._scratchTransform);
|
|
116810
116811
|
}
|
|
116811
116812
|
else {
|
|
116812
|
-
mv =
|
|
116813
|
+
mv = viewMatrix.multiplyTransformTransform(modelMatrix, this._scratchTransform);
|
|
116813
116814
|
}
|
|
116814
116815
|
}
|
|
116815
116816
|
}
|
|
@@ -116817,6 +116818,9 @@ class BranchUniforms {
|
|
|
116817
116818
|
this._m32.initFromTransform(modelMatrix);
|
|
116818
116819
|
this._v32.initFromMatrix3d(this._target.uniforms.frustum.viewMatrix.matrix);
|
|
116819
116820
|
}
|
|
116821
|
+
else if (undefined !== geometry.asSurface?.mesh.constantLodVParams) {
|
|
116822
|
+
this._m32.initFromTransform(modelMatrix);
|
|
116823
|
+
}
|
|
116820
116824
|
_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix4d.createTransform(mv, this._mv);
|
|
116821
116825
|
this._mv32.initFromTransform(mv);
|
|
116822
116826
|
// Don't bother computing mvp for instanced geometry - it's not used.
|
|
@@ -122718,19 +122722,35 @@ class MeshData {
|
|
|
122718
122722
|
this.hasFeatures = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureIndexType.Empty !== params.vertices.featureIndexType;
|
|
122719
122723
|
if (_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureIndexType.Uniform === params.vertices.featureIndexType)
|
|
122720
122724
|
this.uniformFeatureId = params.vertices.uniformFeatureID;
|
|
122725
|
+
this.textureUsesConstantLod = false;
|
|
122726
|
+
this.normalMapUsesConstantLod = false;
|
|
122721
122727
|
if (undefined !== params.surface.textureMapping) {
|
|
122722
122728
|
this.texture = params.surface.textureMapping.texture;
|
|
122723
122729
|
this._textureAlwaysDisplayed = params.surface.textureMapping.alwaysDisplayed;
|
|
122724
122730
|
if (undefined !== params.surface.material && !params.surface.material.isAtlas) {
|
|
122725
122731
|
const matTM = params.surface.material.material.textureMapping;
|
|
122726
|
-
if (undefined !== matTM
|
|
122727
|
-
|
|
122728
|
-
|
|
122732
|
+
if (undefined !== matTM) {
|
|
122733
|
+
this.textureUsesConstantLod = this.texture && matTM.params.useConstantLod;
|
|
122734
|
+
if (undefined !== matTM.normalMapParams) {
|
|
122735
|
+
this.normalMapUsesConstantLod = matTM.normalMapParams.useConstantLod;
|
|
122736
|
+
if (undefined !== matTM.normalMapParams.normalMap) {
|
|
122737
|
+
this.normalMap = matTM.normalMapParams.normalMap;
|
|
122738
|
+
}
|
|
122739
|
+
else {
|
|
122740
|
+
// If there are normal map params but the normal map is not present, use the texture as a normal map instead of a pattern map.
|
|
122741
|
+
this.normalMap = this.texture;
|
|
122742
|
+
this.texture = undefined;
|
|
122743
|
+
}
|
|
122729
122744
|
}
|
|
122730
|
-
|
|
122731
|
-
|
|
122732
|
-
this.
|
|
122733
|
-
this.
|
|
122745
|
+
if (this.normalMapUsesConstantLod || this.textureUsesConstantLod) {
|
|
122746
|
+
this.constantLodVParams = new Float32Array(3);
|
|
122747
|
+
this.constantLodVParams[0] = matTM.params.constantLodParams.offset.x; // x offset
|
|
122748
|
+
this.constantLodVParams[1] = matTM.params.constantLodParams.offset.y; // y offset
|
|
122749
|
+
this.constantLodVParams[3] = 0.0; // placeholder for orto view distance
|
|
122750
|
+
this.constantLodFParams = new Float32Array(3);
|
|
122751
|
+
this.constantLodFParams[0] = matTM.params.constantLodParams.minDistClamp; // Minimum texture size
|
|
122752
|
+
this.constantLodFParams[1] = matTM.params.constantLodParams.maxDistClamp; // Maximum texture size
|
|
122753
|
+
this.constantLodFParams[2] = matTM.params.constantLodParams.repetitions; // # repetitions of pattern (to scale it)
|
|
122734
122754
|
}
|
|
122735
122755
|
}
|
|
122736
122756
|
}
|
|
@@ -130539,6 +130559,8 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
|
|
|
130539
130559
|
}
|
|
130540
130560
|
flags[0 /* SurfaceBitIndex.HasTexture */] = this.useTexture(params) ? 1 : 0;
|
|
130541
130561
|
flags[8 /* SurfaceBitIndex.HasNormalMap */] = this.useNormalMap(params) ? 1 : 0;
|
|
130562
|
+
flags[10 /* SurfaceBitIndex.UseConstantLodTextureMapping */] = this.mesh.textureUsesConstantLod ? 1 : 0;
|
|
130563
|
+
flags[11 /* SurfaceBitIndex.UseConstantLodNormalMapMapping */] = this.mesh.normalMapUsesConstantLod ? 1 : 0;
|
|
130542
130564
|
// The transparency threshold controls how transparent a surface must be to allow light to pass through; more opaque surfaces cast shadows.
|
|
130543
130565
|
flags[4 /* SurfaceBitIndex.TransparencyThreshold */] = params.target.isDrawingShadowMap ? 1 : 0;
|
|
130544
130566
|
flags[5 /* SurfaceBitIndex.BackgroundFill */] = 0;
|
|
@@ -137106,7 +137128,6 @@ function createVolClassCopyZProgram(context) {
|
|
|
137106
137128
|
_Texture__WEBPACK_IMPORTED_MODULE_4__.Texture2DHandle.bindSampler(uniform, geom.texture, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.Zero);
|
|
137107
137129
|
});
|
|
137108
137130
|
});
|
|
137109
|
-
frag.addExtension("GL_EXT_frag_depth");
|
|
137110
137131
|
frag.set(18 /* FragmentShaderComponent.FinalizeDepth */, depthFromTexture);
|
|
137111
137132
|
builder.vert.headerComment = "//!V! VolClassCopyZ";
|
|
137112
137133
|
builder.frag.headerComment = "//!F! VolClassCopyZ";
|
|
@@ -141375,6 +141396,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
141375
141396
|
/* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
|
|
141376
141397
|
/* harmony import */ var _SurfaceGeometry__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../SurfaceGeometry */ "../../core/frontend/lib/esm/render/webgl/SurfaceGeometry.js");
|
|
141377
141398
|
/* harmony import */ var _Wiremesh__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Wiremesh */ "../../core/frontend/lib/esm/render/webgl/glsl/Wiremesh.js");
|
|
141399
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
141378
141400
|
/*---------------------------------------------------------------------------------------------
|
|
141379
141401
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
141380
141402
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -141405,10 +141427,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
141405
141427
|
|
|
141406
141428
|
|
|
141407
141429
|
|
|
141430
|
+
|
|
141431
|
+
const constantLodTextureLookup = `
|
|
141432
|
+
vec4 constantLodTextureLookup(sampler2D textureSampler) {
|
|
141433
|
+
float logDepth = log2(v_uvCustom.z);
|
|
141434
|
+
float f = fract(logDepth);
|
|
141435
|
+
float p = floor(logDepth);
|
|
141436
|
+
// When p changes, both tc1 and tc2 jumped by a power of 2 at that transition (and f goes from ~1 to 0).
|
|
141437
|
+
// This caused a line to show up with incorrect tex coords, we believe due to a problem with the derivative
|
|
141438
|
+
// that is auto calculated on the tex coords for the mip-map. The below approach attempts to "smooth"
|
|
141439
|
+
// the transition of the coord in use at the transition by only changing the coord that is not in use
|
|
141440
|
+
// (but by 2 powers of 2) and switching the mix selector to account for it. It does this by using whether
|
|
141441
|
+
// p is odd or even to select which way it is going, so it alternates at the boundaries. This fixes the
|
|
141442
|
+
// line problem.
|
|
141443
|
+
float p1, p2;
|
|
141444
|
+
if (0u == (uint(p) & 1u)) { // p is even
|
|
141445
|
+
p1 = p;
|
|
141446
|
+
p2 = p + 1.0;
|
|
141447
|
+
} else { // p is odd
|
|
141448
|
+
p1 = p + 1.0;
|
|
141449
|
+
p2 = p;
|
|
141450
|
+
f = 1.0 - f;
|
|
141451
|
+
}
|
|
141452
|
+
|
|
141453
|
+
vec2 tc1 = v_uvCustom.xy / clamp(pow(2.0, p1), float(u_constantLodFParams.x), float(u_constantLodFParams.y)) * u_constantLodFParams.z;
|
|
141454
|
+
vec2 tc2 = v_uvCustom.xy / clamp(pow(2.0, p2), float(u_constantLodFParams.x), float(u_constantLodFParams.y)) * u_constantLodFParams.z;
|
|
141455
|
+
return mix(TEXTURE(textureSampler, tc1), TEXTURE(textureSampler, tc2), f);
|
|
141456
|
+
}
|
|
141457
|
+
`;
|
|
141408
141458
|
// NB: Textures do not contain pre-multiplied alpha.
|
|
141409
141459
|
const sampleSurfaceTexture = `
|
|
141410
141460
|
vec4 sampleSurfaceTexture() {
|
|
141411
|
-
|
|
141461
|
+
vec4 clr;
|
|
141462
|
+
if (!isSurfaceBitSet(kSurfaceBit_HasTexture))
|
|
141463
|
+
clr = vec4(1.0, 1.0, 1.0, 1.0);
|
|
141464
|
+
else if (u_surfaceFlags[kSurfaceBitIndex_UseConstantLodTextureMapping])
|
|
141465
|
+
clr = constantLodTextureLookup(s_texture);
|
|
141466
|
+
else
|
|
141467
|
+
clr = TEXTURE(s_texture, v_texCoord);
|
|
141468
|
+
return clr;
|
|
141412
141469
|
}
|
|
141413
141470
|
`;
|
|
141414
141471
|
const applyMaterialColor = `
|
|
@@ -141558,6 +141615,10 @@ const adjustEyeSpace = `
|
|
|
141558
141615
|
if (kRenderOrder_BlankingRegion == u_renderOrder)
|
|
141559
141616
|
v_eyeSpace.z -= blankingRegionOffset * (u_frustum.y - u_frustum.x);
|
|
141560
141617
|
`;
|
|
141618
|
+
const computeConstantLodUvCustom = `
|
|
141619
|
+
vec2 worldpos = (u_modelToWorld * vec4(rawPos.xyz, 0.0)).xy;
|
|
141620
|
+
v_uvCustom = vec3((u_constantLodVParams.xy + worldpos) * vec2(1.0, -1.0), kFrustumType_Perspective == u_frustum.z ? -v_eyeSpace.z : u_constantLodVParams.z);
|
|
141621
|
+
`;
|
|
141561
141622
|
const computePositionPostlude = `
|
|
141562
141623
|
return u_proj * pos;
|
|
141563
141624
|
`;
|
|
@@ -141572,17 +141633,17 @@ function createCommon(isInstanced, animated, shadowable, isHiliter, positionType
|
|
|
141572
141633
|
(0,_SolarShadowMapping__WEBPACK_IMPORTED_MODULE_17__.addSolarShadowMap)(builder);
|
|
141573
141634
|
(0,_Vertex__WEBPACK_IMPORTED_MODULE_20__.addProjectionMatrix)(vert);
|
|
141574
141635
|
(0,_Vertex__WEBPACK_IMPORTED_MODULE_20__.addModelViewMatrix)(vert);
|
|
141575
|
-
let computePosition;
|
|
141576
|
-
if (isHiliter
|
|
141577
|
-
computePosition = computePositionPrelude + computePositionPostlude;
|
|
141578
|
-
}
|
|
141579
|
-
else {
|
|
141636
|
+
let computePosition = computePositionPrelude;
|
|
141637
|
+
if (!isHiliter || _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.supportsLogZBuffer) {
|
|
141580
141638
|
(0,_Common__WEBPACK_IMPORTED_MODULE_9__.addFrustum)(builder);
|
|
141581
141639
|
(0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addRenderOrder)(builder.vert);
|
|
141582
141640
|
(0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addRenderOrderConstants)(builder.vert);
|
|
141583
141641
|
builder.addVarying("v_eyeSpace", 4 /* VariableType.Vec3 */);
|
|
141584
|
-
computePosition
|
|
141642
|
+
computePosition += adjustEyeSpace;
|
|
141585
141643
|
}
|
|
141644
|
+
if (!isHiliter)
|
|
141645
|
+
computePosition += computeConstantLodUvCustom;
|
|
141646
|
+
computePosition += computePositionPostlude;
|
|
141586
141647
|
vert.set(10 /* VertexShaderComponent.ComputePosition */, computePosition);
|
|
141587
141648
|
return builder;
|
|
141588
141649
|
}
|
|
@@ -141616,6 +141677,8 @@ function addSurfaceFlagsLookup(builder) {
|
|
|
141616
141677
|
builder.addConstant("kSurfaceBitIndex_OverrideRgb", 1 /* VariableType.Int */, 7 /* SurfaceBitIndex.OverrideRgb */.toString());
|
|
141617
141678
|
builder.addConstant("kSurfaceBitIndex_HasNormalMap", 1 /* VariableType.Int */, 8 /* SurfaceBitIndex.HasNormalMap */.toString());
|
|
141618
141679
|
builder.addConstant("kSurfaceBitIndex_HasMaterialAtlas", 1 /* VariableType.Int */, 9 /* SurfaceBitIndex.HasMaterialAtlas */.toString());
|
|
141680
|
+
builder.addConstant("kSurfaceBitIndex_UseConstantLodTextureMapping", 1 /* VariableType.Int */, 10 /* SurfaceBitIndex.UseConstantLodTextureMapping */.toString());
|
|
141681
|
+
builder.addConstant("kSurfaceBitIndex_UseConstantLodNormalMapMapping", 1 /* VariableType.Int */, 11 /* SurfaceBitIndex.UseConstantLodNormalMapMapping */.toString());
|
|
141619
141682
|
// Surface flags which get modified in vertex shader are still passed to fragment shader as a single float & are thus
|
|
141620
141683
|
// used differently there & so require different constants. Unused constants are commented out.
|
|
141621
141684
|
builder.addBitFlagConstant("kSurfaceBit_HasTexture", 0 /* SurfaceBitIndex.HasTexture */);
|
|
@@ -141700,7 +141763,11 @@ const finalizeNormalNormalMap = `
|
|
|
141700
141763
|
vec3 biTangent = cross (normal, tangent);
|
|
141701
141764
|
if (flip)
|
|
141702
141765
|
biTangent = -biTangent;
|
|
141703
|
-
vec3 normM
|
|
141766
|
+
vec3 normM;
|
|
141767
|
+
if (u_surfaceFlags[kSurfaceBitIndex_UseConstantLodNormalMapMapping])
|
|
141768
|
+
normM = constantLodTextureLookup(s_normalMap).xyz;
|
|
141769
|
+
else
|
|
141770
|
+
normM = TEXTURE(s_normalMap, v_texCoord).xyz;
|
|
141704
141771
|
if (length (normM) > 0.0001) { // check for empty normal texture
|
|
141705
141772
|
normM = (normM - 0.5) * 2.0;
|
|
141706
141773
|
normM = normalize (normM);
|
|
@@ -141764,7 +141831,7 @@ const computeBaseColor = `
|
|
|
141764
141831
|
surfaceColor.rgb = (u_reverseWhiteOnWhite && isAlmostWhite.r && isAlmostWhite.g && isAlmostWhite.b ? vec3(0.0, 0.0, 0.0) : surfaceColor.rgb);
|
|
141765
141832
|
return vec4(surfaceColor.rgb * g_surfaceTexel.rgb, g_surfaceTexel.a);
|
|
141766
141833
|
`;
|
|
141767
|
-
const surfaceFlagArray = new Int32Array(
|
|
141834
|
+
const surfaceFlagArray = new Int32Array(12 /* SurfaceBitIndex.Count */);
|
|
141768
141835
|
/** @internal */
|
|
141769
141836
|
function addSurfaceFlags(builder, withFeatureOverrides, withFeatureColor) {
|
|
141770
141837
|
addSurfaceFlagsLookup(builder.vert);
|
|
@@ -141775,7 +141842,7 @@ function addSurfaceFlags(builder, withFeatureOverrides, withFeatureColor) {
|
|
|
141775
141842
|
compute += returnSurfaceFlags;
|
|
141776
141843
|
builder.addFunctionComputedVarying("v_surfaceFlags", 2 /* VariableType.Float */, "computeSurfaceFlags", compute);
|
|
141777
141844
|
builder.frag.addInitializer("surfaceFlags = uint(floor(v_surfaceFlags + 0.5));");
|
|
141778
|
-
builder.addUniformArray("u_surfaceFlags", 0 /* VariableType.Boolean */,
|
|
141845
|
+
builder.addUniformArray("u_surfaceFlags", 0 /* VariableType.Boolean */, 12 /* SurfaceBitIndex.Count */, (prog) => {
|
|
141779
141846
|
prog.addGraphicUniform("u_surfaceFlags", (uniform, params) => {
|
|
141780
141847
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== params.geometry.asSurface);
|
|
141781
141848
|
const mesh = params.geometry.asSurface;
|
|
@@ -141793,17 +141860,19 @@ function addNormal(builder, animated) {
|
|
|
141793
141860
|
builder.frag.addGlobal("g_normal", 4 /* VariableType.Vec3 */);
|
|
141794
141861
|
let finalizeNormal = finalizeNormalPrelude;
|
|
141795
141862
|
finalizeNormal += finalizeNormalNormalMap;
|
|
141863
|
+
builder.frag.addFunction(constantLodTextureLookup);
|
|
141796
141864
|
builder.frag.addUniform("u_normalMapScale", 2 /* VariableType.Float */, (prog) => {
|
|
141797
141865
|
prog.addGraphicUniform("u_normalMapScale", (uniform, params) => {
|
|
141798
|
-
|
|
141799
|
-
|
|
141800
|
-
undefined !==
|
|
141801
|
-
|
|
141802
|
-
|
|
141803
|
-
|
|
141804
|
-
|
|
141805
|
-
|
|
141806
|
-
|
|
141866
|
+
if (undefined !== params.geometry.materialInfo && !params.geometry.materialInfo.isAtlas) {
|
|
141867
|
+
const normalMapParams = params.geometry.materialInfo.textureMapping?.normalMapParams;
|
|
141868
|
+
if (undefined !== normalMapParams) {
|
|
141869
|
+
let normalMapScale = 1.0;
|
|
141870
|
+
normalMapScale = normalMapParams.scale ?? 1.0;
|
|
141871
|
+
if (normalMapParams.greenUp)
|
|
141872
|
+
normalMapScale = -normalMapScale;
|
|
141873
|
+
uniform.setUniform1f(normalMapScale);
|
|
141874
|
+
}
|
|
141875
|
+
}
|
|
141807
141876
|
});
|
|
141808
141877
|
});
|
|
141809
141878
|
finalizeNormal += finalizeNormalPostlude;
|
|
@@ -141839,7 +141908,6 @@ function addTexture(builder, animated, isThematic, isPointCloud, isHilite) {
|
|
|
141839
141908
|
}
|
|
141840
141909
|
});
|
|
141841
141910
|
});
|
|
141842
|
-
builder.frag.addFunction(sampleSurfaceTexture);
|
|
141843
141911
|
}
|
|
141844
141912
|
builder.frag.addUniform("s_texture", 8 /* VariableType.Sampler2D */, (prog) => {
|
|
141845
141913
|
prog.addGraphicUniform("s_texture", (uniform, params) => {
|
|
@@ -141918,8 +141986,17 @@ function createSurfaceBuilder(flags) {
|
|
|
141918
141986
|
opts &= ~16 /* FeatureSymbologyOptions.Alpha */;
|
|
141919
141987
|
(0,_PlanarClassification__WEBPACK_IMPORTED_MODULE_15__.addColorPlanarClassifier)(builder, flags.isTranslucent, flags.isThematic);
|
|
141920
141988
|
}
|
|
141921
|
-
if (flags.isThematic)
|
|
141989
|
+
if (flags.isThematic) {
|
|
141922
141990
|
(0,_Thematic__WEBPACK_IMPORTED_MODULE_18__.addThematicDisplay)(builder);
|
|
141991
|
+
}
|
|
141992
|
+
else {
|
|
141993
|
+
builder.vert.addUniform("u_modelToWorld", 7 /* VariableType.Mat4 */, (prog) => {
|
|
141994
|
+
prog.addGraphicUniform("u_modelToWorld", (uniform, params) => {
|
|
141995
|
+
if (undefined !== params.geometry.asSurface?.mesh.constantLodVParams)
|
|
141996
|
+
params.target.uniforms.branch.bindModelToWorldTransform(uniform, params.geometry, false);
|
|
141997
|
+
});
|
|
141998
|
+
});
|
|
141999
|
+
}
|
|
141923
142000
|
(0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addFeatureSymbology)(builder, feat, opts);
|
|
141924
142001
|
addSurfaceFlags(builder, 2 /* FeatureMode.Overrides */ === feat, true);
|
|
141925
142002
|
(0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addSurfaceDiscard)(builder, flags);
|
|
@@ -141963,6 +142040,25 @@ function createSurfaceBuilder(flags) {
|
|
|
141963
142040
|
(0,_Fragment__WEBPACK_IMPORTED_MODULE_12__.addAltPickBufferOutputs)(builder.frag);
|
|
141964
142041
|
}
|
|
141965
142042
|
}
|
|
142043
|
+
builder.addVarying("v_uvCustom", 4 /* VariableType.Vec3 */);
|
|
142044
|
+
builder.vert.addUniform("u_constantLodVParams", 4 /* VariableType.Vec3 */, (prog) => {
|
|
142045
|
+
prog.addGraphicUniform("u_constantLodVParams", (uniform, params) => {
|
|
142046
|
+
const vParams = params.geometry.asSurface?.mesh.constantLodVParams;
|
|
142047
|
+
if (undefined !== vParams) {
|
|
142048
|
+
vParams[2] = params.target.planFrustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_23__.Npc.LeftTopRear].distance(params.target.planFrustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_23__.Npc.RightTopRear]);
|
|
142049
|
+
uniform.setUniform3fv(vParams);
|
|
142050
|
+
}
|
|
142051
|
+
});
|
|
142052
|
+
});
|
|
142053
|
+
builder.frag.addUniform("u_constantLodFParams", 4 /* VariableType.Vec3 */, (prog) => {
|
|
142054
|
+
prog.addGraphicUniform("u_constantLodFParams", (uniform, params) => {
|
|
142055
|
+
const fParams = params.geometry.asSurface?.mesh.constantLodFParams;
|
|
142056
|
+
if (undefined !== fParams)
|
|
142057
|
+
uniform.setUniform3fv(fParams);
|
|
142058
|
+
});
|
|
142059
|
+
});
|
|
142060
|
+
builder.frag.addFunction(constantLodTextureLookup);
|
|
142061
|
+
builder.frag.addFunction(sampleSurfaceTexture);
|
|
141966
142062
|
builder.frag.addGlobal("g_surfaceTexel", 5 /* VariableType.Vec4 */);
|
|
141967
142063
|
builder.frag.set(1 /* FragmentShaderComponent.ComputeBaseColor */, (flags.isThematic === 0 /* IsThematic.No */) ? computeBaseColor : "return getSurfaceColor();");
|
|
141968
142064
|
if (flags.isClassified)
|
|
@@ -142468,33 +142564,31 @@ const computeLineCode = "\nfloat computeLineCode() { return g_lineCode; }\n";
|
|
|
142468
142564
|
function addSamplePosition(vert) {
|
|
142469
142565
|
vert.addFunction(getSamplePosition(vert.positionType));
|
|
142470
142566
|
}
|
|
142567
|
+
const getSamplePositionPrelude = `
|
|
142568
|
+
vec4 samplePosition(float index) {
|
|
142569
|
+
vec2 tc = compute_vert_coords(index);`;
|
|
142570
|
+
const getSamplePositionQuantizedPostlude = `
|
|
142571
|
+
vec4 e0 = floor(TEXTURE(u_vertLUT, tc) * 255.0 + 0.5);
|
|
142572
|
+
tc.x += g_vert_stepX;
|
|
142573
|
+
vec4 e1 = floor(TEXTURE(u_vertLUT, tc) * 255.0 + 0.5);
|
|
142574
|
+
vec3 qpos = vec3(decodeUInt16(e0.xy), decodeUInt16(e0.zw), decodeUInt16(e1.xy));
|
|
142575
|
+
return unquantizePosition(qpos, u_qOrigin, u_qScale);
|
|
142576
|
+
}
|
|
142577
|
+
`;
|
|
142578
|
+
const getSamplePositionUnquantizedPostlude = `
|
|
142579
|
+
uvec3 vux = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142580
|
+
tc.x += g_vert_stepX;
|
|
142581
|
+
uvec3 vuy = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142582
|
+
tc.x += g_vert_stepX;
|
|
142583
|
+
uvec3 vuz = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142584
|
+
tc.x += g_vert_stepX;
|
|
142585
|
+
uvec3 vuw = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142586
|
+
uvec3 u = (vuw << 24) | (vuz << 16) | (vuy << 8) | vux;
|
|
142587
|
+
return vec4(uintBitsToFloat(u), 1.0);
|
|
142588
|
+
}
|
|
142589
|
+
`;
|
|
142471
142590
|
function getSamplePosition(type) {
|
|
142472
|
-
|
|
142473
|
-
vec4 samplePosition(float index) {
|
|
142474
|
-
vec2 tc = compute_vert_coords(index);`;
|
|
142475
|
-
if ("quantized" === type) {
|
|
142476
|
-
return `
|
|
142477
|
-
${prelude}
|
|
142478
|
-
vec4 e0 = floor(TEXTURE(u_vertLUT, tc) * 255.0 + 0.5);
|
|
142479
|
-
tc.x += g_vert_stepX;
|
|
142480
|
-
vec4 e1 = floor(TEXTURE(u_vertLUT, tc) * 255.0 + 0.5);
|
|
142481
|
-
vec3 qpos = vec3(decodeUInt16(e0.xy), decodeUInt16(e0.zw), decodeUInt16(e1.xy));
|
|
142482
|
-
return unquantizePosition(qpos, u_qOrigin, u_qScale);
|
|
142483
|
-
}
|
|
142484
|
-
`;
|
|
142485
|
-
}
|
|
142486
|
-
return `
|
|
142487
|
-
${prelude}
|
|
142488
|
-
uvec3 vux = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142489
|
-
tc.x += g_vert_stepX;
|
|
142490
|
-
uvec3 vuy = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142491
|
-
tc.x += g_vert_stepX;
|
|
142492
|
-
uvec3 vuz = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142493
|
-
tc.x += g_vert_stepX;
|
|
142494
|
-
uvec3 vuw = uvec3(floor(TEXTURE(u_vertLUT, tc).xyz * 255.0 + 0.5));
|
|
142495
|
-
uvec3 u = (vuw << 24) | (vuz << 16) | (vuy << 8) | vux;
|
|
142496
|
-
return vec4(uintBitsToFloat(u), 1.0);
|
|
142497
|
-
}`;
|
|
142591
|
+
return `${getSamplePositionPrelude}${"quantized" === type ? getSamplePositionQuantizedPostlude : getSamplePositionUnquantizedPostlude}`;
|
|
142498
142592
|
}
|
|
142499
142593
|
/** @internal */
|
|
142500
142594
|
function addModelViewProjectionMatrix(vert) {
|
|
@@ -281083,7 +281177,7 @@ class TestContext {
|
|
|
281083
281177
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
281084
281178
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
281085
281179
|
await core_frontend_1.NoRenderApp.startup({
|
|
281086
|
-
applicationVersion: "4.0.0-dev.
|
|
281180
|
+
applicationVersion: "4.0.0-dev.59",
|
|
281087
281181
|
applicationId: this.settings.gprid,
|
|
281088
281182
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
281089
281183
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -300656,7 +300750,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
300656
300750
|
/***/ ((module) => {
|
|
300657
300751
|
|
|
300658
300752
|
"use strict";
|
|
300659
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
300753
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.59","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.0.0-dev.59","@itwin/core-bentley":"workspace:^4.0.0-dev.59","@itwin/core-common":"workspace:^4.0.0-dev.59","@itwin/core-geometry":"workspace:^4.0.0-dev.59","@itwin/core-orbitgt":"workspace:^4.0.0-dev.59","@itwin/core-quantity":"workspace:^4.0.0-dev.59"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.0-dev.32","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~5.0.2","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
300660
300754
|
|
|
300661
300755
|
/***/ }),
|
|
300662
300756
|
|