Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Feb 29, 2024
1 parent 687deb9 commit b3e81c2
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 38 deletions.
50 changes: 33 additions & 17 deletions dist/xeokit-bim-viewer.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -19168,7 +19168,7 @@ class Perspective extends Component {
inverseMatrix: math.mat4(),
transposedMatrix: math.mat4(),
near: 0.1,
far: 2000.0
far: 10000.0
});

this._inverseMatrixDirty = true;
Expand Down Expand Up @@ -19318,10 +19318,12 @@ class Perspective extends Component {
*
* Fires a "far" event on change.
*
* Default value is ````10000.0````.
*
* @param {Number} value New Perspective far plane position.
*/
set far(value) {
const far = (value !== undefined && value !== null) ? value : 2000.0;
const far = (value !== undefined && value !== null) ? value : 10000.0;
if (this._state.far === far) {
return;
}
Expand All @@ -19333,6 +19335,8 @@ class Perspective extends Component {
/**
* Gets the position of this Perspective's far plane on the positive View-space Z-axis.
*
* Default value is ````10000.0````.
*
* @return {Number} The Perspective's far plane position.
*/
get far() {
Expand Down Expand Up @@ -19469,7 +19473,7 @@ class Ortho extends Component {
inverseMatrix: math.mat4(),
transposedMatrix: math.mat4(),
near: 0.1,
far: 2000.0
far: 10000.0
});

this._inverseMatrixDirty = true;
Expand Down Expand Up @@ -19595,12 +19599,12 @@ class Ortho extends Component {
*
* Fires a "far" event on change.
*
* Default value is ````2000.0````.
* Default value is ````10000.0````.
*
* @param {Number} value New far ortho plane position.
*/
set far(value) {
const far = (value !== undefined && value !== null) ? value : 2000.0;
const far = (value !== undefined && value !== null) ? value : 10000.0;
if (this._state.far === far) {
return;
}
Expand Down Expand Up @@ -65460,11 +65464,6 @@ class DTXTrianglesPickMeshRenderer {
// get color
src.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);");

src.push(`if (color.a == 0u) {`);
src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex
src.push(" return;");
src.push("};");

// get pick-color
src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;");

Expand Down Expand Up @@ -75309,6 +75308,10 @@ class SceneModel extends Component {
this.error("[createGeometry] Param expected: `uvDecodeMatrix` (required for `uvCompressed')");
return null;
}
if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) {
const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3;
cfg.indices = this._createDefaultIndices(numPositions);
}
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
this.error(`[createGeometry] Param expected: indices (required for '${cfg.primitive}' primitive type)`);
return null;
Expand Down Expand Up @@ -75743,7 +75746,12 @@ class SceneModel extends Component {
this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");
return false;
}
if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) {
const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3;
cfg.indices = this._createDefaultIndices(numPositions);
}
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
cfg.indices = this._createDefaultIndices(numIndices);
this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`);
return false;
}
Expand All @@ -75753,9 +75761,9 @@ class SceneModel extends Component {
}

const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles"
|| cfg.primitive === "solid"
|| cfg.primitive === "surface"))
&& (!cfg.textureSetId);
|| cfg.primitive === "solid"
|| cfg.primitive === "surface"))
&& (!cfg.textureSetId);

cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin;

Expand Down Expand Up @@ -75971,9 +75979,9 @@ class SceneModel extends Component {
}

const useDTX = (!!this._dtxEnabled
&& (cfg.geometry.primitive === "triangles"
|| cfg.geometry.primitive === "solid"
|| cfg.geometry.primitive === "surface"))
&& (cfg.geometry.primitive === "triangles"
|| cfg.geometry.primitive === "solid"
|| cfg.geometry.primitive === "surface"))
&& (!cfg.textureSetId);

if (useDTX) {
Expand Down Expand Up @@ -76028,6 +76036,14 @@ class SceneModel extends Component {
return true;
}

_createDefaultIndices(numIndices) {
const indices = [];
for (let i = 0; i < numIndices; i++) {
indices.push(i);
}
return indices;
}

_createMesh(cfg) {
const mesh = new SceneModelMesh(this, cfg.id, cfg.color, cfg.opacity, cfg.transform, cfg.textureSet);
mesh.pickId = this.scene._renderer.getPickID(mesh);
Expand Down Expand Up @@ -76630,7 +76646,7 @@ class SceneModel extends Component {
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this.layerList[layerIndex].drawColorOpaque(renderFlags, frameCtx);
}
}
}

/** @private */
Expand Down
4 changes: 2 additions & 2 deletions dist/xeokit-bim-viewer.min.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/xeokit-bim-viewer.min.umd.js

Large diffs are not rendered by default.

50 changes: 33 additions & 17 deletions dist/xeokit-bim-viewer.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -19174,7 +19174,7 @@
inverseMatrix: math.mat4(),
transposedMatrix: math.mat4(),
near: 0.1,
far: 2000.0
far: 10000.0
});

this._inverseMatrixDirty = true;
Expand Down Expand Up @@ -19324,10 +19324,12 @@
*
* Fires a "far" event on change.
*
* Default value is ````10000.0````.
*
* @param {Number} value New Perspective far plane position.
*/
set far(value) {
const far = (value !== undefined && value !== null) ? value : 2000.0;
const far = (value !== undefined && value !== null) ? value : 10000.0;
if (this._state.far === far) {
return;
}
Expand All @@ -19339,6 +19341,8 @@
/**
* Gets the position of this Perspective's far plane on the positive View-space Z-axis.
*
* Default value is ````10000.0````.
*
* @return {Number} The Perspective's far plane position.
*/
get far() {
Expand Down Expand Up @@ -19475,7 +19479,7 @@
inverseMatrix: math.mat4(),
transposedMatrix: math.mat4(),
near: 0.1,
far: 2000.0
far: 10000.0
});

this._inverseMatrixDirty = true;
Expand Down Expand Up @@ -19601,12 +19605,12 @@
*
* Fires a "far" event on change.
*
* Default value is ````2000.0````.
* Default value is ````10000.0````.
*
* @param {Number} value New far ortho plane position.
*/
set far(value) {
const far = (value !== undefined && value !== null) ? value : 2000.0;
const far = (value !== undefined && value !== null) ? value : 10000.0;
if (this._state.far === far) {
return;
}
Expand Down Expand Up @@ -65466,11 +65470,6 @@
// get color
src.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);");

src.push(`if (color.a == 0u) {`);
src.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"); // Cull vertex
src.push(" return;");
src.push("};");

// get pick-color
src.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;");

Expand Down Expand Up @@ -75315,6 +75314,10 @@
this.error("[createGeometry] Param expected: `uvDecodeMatrix` (required for `uvCompressed')");
return null;
}
if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) {
const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3;
cfg.indices = this._createDefaultIndices(numPositions);
}
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
this.error(`[createGeometry] Param expected: indices (required for '${cfg.primitive}' primitive type)`);
return null;
Expand Down Expand Up @@ -75749,7 +75752,12 @@
this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");
return false;
}
if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) {
const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3;
cfg.indices = this._createDefaultIndices(numPositions);
}
if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") {
cfg.indices = this._createDefaultIndices(numIndices);
this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`);
return false;
}
Expand All @@ -75759,9 +75767,9 @@
}

const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles"
|| cfg.primitive === "solid"
|| cfg.primitive === "surface"))
&& (!cfg.textureSetId);
|| cfg.primitive === "solid"
|| cfg.primitive === "surface"))
&& (!cfg.textureSetId);

cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin;

Expand Down Expand Up @@ -75977,9 +75985,9 @@
}

const useDTX = (!!this._dtxEnabled
&& (cfg.geometry.primitive === "triangles"
|| cfg.geometry.primitive === "solid"
|| cfg.geometry.primitive === "surface"))
&& (cfg.geometry.primitive === "triangles"
|| cfg.geometry.primitive === "solid"
|| cfg.geometry.primitive === "surface"))
&& (!cfg.textureSetId);

if (useDTX) {
Expand Down Expand Up @@ -76034,6 +76042,14 @@
return true;
}

_createDefaultIndices(numIndices) {
const indices = [];
for (let i = 0; i < numIndices; i++) {
indices.push(i);
}
return indices;
}

_createMesh(cfg) {
const mesh = new SceneModelMesh(this, cfg.id, cfg.color, cfg.opacity, cfg.transform, cfg.textureSet);
mesh.pickId = this.scene._renderer.getPickID(mesh);
Expand Down Expand Up @@ -76636,7 +76652,7 @@
for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) {
const layerIndex = renderFlags.visibleLayers[i];
this.layerList[layerIndex].drawColorOpaque(renderFlags, frameCtx);
}
}
}

/** @private */
Expand Down

0 comments on commit b3e81c2

Please sign in to comment.