Skip to content

Commit

Permalink
Build
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Sep 2, 2023
1 parent f665f6d commit 1028897
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 25 deletions.
24 changes: 20 additions & 4 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46096,8 +46096,6 @@ class SceneModel extends Component {

super(owner, cfg);

console.log("Creating SceneModel");

this._dtxEnabled = this.scene.dtxEnabled && (cfg.dtxEnabled !== false);

this._enableVertexWelding = false; // Not needed for most objects, and very expensive, so disabled
Expand Down Expand Up @@ -47429,7 +47427,7 @@ class SceneModel extends Component {

// Batched geometry

const useDTX = !!this._dtxEnabled; // Data textures - disabled by default for now
const useDTX = !!this._dtxEnabled;

if (cfg.primitive === undefined || cfg.primitive === null) {
cfg.primitive = "triangles";
Expand Down Expand Up @@ -47769,6 +47767,7 @@ class SceneModel extends Component {
return dtxLayer;
}
}
console.log(`[SceneModel ${this.id}]: creating TrianglesDataTextureLayer`);
dtxLayer = new TrianglesDataTextureLayer(this, {layerIndex: 0, origin}); // layerIndex is set in #finalize()
this._dtxLayers[layerId] = dtxLayer;
this._layerList.push(dtxLayer);
Expand All @@ -47791,6 +47790,7 @@ class SceneModel extends Component {
while (!vboBatchingLayer) {
switch (cfg.primitive) {
case "triangles":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47805,6 +47805,7 @@ class SceneModel extends Component {
});
break;
case "solid":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47819,6 +47820,7 @@ class SceneModel extends Component {
});
break;
case "surface":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47833,6 +47835,7 @@ class SceneModel extends Component {
});
break;
case "lines":
console.log(`[SceneModel ${this.id}]: creating LinesBatchingLayer`);
vboBatchingLayer = new LinesBatchingLayer({
model,
layerIndex: 0, // This is set in #finalize()
Expand All @@ -47844,6 +47847,7 @@ class SceneModel extends Component {
});
break;
case "points":
console.log(`[SceneModel ${this.id}]: creating PointsBatchingLayer`);
vboBatchingLayer = new PointsBatchingLayer({
model,
layerIndex: 0, // This is set in #finalize()
Expand Down Expand Up @@ -47897,6 +47901,7 @@ class SceneModel extends Component {
while (!vboInstancingLayer) {
switch (geometry.primitive) {
case "triangles":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47907,6 +47912,7 @@ class SceneModel extends Component {
});
break;
case "solid":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47917,6 +47923,7 @@ class SceneModel extends Component {
});
break;
case "surface":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47927,6 +47934,7 @@ class SceneModel extends Component {
});
break;
case "lines":
console.log(`[SceneModel ${this.id}]: creating LinesInstancingLayer`);
vboInstancingLayer = new LinesInstancingLayer({
model,
textureSet,
Expand All @@ -47936,6 +47944,7 @@ class SceneModel extends Component {
});
break;
case "points":
console.log(`[SceneModel ${this.id}]: creating PointsInstancingLayer`);
vboInstancingLayer = new PointsInstancingLayer({
model,
textureSet,
Expand Down Expand Up @@ -99444,6 +99453,10 @@ class Viewer {
* @param {Boolean} [cfg.colorTextureEnabled=true] Whether to enable base color texture rendering.
* @param {Boolean} [cfg.pbrEnabled=false] Whether to enable physically-based rendering.
* @param {LocaleService} [cfg.localeService=null] Optional locale-based translation service.
* @param {Boolean} [cfg.dtxEnabled=false] Whether to enable data texture-based (DTX) scene representation within the Viewer. When this is true, the Viewer will use data textures to
* store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
* to use textures to hold geometry data. Works great on most medium/high-end GPUs found in desktop computers, including the nVIDIA and Intel HD chipsets. Set this false to use the default vertex buffer object (VBO)
* mode for storing geometry, which is the standard technique used in most graphics engines, and will work adequately on most low-end GPUs.
*/
constructor(cfg) {

Expand Down Expand Up @@ -99500,7 +99513,10 @@ class Viewer {
pickSurfacePrecisionEnabled: (!!cfg.pickSurfacePrecisionEnabled),
logarithmicDepthBufferEnabled: (!!cfg.logarithmicDepthBufferEnabled),
pbrEnabled: (!!cfg.pbrEnabled),
colorTextureEnabled: (cfg.colorTextureEnabled !== false)
lodEnabled: (!!cfg.lodEnabled),
vfcCulling: (!!cfg.vfcEnabled),
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
dtxEnabled: (!!cfg.dtxEnabled)
});

/**
Expand Down
24 changes: 20 additions & 4 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -46092,8 +46092,6 @@ class SceneModel extends Component {

super(owner, cfg);

console.log("Creating SceneModel");

this._dtxEnabled = this.scene.dtxEnabled && (cfg.dtxEnabled !== false);

this._enableVertexWelding = false; // Not needed for most objects, and very expensive, so disabled
Expand Down Expand Up @@ -47425,7 +47423,7 @@ class SceneModel extends Component {

// Batched geometry

const useDTX = !!this._dtxEnabled; // Data textures - disabled by default for now
const useDTX = !!this._dtxEnabled;

if (cfg.primitive === undefined || cfg.primitive === null) {
cfg.primitive = "triangles";
Expand Down Expand Up @@ -47765,6 +47763,7 @@ class SceneModel extends Component {
return dtxLayer;
}
}
console.log(`[SceneModel ${this.id}]: creating TrianglesDataTextureLayer`);
dtxLayer = new TrianglesDataTextureLayer(this, {layerIndex: 0, origin}); // layerIndex is set in #finalize()
this._dtxLayers[layerId] = dtxLayer;
this._layerList.push(dtxLayer);
Expand All @@ -47787,6 +47786,7 @@ class SceneModel extends Component {
while (!vboBatchingLayer) {
switch (cfg.primitive) {
case "triangles":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47801,6 +47801,7 @@ class SceneModel extends Component {
});
break;
case "solid":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47815,6 +47816,7 @@ class SceneModel extends Component {
});
break;
case "surface":
console.log(`[SceneModel ${this.id}]: creating TrianglesBatchingLayer`);
vboBatchingLayer = new TrianglesBatchingLayer({
model,
textureSet,
Expand All @@ -47829,6 +47831,7 @@ class SceneModel extends Component {
});
break;
case "lines":
console.log(`[SceneModel ${this.id}]: creating LinesBatchingLayer`);
vboBatchingLayer = new LinesBatchingLayer({
model,
layerIndex: 0, // This is set in #finalize()
Expand All @@ -47840,6 +47843,7 @@ class SceneModel extends Component {
});
break;
case "points":
console.log(`[SceneModel ${this.id}]: creating PointsBatchingLayer`);
vboBatchingLayer = new PointsBatchingLayer({
model,
layerIndex: 0, // This is set in #finalize()
Expand Down Expand Up @@ -47893,6 +47897,7 @@ class SceneModel extends Component {
while (!vboInstancingLayer) {
switch (geometry.primitive) {
case "triangles":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47903,6 +47908,7 @@ class SceneModel extends Component {
});
break;
case "solid":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47913,6 +47919,7 @@ class SceneModel extends Component {
});
break;
case "surface":
console.log(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`);
vboInstancingLayer = new TrianglesInstancingLayer({
model,
textureSet,
Expand All @@ -47923,6 +47930,7 @@ class SceneModel extends Component {
});
break;
case "lines":
console.log(`[SceneModel ${this.id}]: creating LinesInstancingLayer`);
vboInstancingLayer = new LinesInstancingLayer({
model,
textureSet,
Expand All @@ -47932,6 +47940,7 @@ class SceneModel extends Component {
});
break;
case "points":
console.log(`[SceneModel ${this.id}]: creating PointsInstancingLayer`);
vboInstancingLayer = new PointsInstancingLayer({
model,
textureSet,
Expand Down Expand Up @@ -99440,6 +99449,10 @@ class Viewer {
* @param {Boolean} [cfg.colorTextureEnabled=true] Whether to enable base color texture rendering.
* @param {Boolean} [cfg.pbrEnabled=false] Whether to enable physically-based rendering.
* @param {LocaleService} [cfg.localeService=null] Optional locale-based translation service.
* @param {Boolean} [cfg.dtxEnabled=false] Whether to enable data texture-based (DTX) scene representation within the Viewer. When this is true, the Viewer will use data textures to
* store geometry on the GPU for triangle meshes that don't have textures. This gives a much lower memory footprint for these types of model element. This mode may not perform well on low-end GPUs that are optimized
* to use textures to hold geometry data. Works great on most medium/high-end GPUs found in desktop computers, including the nVIDIA and Intel HD chipsets. Set this false to use the default vertex buffer object (VBO)
* mode for storing geometry, which is the standard technique used in most graphics engines, and will work adequately on most low-end GPUs.
*/
constructor(cfg) {

Expand Down Expand Up @@ -99496,7 +99509,10 @@ class Viewer {
pickSurfacePrecisionEnabled: (!!cfg.pickSurfacePrecisionEnabled),
logarithmicDepthBufferEnabled: (!!cfg.logarithmicDepthBufferEnabled),
pbrEnabled: (!!cfg.pbrEnabled),
colorTextureEnabled: (cfg.colorTextureEnabled !== false)
lodEnabled: (!!cfg.lodEnabled),
vfcCulling: (!!cfg.vfcEnabled),
colorTextureEnabled: (cfg.colorTextureEnabled !== false),
dtxEnabled: (!!cfg.dtxEnabled)
});

/**
Expand Down
Loading

0 comments on commit 1028897

Please sign in to comment.