@@ -16053,19 +16053,6 @@ const Renderer = function (scene, options) {
16053
16053
16054
16054
//------------------------------------------------------------------------------------------------------
16055
16055
// Render deferred bins
16056
- //
16057
- // Order:
16058
- //
16059
- // 1. Opaque color fill
16060
- // 2. Opaque edges
16061
- // 3. Opaque X-ray fill
16062
- // 4. Opaque X-ray edges
16063
- // 5. Opaque highlight
16064
- // 6. Transparent highlight
16065
- // 7. Selected opaque
16066
- // 8. Selected transparent
16067
- // 9. Normal transparent
16068
- // 10. X-rayed transparent
16069
16056
//------------------------------------------------------------------------------------------------------
16070
16057
16071
16058
// Opaque color with SAO
@@ -16101,6 +16088,66 @@ const Renderer = function (scene, options) {
16101
16088
}
16102
16089
}
16103
16090
16091
+ // Transparent
16092
+
16093
+ if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
16094
+ gl.enable(gl.CULL_FACE);
16095
+ gl.enable(gl.BLEND);
16096
+ if (canvasTransparent) {
16097
+ gl.blendEquation(gl.FUNC_ADD);
16098
+ gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
16099
+ } else {
16100
+ gl.blendEquation(gl.FUNC_ADD);
16101
+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
16102
+ }
16103
+ frameCtx.backfaces = false;
16104
+ if (!alphaDepthMask) {
16105
+ gl.depthMask(false);
16106
+ }
16107
+
16108
+ // Transparent color edges
16109
+
16110
+ if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
16111
+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
16112
+ }
16113
+ if (normalEdgesTransparentBinLen > 0) {
16114
+ for (i = 0; i < normalEdgesTransparentBinLen; i++) {
16115
+ drawable = normalEdgesTransparentBin[i];
16116
+ drawable.drawEdgesColorTransparent(frameCtx);
16117
+ }
16118
+ }
16119
+
16120
+ // Transparent color fill
16121
+
16122
+ if (normalFillTransparentBinLen > 0) {
16123
+ for (i = 0; i < normalFillTransparentBinLen; i++) {
16124
+ drawable = normalFillTransparentBin[i];
16125
+ drawable.drawColorTransparent(frameCtx);
16126
+ }
16127
+ }
16128
+
16129
+ // Transparent X-ray edges
16130
+
16131
+ if (xrayEdgesTransparentBinLen > 0) {
16132
+ for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
16133
+ xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
16134
+ }
16135
+ }
16136
+
16137
+ // Transparent X-ray fill
16138
+
16139
+ if (xrayedFillTransparentBinLen > 0) {
16140
+ for (i = 0; i < xrayedFillTransparentBinLen; i++) {
16141
+ xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
16142
+ }
16143
+ }
16144
+
16145
+ gl.disable(gl.BLEND);
16146
+ if (!alphaDepthMask) {
16147
+ gl.depthMask(true);
16148
+ }
16149
+ }
16150
+
16104
16151
// Opaque highlight
16105
16152
16106
16153
if (highlightedFillOpaqueBinLen > 0 || highlightedEdgesOpaqueBinLen > 0) {
@@ -16219,66 +16266,6 @@ const Renderer = function (scene, options) {
16219
16266
gl.disable(gl.BLEND);
16220
16267
}
16221
16268
16222
- // Transparent
16223
-
16224
- if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
16225
- gl.enable(gl.CULL_FACE);
16226
- gl.enable(gl.BLEND);
16227
- if (canvasTransparent) {
16228
- gl.blendEquation(gl.FUNC_ADD);
16229
- gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
16230
- } else {
16231
- gl.blendEquation(gl.FUNC_ADD);
16232
- gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
16233
- }
16234
- frameCtx.backfaces = false;
16235
- if (!alphaDepthMask) {
16236
- gl.depthMask(false);
16237
- }
16238
-
16239
- // Transparent color edges
16240
-
16241
- if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
16242
- gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
16243
- }
16244
- if (normalEdgesTransparentBinLen > 0) {
16245
- for (i = 0; i < normalEdgesTransparentBinLen; i++) {
16246
- drawable = normalEdgesTransparentBin[i];
16247
- drawable.drawEdgesColorTransparent(frameCtx);
16248
- }
16249
- }
16250
-
16251
- // Transparent color fill
16252
-
16253
- if (normalFillTransparentBinLen > 0) {
16254
- for (i = 0; i < normalFillTransparentBinLen; i++) {
16255
- drawable = normalFillTransparentBin[i];
16256
- drawable.drawColorTransparent(frameCtx);
16257
- }
16258
- }
16259
-
16260
- // Transparent X-ray edges
16261
-
16262
- if (xrayEdgesTransparentBinLen > 0) {
16263
- for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
16264
- xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
16265
- }
16266
- }
16267
-
16268
- // Transparent X-ray fill
16269
-
16270
- if (xrayedFillTransparentBinLen > 0) {
16271
- for (i = 0; i < xrayedFillTransparentBinLen; i++) {
16272
- xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
16273
- }
16274
- }
16275
-
16276
- gl.disable(gl.BLEND);
16277
- if (!alphaDepthMask) {
16278
- gl.depthMask(true);
16279
- }
16280
- }
16281
-
16282
16269
const endTime = Date.now();
16283
16270
const frameStats = stats.frame;
16284
16271
@@ -96090,7 +96077,7 @@ const IFCObjectDefaults = {
96090
96077
*
96091
96078
* ## Usage
96092
96079
*
96093
- * 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
96080
+ * 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
96094
96081
* with an accompanying JSON [IFC metadata file](http://xeokit.github.io/xeokit-sdk/examples/metaModels/schependomlaan/).
96095
96082
*
96096
96083
* 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
@@ -96101,8 +96088,6 @@ const IFCObjectDefaults = {
96101
96088
*
96102
96089
* 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).
96103
96090
*
96104
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_OTCConferenceCenter)]
96105
- *
96106
96091
* ````javascript
96107
96092
* import {Viewer, GLTFLoaderPlugin} from "xeokit-sdk.es.js";
96108
96093
*
@@ -96186,8 +96171,6 @@ const IFCObjectDefaults = {
96186
96171
* In the example below, we'll scale our model to half its size, rotate it 90 degrees about its local X-axis, then
96187
96172
* translate it 100 units along its X axis.
96188
96173
*
96189
- * [[Run example](https://xeokit.github.io/xeokit-sdk/examples/#loading_glTF_Duplex_transform)]
96190
- *
96191
96174
* ````javascript
96192
96175
* const model = gltfLoader.load({
96193
96176
* src: "./models/gltf/Duplex/scene.gltf",
@@ -96203,8 +96186,6 @@ const IFCObjectDefaults = {
96203
96186
* We can also load only those objects that have the specified IFC types. In the example below, we'll load only the
96204
96187
* objects that represent walls.
96205
96188
*
96206
- * [[Run this example](http://xeokit.github.io/xeokit-sdk/examples/#BIMOffline_glTF_includeTypes_PlanView)]
96207
- *
96208
96189
* ````javascript
96209
96190
* const model = gltfLoader.load({
96210
96191
* id: "myModel",
0 commit comments