@xeokit/xeokit-sdk 2.3.0-beta-33 → 2.3.0-beta-35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/xeokit-sdk.cjs.js +60 -73
- package/dist/xeokit-sdk.es.js +60 -73
- package/dist/xeokit-sdk.es5.js +7 -20
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/dist/xeokit-sdk.min.es5.js +1 -1
- package/package.json +1 -2
- package/types/viewer/scene/scene/Scene.d.ts +21 -0
package/dist/xeokit-sdk.cjs.js
CHANGED
|
@@ -16057,19 +16057,6 @@ const Renderer = function (scene, options) {
|
|
|
16057
16057
|
|
|
16058
16058
|
//------------------------------------------------------------------------------------------------------
|
|
16059
16059
|
// Render deferred bins
|
|
16060
|
-
//
|
|
16061
|
-
// Order:
|
|
16062
|
-
//
|
|
16063
|
-
// 1. Opaque color fill
|
|
16064
|
-
// 2. Opaque edges
|
|
16065
|
-
// 3. Opaque X-ray fill
|
|
16066
|
-
// 4. Opaque X-ray edges
|
|
16067
|
-
// 5. Opaque highlight
|
|
16068
|
-
// 6. Transparent highlight
|
|
16069
|
-
// 7. Selected opaque
|
|
16070
|
-
// 8. Selected transparent
|
|
16071
|
-
// 9. Normal transparent
|
|
16072
|
-
// 10. X-rayed transparent
|
|
16073
16060
|
//------------------------------------------------------------------------------------------------------
|
|
16074
16061
|
|
|
16075
16062
|
// Opaque color with SAO
|
|
@@ -16105,6 +16092,66 @@ const Renderer = function (scene, options) {
|
|
|
16105
16092
|
}
|
|
16106
16093
|
}
|
|
16107
16094
|
|
|
16095
|
+
// Transparent
|
|
16096
|
+
|
|
16097
|
+
if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
|
|
16098
|
+
gl.enable(gl.CULL_FACE);
|
|
16099
|
+
gl.enable(gl.BLEND);
|
|
16100
|
+
if (canvasTransparent) {
|
|
16101
|
+
gl.blendEquation(gl.FUNC_ADD);
|
|
16102
|
+
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
|
16103
|
+
} else {
|
|
16104
|
+
gl.blendEquation(gl.FUNC_ADD);
|
|
16105
|
+
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
16106
|
+
}
|
|
16107
|
+
frameCtx.backfaces = false;
|
|
16108
|
+
if (!alphaDepthMask) {
|
|
16109
|
+
gl.depthMask(false);
|
|
16110
|
+
}
|
|
16111
|
+
|
|
16112
|
+
// Transparent color edges
|
|
16113
|
+
|
|
16114
|
+
if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
|
|
16115
|
+
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
16116
|
+
}
|
|
16117
|
+
if (normalEdgesTransparentBinLen > 0) {
|
|
16118
|
+
for (i = 0; i < normalEdgesTransparentBinLen; i++) {
|
|
16119
|
+
drawable = normalEdgesTransparentBin[i];
|
|
16120
|
+
drawable.drawEdgesColorTransparent(frameCtx);
|
|
16121
|
+
}
|
|
16122
|
+
}
|
|
16123
|
+
|
|
16124
|
+
// Transparent color fill
|
|
16125
|
+
|
|
16126
|
+
if (normalFillTransparentBinLen > 0) {
|
|
16127
|
+
for (i = 0; i < normalFillTransparentBinLen; i++) {
|
|
16128
|
+
drawable = normalFillTransparentBin[i];
|
|
16129
|
+
drawable.drawColorTransparent(frameCtx);
|
|
16130
|
+
}
|
|
16131
|
+
}
|
|
16132
|
+
|
|
16133
|
+
// Transparent X-ray edges
|
|
16134
|
+
|
|
16135
|
+
if (xrayEdgesTransparentBinLen > 0) {
|
|
16136
|
+
for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
|
|
16137
|
+
xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
|
|
16138
|
+
}
|
|
16139
|
+
}
|
|
16140
|
+
|
|
16141
|
+
// Transparent X-ray fill
|
|
16142
|
+
|
|
16143
|
+
if (xrayedFillTransparentBinLen > 0) {
|
|
16144
|
+
for (i = 0; i < xrayedFillTransparentBinLen; i++) {
|
|
16145
|
+
xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
|
|
16146
|
+
}
|
|
16147
|
+
}
|
|
16148
|
+
|
|
16149
|
+
gl.disable(gl.BLEND);
|
|
16150
|
+
if (!alphaDepthMask) {
|
|
16151
|
+
gl.depthMask(true);
|
|
16152
|
+
}
|
|
16153
|
+
}
|
|
16154
|
+
|
|
16108
16155
|
// Opaque highlight
|
|
16109
16156
|
|
|
16110
16157
|
if (highlightedFillOpaqueBinLen > 0 || highlightedEdgesOpaqueBinLen > 0) {
|
|
@@ -16223,66 +16270,6 @@ const Renderer = function (scene, options) {
|
|
|
16223
16270
|
gl.disable(gl.BLEND);
|
|
16224
16271
|
}
|
|
16225
16272
|
|
|
16226
|
-
// Transparent
|
|
16227
|
-
|
|
16228
|
-
if (xrayedFillTransparentBinLen > 0 || xrayEdgesTransparentBinLen > 0 || normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
|
|
16229
|
-
gl.enable(gl.CULL_FACE);
|
|
16230
|
-
gl.enable(gl.BLEND);
|
|
16231
|
-
if (canvasTransparent) {
|
|
16232
|
-
gl.blendEquation(gl.FUNC_ADD);
|
|
16233
|
-
gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
|
|
16234
|
-
} else {
|
|
16235
|
-
gl.blendEquation(gl.FUNC_ADD);
|
|
16236
|
-
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
16237
|
-
}
|
|
16238
|
-
frameCtx.backfaces = false;
|
|
16239
|
-
if (!alphaDepthMask) {
|
|
16240
|
-
gl.depthMask(false);
|
|
16241
|
-
}
|
|
16242
|
-
|
|
16243
|
-
// Transparent color edges
|
|
16244
|
-
|
|
16245
|
-
if (normalFillTransparentBinLen > 0 || normalEdgesTransparentBinLen > 0) {
|
|
16246
|
-
gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
|
|
16247
|
-
}
|
|
16248
|
-
if (normalEdgesTransparentBinLen > 0) {
|
|
16249
|
-
for (i = 0; i < normalEdgesTransparentBinLen; i++) {
|
|
16250
|
-
drawable = normalEdgesTransparentBin[i];
|
|
16251
|
-
drawable.drawEdgesColorTransparent(frameCtx);
|
|
16252
|
-
}
|
|
16253
|
-
}
|
|
16254
|
-
|
|
16255
|
-
// Transparent color fill
|
|
16256
|
-
|
|
16257
|
-
if (normalFillTransparentBinLen > 0) {
|
|
16258
|
-
for (i = 0; i < normalFillTransparentBinLen; i++) {
|
|
16259
|
-
drawable = normalFillTransparentBin[i];
|
|
16260
|
-
drawable.drawColorTransparent(frameCtx);
|
|
16261
|
-
}
|
|
16262
|
-
}
|
|
16263
|
-
|
|
16264
|
-
// Transparent X-ray edges
|
|
16265
|
-
|
|
16266
|
-
if (xrayEdgesTransparentBinLen > 0) {
|
|
16267
|
-
for (i = 0; i < xrayEdgesTransparentBinLen; i++) {
|
|
16268
|
-
xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);
|
|
16269
|
-
}
|
|
16270
|
-
}
|
|
16271
|
-
|
|
16272
|
-
// Transparent X-ray fill
|
|
16273
|
-
|
|
16274
|
-
if (xrayedFillTransparentBinLen > 0) {
|
|
16275
|
-
for (i = 0; i < xrayedFillTransparentBinLen; i++) {
|
|
16276
|
-
xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);
|
|
16277
|
-
}
|
|
16278
|
-
}
|
|
16279
|
-
|
|
16280
|
-
gl.disable(gl.BLEND);
|
|
16281
|
-
if (!alphaDepthMask) {
|
|
16282
|
-
gl.depthMask(true);
|
|
16283
|
-
}
|
|
16284
|
-
}
|
|
16285
|
-
|
|
16286
16273
|
const endTime = Date.now();
|
|
16287
16274
|
const frameStats = stats.frame;
|
|
16288
16275
|
|
package/dist/xeokit-sdk.es.js
CHANGED
|
@@ -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
|
|
package/dist/xeokit-sdk.es5.js
CHANGED
|
@@ -4010,25 +4010,17 @@ var normalDrawSAOBin=[];var normalEdgesOpaqueBin=[];var normalFillTransparentBin
|
|
|
4010
4010
|
//------------------------------------------------------------------------------------------------------
|
|
4011
4011
|
for(var type in drawableTypeInfo){if(drawableTypeInfo.hasOwnProperty(type)){var drawableInfo=drawableTypeInfo[type];var drawableList=drawableInfo.drawableList;for(i=0,len=drawableList.length;i<len;i++){drawable=drawableList[i];if(drawable.culled===true||drawable.visible===false){continue;}var renderFlags=drawable.renderFlags;if(renderFlags.colorOpaque){if(saoEnabled&&saoPossible&&drawable.saoEnabled){normalDrawSAOBin[normalDrawSAOBinLen++]=drawable;}else{drawable.drawColorOpaque(frameCtx);}}if(transparentEnabled){if(renderFlags.colorTransparent){normalFillTransparentBin[normalFillTransparentBinLen++]=drawable;}}if(renderFlags.xrayedSilhouetteTransparent){xrayedFillTransparentBin[xrayedFillTransparentBinLen++]=drawable;}if(renderFlags.xrayedSilhouetteOpaque){xrayedFillOpaqueBin[xrayedFillOpaqueBinLen++]=drawable;}if(renderFlags.highlightedSilhouetteTransparent){highlightedFillTransparentBin[highlightedFillTransparentBinLen++]=drawable;}if(renderFlags.highlightedSilhouetteOpaque){highlightedFillOpaqueBin[highlightedFillOpaqueBinLen++]=drawable;}if(renderFlags.selectedSilhouetteTransparent){selectedFillTransparentBin[selectedFillTransparentBinLen++]=drawable;}if(renderFlags.selectedSilhouetteOpaque){selectedFillOpaqueBin[selectedFillOpaqueBinLen++]=drawable;}if(edgesEnabled){if(renderFlags.edgesOpaque){normalEdgesOpaqueBin[normalEdgesOpaqueBinLen++]=drawable;}if(renderFlags.edgesTransparent){normalEdgesTransparentBin[normalEdgesTransparentBinLen++]=drawable;}}if(renderFlags.selectedEdgesTransparent){selectedEdgesTransparentBin[selectedEdgesTransparentBinLen++]=drawable;}if(renderFlags.selectedEdgesOpaque){selectedEdgesOpaqueBin[selectedEdgesOpaqueBinLen++]=drawable;}if(renderFlags.xrayedEdgesTransparent){xrayEdgesTransparentBin[xrayEdgesTransparentBinLen++]=drawable;}if(renderFlags.xrayedEdgesOpaque){xrayEdgesOpaqueBin[xrayEdgesOpaqueBinLen++]=drawable;}if(renderFlags.highlightedEdgesTransparent){highlightedEdgesTransparentBin[highlightedEdgesTransparentBinLen++]=drawable;}if(renderFlags.highlightedEdgesOpaque){highlightedEdgesOpaqueBin[highlightedEdgesOpaqueBinLen++]=drawable;}}}}//------------------------------------------------------------------------------------------------------
|
|
4012
4012
|
// Render deferred bins
|
|
4013
|
-
//
|
|
4014
|
-
// Order:
|
|
4015
|
-
//
|
|
4016
|
-
// 1. Opaque color fill
|
|
4017
|
-
// 2. Opaque edges
|
|
4018
|
-
// 3. Opaque X-ray fill
|
|
4019
|
-
// 4. Opaque X-ray edges
|
|
4020
|
-
// 5. Opaque highlight
|
|
4021
|
-
// 6. Transparent highlight
|
|
4022
|
-
// 7. Selected opaque
|
|
4023
|
-
// 8. Selected transparent
|
|
4024
|
-
// 9. Normal transparent
|
|
4025
|
-
// 10. X-rayed transparent
|
|
4026
4013
|
//------------------------------------------------------------------------------------------------------
|
|
4027
4014
|
// Opaque color with SAO
|
|
4028
4015
|
if(normalDrawSAOBinLen>0){frameCtx.withSAO=true;for(i=0;i<normalDrawSAOBinLen;i++){normalDrawSAOBin[i].drawColorOpaque(frameCtx);}}// Opaque edges
|
|
4029
4016
|
if(normalEdgesOpaqueBinLen>0){for(i=0;i<normalEdgesOpaqueBinLen;i++){normalEdgesOpaqueBin[i].drawEdgesColorOpaque(frameCtx);}}// Opaque X-ray fill
|
|
4030
4017
|
if(xrayedFillOpaqueBinLen>0){for(i=0;i<xrayedFillOpaqueBinLen;i++){xrayedFillOpaqueBin[i].drawSilhouetteXRayed(frameCtx);}}// Opaque X-ray edges
|
|
4031
|
-
if(xrayEdgesOpaqueBinLen>0){for(i=0;i<xrayEdgesOpaqueBinLen;i++){xrayEdgesOpaqueBin[i].drawEdgesXRayed(frameCtx);}}//
|
|
4018
|
+
if(xrayEdgesOpaqueBinLen>0){for(i=0;i<xrayEdgesOpaqueBinLen;i++){xrayEdgesOpaqueBin[i].drawEdgesXRayed(frameCtx);}}// Transparent
|
|
4019
|
+
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
|
|
4020
|
+
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
|
|
4021
|
+
if(normalFillTransparentBinLen>0){for(i=0;i<normalFillTransparentBinLen;i++){drawable=normalFillTransparentBin[i];drawable.drawColorTransparent(frameCtx);}}// Transparent X-ray edges
|
|
4022
|
+
if(xrayEdgesTransparentBinLen>0){for(i=0;i<xrayEdgesTransparentBinLen;i++){xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);}}// Transparent X-ray fill
|
|
4023
|
+
if(xrayedFillTransparentBinLen>0){for(i=0;i<xrayedFillTransparentBinLen;i++){xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);}}gl.disable(gl.BLEND);if(!alphaDepthMask){gl.depthMask(true);}}// Opaque highlight
|
|
4032
4024
|
if(highlightedFillOpaqueBinLen>0||highlightedEdgesOpaqueBinLen>0){frameCtx.lastProgramId=null;if(scene.highlightMaterial.glowThrough){gl.clear(gl.DEPTH_BUFFER_BIT);}// Opaque highlighted edges
|
|
4033
4025
|
if(highlightedEdgesOpaqueBinLen>0){for(i=0;i<highlightedEdgesOpaqueBinLen;i++){highlightedEdgesOpaqueBin[i].drawEdgesHighlighted(frameCtx);}}// Opaque highlighted fill
|
|
4034
4026
|
if(highlightedFillOpaqueBinLen>0){for(i=0;i<highlightedFillOpaqueBinLen;i++){highlightedFillOpaqueBin[i].drawSilhouetteHighlighted(frameCtx);}}}// Highlighted transparent
|
|
@@ -4040,12 +4032,7 @@ if(selectedEdgesOpaqueBinLen>0){for(i=0;i<selectedEdgesOpaqueBinLen;i++){selecte
|
|
|
4040
4032
|
if(selectedFillOpaqueBinLen>0){for(i=0;i<selectedFillOpaqueBinLen;i++){selectedFillOpaqueBin[i].drawSilhouetteSelected(frameCtx);}}}// Selected transparent
|
|
4041
4033
|
if(selectedFillTransparentBinLen>0||selectedEdgesTransparentBinLen>0){frameCtx.lastProgramId=null;if(scene.selectedMaterial.glowThrough){gl.clear(gl.DEPTH_BUFFER_BIT);}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.blendFunc(gl.SRC_ALPHA,gl.ONE_MINUS_SRC_ALPHA);}// Selected transparent edges
|
|
4042
4034
|
if(selectedEdgesTransparentBinLen>0){for(i=0;i<selectedEdgesTransparentBinLen;i++){selectedEdgesTransparentBin[i].drawEdgesSelected(frameCtx);}}// Selected transparent fill
|
|
4043
|
-
if(selectedFillTransparentBinLen>0){for(i=0;i<selectedFillTransparentBinLen;i++){selectedFillTransparentBin[i].drawSilhouetteSelected(frameCtx);}}gl.disable(gl.BLEND);}
|
|
4044
|
-
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
|
|
4045
|
-
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
|
|
4046
|
-
if(normalFillTransparentBinLen>0){for(i=0;i<normalFillTransparentBinLen;i++){drawable=normalFillTransparentBin[i];drawable.drawColorTransparent(frameCtx);}}// Transparent X-ray edges
|
|
4047
|
-
if(xrayEdgesTransparentBinLen>0){for(i=0;i<xrayEdgesTransparentBinLen;i++){xrayEdgesTransparentBin[i].drawEdgesXRayed(frameCtx);}}// Transparent X-ray fill
|
|
4048
|
-
if(xrayedFillTransparentBinLen>0){for(i=0;i<xrayedFillTransparentBinLen;i++){xrayedFillTransparentBin[i].drawSilhouetteXRayed(frameCtx);}}gl.disable(gl.BLEND);if(!alphaDepthMask){gl.depthMask(true);}}var endTime=Date.now();var frameStats=stats.frame;frameStats.renderTime=(endTime-startTime)/1000.0;frameStats.drawElements=frameCtx.drawElements;frameStats.drawArrays=frameCtx.drawArrays;frameStats.useProgram=frameCtx.useProgram;frameStats.bindTexture=frameCtx.bindTexture;frameStats.bindArray=frameCtx.bindArray;var numTextureUnits=WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS;for(var ii=0;ii<numTextureUnits;ii++){gl.activeTexture(gl.TEXTURE0+ii);}gl.bindTexture(gl.TEXTURE_CUBE_MAP,null);gl.bindTexture(gl.TEXTURE_2D,null);var numVertexAttribs=WEBGL_INFO.MAX_VERTEX_ATTRIBS;// Fixes https://github.com/xeokit/xeokit-sdk/issues/174
|
|
4035
|
+
if(selectedFillTransparentBinLen>0){for(i=0;i<selectedFillTransparentBinLen;i++){selectedFillTransparentBin[i].drawSilhouetteSelected(frameCtx);}}gl.disable(gl.BLEND);}var endTime=Date.now();var frameStats=stats.frame;frameStats.renderTime=(endTime-startTime)/1000.0;frameStats.drawElements=frameCtx.drawElements;frameStats.drawArrays=frameCtx.drawArrays;frameStats.useProgram=frameCtx.useProgram;frameStats.bindTexture=frameCtx.bindTexture;frameStats.bindArray=frameCtx.bindArray;var numTextureUnits=WEBGL_INFO.MAX_TEXTURE_IMAGE_UNITS;for(var ii=0;ii<numTextureUnits;ii++){gl.activeTexture(gl.TEXTURE0+ii);}gl.bindTexture(gl.TEXTURE_CUBE_MAP,null);gl.bindTexture(gl.TEXTURE_2D,null);var numVertexAttribs=WEBGL_INFO.MAX_VERTEX_ATTRIBS;// Fixes https://github.com/xeokit/xeokit-sdk/issues/174
|
|
4049
4036
|
for(var _ii=0;_ii<numVertexAttribs;_ii++){gl.disableVertexAttribArray(_ii);}};}();/**
|
|
4050
4037
|
* Picks an Entity.
|
|
4051
4038
|
* @private
|