@xeokit/xeokit-sdk 2.4.0-alpha-3 → 2.4.0-alpha-5

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.
@@ -32146,7 +32146,7 @@ class DataTextureSceneModel extends Component {
32146
32146
  this._opacity = 1.0;
32147
32147
  this._colorize = [1, 1, 1];
32148
32148
 
32149
- this._saoEnabled = (cfg.saoEnabled !== false);
32149
+ this._saoEnabled = false;
32150
32150
 
32151
32151
  this._pbrEnabled = (!!cfg.pbrEnabled);
32152
32152
 
@@ -34140,7 +34140,7 @@ const Renderer = function (scene, options) {
34140
34140
 
34141
34141
  const drawable = drawableList[i];
34142
34142
 
34143
- if (drawable.culled === true || drawable.visible === false || !drawable.drawDepth) {
34143
+ if (drawable.culled === true || drawable.visible === false || !drawable.drawDepth || !drawable.saoEnabled) {
34144
34144
  continue;
34145
34145
  }
34146
34146
 
@@ -32142,7 +32142,7 @@ class DataTextureSceneModel extends Component {
32142
32142
  this._opacity = 1.0;
32143
32143
  this._colorize = [1, 1, 1];
32144
32144
 
32145
- this._saoEnabled = (cfg.saoEnabled !== false);
32145
+ this._saoEnabled = false;
32146
32146
 
32147
32147
  this._pbrEnabled = (!!cfg.pbrEnabled);
32148
32148
 
@@ -34136,7 +34136,7 @@ const Renderer = function (scene, options) {
34136
34136
 
34137
34137
  const drawable = drawableList[i];
34138
34138
 
34139
- if (drawable.culled === true || drawable.visible === false || !drawable.drawDepth) {
34139
+ if (drawable.culled === true || drawable.visible === false || !drawable.drawDepth || !drawable.saoEnabled) {
34140
34140
  continue;
34141
34141
  }
34142
34142
 
@@ -6909,7 +6909,7 @@ return retVal;}}]);return ViewFrustumCullingState;}();var ViewFrustumCullingMana
6909
6909
  */_this32.numClippableLayerPortions=0;/**
6910
6910
  * @private
6911
6911
  */_this32.numCulledLayerPortions=0;/** @private */_this32.numEntities=0;/** @private */_this32._numTriangles=0;_this32._edgeThreshold=cfg.edgeThreshold||10;_this32.visible=cfg.visible;_this32.culled=cfg.culled;_this32.pickable=cfg.pickable;_this32.clippable=cfg.clippable;_this32.collidable=cfg.collidable;_this32.castsShadow=cfg.castsShadow;_this32.receivesShadow=cfg.receivesShadow;_this32.xrayed=cfg.xrayed;_this32.highlighted=cfg.highlighted;_this32.selected=cfg.selected;_this32.edges=cfg.edges;_this32.colorize=cfg.colorize;_this32.opacity=cfg.opacity;_this32.backfaces=cfg.backfaces;// Build static matrix
6912
- _this32._origin=math.vec3(cfg.origin||[0,0,0]);_this32._position=math.vec3(cfg.position||[0,0,0]);_this32._rotation=math.vec3(cfg.rotation||[0,0,0]);_this32._quaternion=math.vec4(cfg.quaternion||[0,0,0,1]);if(cfg.rotation){math.eulerToQuaternion(_this32._rotation,"XYZ",_this32._quaternion);}_this32._scale=math.vec3(cfg.scale||[1,1,1]);_this32._worldMatrix=math.mat4();math.composeMat4(_this32._position,_this32._quaternion,_this32._scale,_this32._worldMatrix);_this32._worldNormalMatrix=math.mat4();math.inverseMat4(_this32._worldMatrix,_this32._worldNormalMatrix);math.transposeMat4(_this32._worldNormalMatrix);if(cfg.matrix||cfg.position||cfg.rotation||cfg.scale||cfg.quaternion){_this32._viewMatrix=math.mat4();_this32._viewNormalMatrix=math.mat4();_this32._viewMatrixDirty=true;_this32._worldMatrixNonIdentity=true;}_this32._opacity=1.0;_this32._colorize=[1,1,1];_this32._saoEnabled=cfg.saoEnabled!==false;_this32._pbrEnabled=!!cfg.pbrEnabled;_this32._isModel=cfg.isModel;if(_this32._isModel){_this32.scene._registerModel(_assertThisInitialized(_this32));}_this32._onCameraViewMatrix=_this32.scene.camera.on("matrix",function(){_this32._viewMatrixDirty=true;});return _this32;}//------------------------------------------------------------------------------------------------------------------
6912
+ _this32._origin=math.vec3(cfg.origin||[0,0,0]);_this32._position=math.vec3(cfg.position||[0,0,0]);_this32._rotation=math.vec3(cfg.rotation||[0,0,0]);_this32._quaternion=math.vec4(cfg.quaternion||[0,0,0,1]);if(cfg.rotation){math.eulerToQuaternion(_this32._rotation,"XYZ",_this32._quaternion);}_this32._scale=math.vec3(cfg.scale||[1,1,1]);_this32._worldMatrix=math.mat4();math.composeMat4(_this32._position,_this32._quaternion,_this32._scale,_this32._worldMatrix);_this32._worldNormalMatrix=math.mat4();math.inverseMat4(_this32._worldMatrix,_this32._worldNormalMatrix);math.transposeMat4(_this32._worldNormalMatrix);if(cfg.matrix||cfg.position||cfg.rotation||cfg.scale||cfg.quaternion){_this32._viewMatrix=math.mat4();_this32._viewNormalMatrix=math.mat4();_this32._viewMatrixDirty=true;_this32._worldMatrixNonIdentity=true;}_this32._opacity=1.0;_this32._colorize=[1,1,1];_this32._saoEnabled=false;_this32._pbrEnabled=!!cfg.pbrEnabled;_this32._isModel=cfg.isModel;if(_this32._isModel){_this32.scene._registerModel(_assertThisInitialized(_this32));}_this32._onCameraViewMatrix=_this32.scene.camera.on("matrix",function(){_this32._viewMatrixDirty=true;});return _this32;}//------------------------------------------------------------------------------------------------------------------
6913
6913
  // DataTextureSceneModel members
6914
6914
  //------------------------------------------------------------------------------------------------------------------
6915
6915
  /**
@@ -7393,7 +7393,7 @@ cullDrawableList();}}function buildDrawableList(){for(var type in drawableTypeIn
7393
7393
  var saoDepthRenderBuffer=renderBufferManager.getRenderBuffer("saoDepth",{depthTexture:true});saoDepthRenderBuffer.bind();saoDepthRenderBuffer.clear();drawDepth(params);saoDepthRenderBuffer.unbind();// Render occlusion buffer
7394
7394
  var occlusionRenderBuffer1=renderBufferManager.getRenderBuffer("saoOcclusion");occlusionRenderBuffer1.bind();occlusionRenderBuffer1.clear();saoOcclusionRenderer.render(saoDepthRenderBuffer);occlusionRenderBuffer1.unbind();if(sao.blur){// Horizontally blur occlusion buffer 1 into occlusion buffer 2
7395
7395
  var occlusionRenderBuffer2=renderBufferManager.getRenderBuffer("saoOcclusion2");occlusionRenderBuffer2.bind();occlusionRenderBuffer2.clear();saoDepthLimitedBlurRenderer.render(saoDepthRenderBuffer,occlusionRenderBuffer1,0);occlusionRenderBuffer2.unbind();// Vertically blur occlusion buffer 2 back into occlusion buffer 1
7396
- occlusionRenderBuffer1.bind();occlusionRenderBuffer1.clear();saoDepthLimitedBlurRenderer.render(saoDepthRenderBuffer,occlusionRenderBuffer2,1);occlusionRenderBuffer1.unbind();}}function drawDepth(params){frameCtx.reset();frameCtx.pass=params.pass;gl.viewport(0,0,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.clearColor(0,0,0,0);gl.enable(gl.DEPTH_TEST);gl.frontFace(gl.CCW);gl.enable(gl.CULL_FACE);gl.depthMask(true);if(params.clear!==false){gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);}for(var type in drawableTypeInfo){if(drawableTypeInfo.hasOwnProperty(type)){var drawableInfo=drawableTypeInfo[type];var drawableList=drawableInfo.drawableList;for(var _i187=0,len=drawableList.length;_i187<len;_i187++){var drawable=drawableList[_i187];if(drawable.culled===true||drawable.visible===false||!drawable.drawDepth){continue;}if(drawable.renderFlags.colorOpaque){drawable.drawDepth(frameCtx);}}}}// const numVertexAttribs = WEBGL_INFO.MAX_VERTEX_ATTRIBS; // Fixes https://github.com/xeokit/xeokit-sdk/issues/174
7396
+ occlusionRenderBuffer1.bind();occlusionRenderBuffer1.clear();saoDepthLimitedBlurRenderer.render(saoDepthRenderBuffer,occlusionRenderBuffer2,1);occlusionRenderBuffer1.unbind();}}function drawDepth(params){frameCtx.reset();frameCtx.pass=params.pass;gl.viewport(0,0,gl.drawingBufferWidth,gl.drawingBufferHeight);gl.clearColor(0,0,0,0);gl.enable(gl.DEPTH_TEST);gl.frontFace(gl.CCW);gl.enable(gl.CULL_FACE);gl.depthMask(true);if(params.clear!==false){gl.clear(gl.COLOR_BUFFER_BIT|gl.DEPTH_BUFFER_BIT);}for(var type in drawableTypeInfo){if(drawableTypeInfo.hasOwnProperty(type)){var drawableInfo=drawableTypeInfo[type];var drawableList=drawableInfo.drawableList;for(var _i187=0,len=drawableList.length;_i187<len;_i187++){var drawable=drawableList[_i187];if(drawable.culled===true||drawable.visible===false||!drawable.drawDepth||!drawable.saoEnabled){continue;}if(drawable.renderFlags.colorOpaque){drawable.drawDepth(frameCtx);}}}}// const numVertexAttribs = WEBGL_INFO.MAX_VERTEX_ATTRIBS; // Fixes https://github.com/xeokit/xeokit-sdk/issues/174
7397
7397
  // for (let ii = 0; ii < numVertexAttribs; ii++) {
7398
7398
  // gl.disableVertexAttribArray(ii);
7399
7399
  // }