Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Feb 28, 2024
1 parent 32ffb47 commit 29d5921
Show file tree
Hide file tree
Showing 6 changed files with 191 additions and 145 deletions.
45 changes: 33 additions & 12 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20753,7 +20753,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 @@ -20903,10 +20903,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 @@ -20918,6 +20920,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 @@ -21054,7 +21058,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 @@ -21180,12 +21184,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 @@ -81908,6 +81912,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 @@ -82342,7 +82350,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 @@ -82352,9 +82365,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 @@ -82570,9 +82583,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 @@ -82627,6 +82640,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 @@ -83229,7 +83250,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
45 changes: 33 additions & 12 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -20749,7 +20749,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 @@ -20899,10 +20899,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 @@ -20914,6 +20916,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 @@ -21050,7 +21054,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 @@ -21176,12 +21180,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 @@ -81904,6 +81908,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 @@ -82338,7 +82346,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 @@ -82348,9 +82361,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 @@ -82566,9 +82579,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 @@ -82623,6 +82636,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 @@ -83225,7 +83246,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
Loading

0 comments on commit 29d5921

Please sign in to comment.