Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Nov 22, 2023
1 parent baea602 commit 5d3af78
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 105 deletions.
65 changes: 47 additions & 18 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -66193,28 +66193,33 @@ class TrianglesInstancingLayer {
if (!this._finalized) {
throw "Not finalized";
}
var offset = portionId * 4;

tempFloat32Vec4$2[0] = matrix[0];
tempFloat32Vec4$2[1] = matrix[4];
tempFloat32Vec4$2[2] = matrix[8];
tempFloat32Vec4$2[3] = matrix[12];
////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////

this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);
var offset = portionId * 4;

tempFloat32Vec4$2[0] = matrix[1];
tempFloat32Vec4$2[1] = matrix[5];
tempFloat32Vec4$2[2] = matrix[9];
tempFloat32Vec4$2[3] = matrix[13];
tempFloat32Vec4$2[0] = matrix[0];
tempFloat32Vec4$2[1] = matrix[4];
tempFloat32Vec4$2[2] = matrix[8];
tempFloat32Vec4$2[3] = matrix[12];

this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);
this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);

tempFloat32Vec4$2[0] = matrix[2];
tempFloat32Vec4$2[1] = matrix[6];
tempFloat32Vec4$2[2] = matrix[10];
tempFloat32Vec4$2[3] = matrix[14];
tempFloat32Vec4$2[0] = matrix[1];
tempFloat32Vec4$2[1] = matrix[5];
tempFloat32Vec4$2[2] = matrix[9];
tempFloat32Vec4$2[3] = matrix[13];

this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);

tempFloat32Vec4$2[0] = matrix[2];
tempFloat32Vec4$2[1] = matrix[6];
tempFloat32Vec4$2[2] = matrix[10];
tempFloat32Vec4$2[3] = matrix[14];

this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
}

// ---------------------- COLOR RENDERING -----------------------------------
Expand Down Expand Up @@ -68559,6 +68564,11 @@ class LinesInstancingLayer {
}

setMatrix(portionId, matrix) {

////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////

if (!this._finalized) {
throw "Not finalized";
}
Expand Down Expand Up @@ -71946,6 +71956,10 @@ class PointsInstancingLayer {
}

// setMatrix(portionId, matrix) {

////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////
//
// if (!this._finalized) {
// throw "Not finalized";
Expand Down Expand Up @@ -90953,8 +90967,7 @@ class MetaModel {
* @property rootMetaObject
* @type {MetaObject|null}
*/
get rootMetaObject()
{
get rootMetaObject() {
if (this.rootMetaObjects.length == 1) {
return this.rootMetaObjects[0];
}
Expand All @@ -90974,6 +90987,7 @@ class MetaModel {
this._globalizeIDs(metaModelData, options);

const metaScene = this.metaScene;
const propertyLookup = metaModelData.properties;

// Create global Property Sets

Expand All @@ -90982,6 +90996,9 @@ class MetaModel {
const propertySetData = metaModelData.propertySets[i];
let propertySet = metaScene.propertySets[propertySetData.id];
if (!propertySet) {
if (propertyLookup) {
this._decompressProperties(propertyLookup, propertySetData.properties);
}
propertySet = new PropertySet({
id: propertySetData.id,
originalSystemId: propertySetData.originalSystemId || propertySetData.id,
Expand Down Expand Up @@ -91027,6 +91044,18 @@ class MetaModel {
}
}

_decompressProperties(propertyLookup, properties) {
for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i];
if (Number.isInteger(property)) {
const lookupProperty = propertyLookup[property];
if (lookupProperty) {
properties[i] = lookupProperty;
}
}
}
}

finalize() {

if (this.finalized) {
Expand Down
65 changes: 47 additions & 18 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -66189,28 +66189,33 @@ class TrianglesInstancingLayer {
if (!this._finalized) {
throw "Not finalized";
}
var offset = portionId * 4;

tempFloat32Vec4$2[0] = matrix[0];
tempFloat32Vec4$2[1] = matrix[4];
tempFloat32Vec4$2[2] = matrix[8];
tempFloat32Vec4$2[3] = matrix[12];
////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////

this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);
var offset = portionId * 4;

tempFloat32Vec4$2[0] = matrix[1];
tempFloat32Vec4$2[1] = matrix[5];
tempFloat32Vec4$2[2] = matrix[9];
tempFloat32Vec4$2[3] = matrix[13];
tempFloat32Vec4$2[0] = matrix[0];
tempFloat32Vec4$2[1] = matrix[4];
tempFloat32Vec4$2[2] = matrix[8];
tempFloat32Vec4$2[3] = matrix[12];

this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);
this._state.modelMatrixCol0Buf.setData(tempFloat32Vec4$2, offset);

tempFloat32Vec4$2[0] = matrix[2];
tempFloat32Vec4$2[1] = matrix[6];
tempFloat32Vec4$2[2] = matrix[10];
tempFloat32Vec4$2[3] = matrix[14];
tempFloat32Vec4$2[0] = matrix[1];
tempFloat32Vec4$2[1] = matrix[5];
tempFloat32Vec4$2[2] = matrix[9];
tempFloat32Vec4$2[3] = matrix[13];

this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
this._state.modelMatrixCol1Buf.setData(tempFloat32Vec4$2, offset);

tempFloat32Vec4$2[0] = matrix[2];
tempFloat32Vec4$2[1] = matrix[6];
tempFloat32Vec4$2[2] = matrix[10];
tempFloat32Vec4$2[3] = matrix[14];

this._state.modelMatrixCol2Buf.setData(tempFloat32Vec4$2, offset);
}

// ---------------------- COLOR RENDERING -----------------------------------
Expand Down Expand Up @@ -68555,6 +68560,11 @@ class LinesInstancingLayer {
}

setMatrix(portionId, matrix) {

////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////

if (!this._finalized) {
throw "Not finalized";
}
Expand Down Expand Up @@ -71942,6 +71952,10 @@ class PointsInstancingLayer {
}

// setMatrix(portionId, matrix) {

////////////////////////////////////////
// TODO: Update portion matrix
////////////////////////////////////////
//
// if (!this._finalized) {
// throw "Not finalized";
Expand Down Expand Up @@ -90949,8 +90963,7 @@ class MetaModel {
* @property rootMetaObject
* @type {MetaObject|null}
*/
get rootMetaObject()
{
get rootMetaObject() {
if (this.rootMetaObjects.length == 1) {
return this.rootMetaObjects[0];
}
Expand All @@ -90970,6 +90983,7 @@ class MetaModel {
this._globalizeIDs(metaModelData, options);

const metaScene = this.metaScene;
const propertyLookup = metaModelData.properties;

// Create global Property Sets

Expand All @@ -90978,6 +90992,9 @@ class MetaModel {
const propertySetData = metaModelData.propertySets[i];
let propertySet = metaScene.propertySets[propertySetData.id];
if (!propertySet) {
if (propertyLookup) {
this._decompressProperties(propertyLookup, propertySetData.properties);
}
propertySet = new PropertySet({
id: propertySetData.id,
originalSystemId: propertySetData.originalSystemId || propertySetData.id,
Expand Down Expand Up @@ -91023,6 +91040,18 @@ class MetaModel {
}
}

_decompressProperties(propertyLookup, properties) {
for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i];
if (Number.isInteger(property)) {
const lookupProperty = propertyLookup[property];
if (lookupProperty) {
properties[i] = lookupProperty;
}
}
}
}

finalize() {

if (this.finalized) {
Expand Down
Loading

0 comments on commit 5d3af78

Please sign in to comment.