Skip to content

Commit

Permalink
npm bump; rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Aug 16, 2022
1 parent 1f98700 commit 3cb2d5c
Show file tree
Hide file tree
Showing 23 changed files with 16,672 additions and 15,389 deletions.
141 changes: 61 additions & 80 deletions assets/lib/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -16053,19 +16053,6 @@ const Renderer = function (scene, options) {

//------------------------------------------------------------------------------------------------------
// Render deferred bins
//
// Order:
//
// 1. Opaque color fill
// 2. Opaque edges
// 3. Opaque X-ray fill
// 4. Opaque X-ray edges
// 5. Opaque highlight
// 6. Transparent highlight
// 7. Selected opaque
// 8. Selected transparent
// 9. Normal transparent
// 10. X-rayed transparent
//------------------------------------------------------------------------------------------------------

// Opaque color with SAO
Expand Down Expand Up @@ -16101,6 +16088,66 @@ const Renderer = function (scene, options) {
}
}

// Transparent

if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
gl.enable(gl.CULL_FACE);
gl.enable(gl.BLEND);
if (canvasTransparent) {
gl.blendEquation(gl.FUNC_ADD);
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
} else {
gl.blendEquation(gl.FUNC_ADD);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
}
frameCtx.backfaces = false;
if (!alphaDepthMask) {
gl.depthMask(false);
}

// Transparent color edges

if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
}
if (normalEdgesTransparentBinLen > 0) {
for (i = 0; i < normalEdgesTransparentBinLen; i++) {
drawable = normalEdgesTransparentBin[i];
drawable.drawEdgesColorTransparent(frameCtx);
}
}

// Transparent color fill

if (normalFillTransparentBinLen > 0) {
for (i = 0; i < normalFillTransparentBinLen; i++) {
drawable = normalFillTransparentBin[i];
drawable.drawColorTransparent(frameCtx);
}
}

// Transparent X-ray edges

if (xrayEdgesTransparentBinLen > 0) {
for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
}
}

// Transparent X-ray fill

if (xrayedFillTransparentBinLen > 0) {
for (i = 0; i < xrayedFillTransparentBinLen; i++) {
xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
}
}

gl.disable(gl.BLEND);
if (!alphaDepthMask) {
gl.depthMask(true);
}
}

// Opaque highlight

if (highlightedFillOpaqueBinLen > 0 || highlightedEdgesOpaqueBinLen > 0) {
Expand Down Expand Up @@ -16219,66 +16266,6 @@ const Renderer = function (scene, options) {
gl.disable(gl.BLEND);
}

// Transparent

if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
gl.enable(gl.CULL_FACE);
gl.enable(gl.BLEND);
if (canvasTransparent) {
gl.blendEquation(gl.FUNC_ADD);
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
} else {
gl.blendEquation(gl.FUNC_ADD);
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
}
frameCtx.backfaces = false;
if (!alphaDepthMask) {
gl.depthMask(false);
}

// Transparent color edges

if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
}
if (normalEdgesTransparentBinLen > 0) {
for (i = 0; i < normalEdgesTransparentBinLen; i++) {
drawable = normalEdgesTransparentBin[i];
drawable.drawEdgesColorTransparent(frameCtx);
}
}

// Transparent color fill

if (normalFillTransparentBinLen > 0) {
for (i = 0; i < normalFillTransparentBinLen; i++) {
drawable = normalFillTransparentBin[i];
drawable.drawColorTransparent(frameCtx);
}
}

// Transparent X-ray edges

if (xrayEdgesTransparentBinLen > 0) {
for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
}
}

// Transparent X-ray fill

if (xrayedFillTransparentBinLen > 0) {
for (i = 0; i < xrayedFillTransparentBinLen; i++) {
xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
}
}

gl.disable(gl.BLEND);
if (!alphaDepthMask) {
gl.depthMask(true);
}
}

const endTime = Date.now();
const frameStats = stats.frame;

Expand Down Expand Up @@ -96090,7 +96077,7 @@ const IFCObjectDefaults = {
*
* ## Usage
*
* In the example below we'll load the Schependomlaan model from a [glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
* In the example below we'll load a house plan model from a [binary glTF file](http://xeokit.github.io/xeokit-sdk/examples/models/gltf/schependomlaan/), along
* with an accompanying JSON [IFC metadata file](http://xeokit.github.io/xeokit-sdk/examples/metaModels/schependomlaan/).
*
* This will create a bunch of {@link Entity}s that represents the model and its objects, along with a {@link MetaModel} and {@link MetaObject}s
Expand All @@ -96101,8 +96088,6 @@ const IFCObjectDefaults = {
*
* Read more about this example in the user guide on [Viewing BIM Models Offline](https://www.notion.so/xeokit/Viewing-an-IFC-Model-with-xeokit-c373e48bc4094ff5b6e5c5700ff580ee).
*
* [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
*
* ````javascript
* import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
*
Expand Down Expand Up @@ -96186,8 +96171,6 @@ const IFCObjectDefaults = {
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
* translate it 100 units along its X axis.
*
* [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_glTF_Duplex_transform)]
*
* ````javascript
* const model = gltfLoader.load({
* src: "./models/gltf/Duplex/scene.gltf",
Expand All @@ -96203,8 +96186,6 @@ const IFCObjectDefaults = {
* We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
* objects that represent walls.
*
* [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
*
* ````javascript
* const model = gltfLoader.load({
* id: "myModel",
Expand Down
1 change: 1 addition & 0 deletions assets/metaModels/Duplex.ifc.ifc2gltf.json

Large diffs are not rendered by default.

Loading

0 comments on commit 3cb2d5c

Please sign in to comment.