@xeokit/xeokit-sdk 2.6.112 → 2.6.113

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xeokit/xeokit-sdk",
3
- "version": "2.6.112",
3
+ "version": "2.6.113",
4
4
  "description": "3D BIM IFC Viewer SDK for AEC engineering applications. Open Source JavaScript Toolkit based on pure WebGL for top performance, real-world coordinates and full double precision",
5
5
  "module": "./dist/xeokit-sdk.es.js",
6
6
  "main": "./dist/xeokit-sdk.cjs.js",
@@ -338,7 +338,7 @@ export const getRenderers = (function() {
338
338
  if (primitive === "points") {
339
339
  cache[sceneId] = {
340
340
  colorRenderers: { "sao-": { "vertex": lazy((vars, geo, c) => c(makeColorProgram(vars, geo, null, null))) } },
341
- occlusionRenderer: lazy((vars, geo, c) => c(OcclusionProgram(vars, scene.logarithmicDepthBufferEnabled))),
341
+ occlusionRenderer: lazy((vars, geo, c) => c(OcclusionProgram(vars))),
342
342
  pickDepthRenderer: lazy(makePickDepthProgram),
343
343
  pickMeshRenderer: lazy(makePickMeshProgram),
344
344
  // VBOBatchingPointsShadowRenderer has been implemented by 14e973df6268369b00baef60e468939e062ac320,
@@ -400,7 +400,7 @@ export const getRenderers = (function() {
400
400
  uniform: lazy((vars, geo, c) => c(EdgesProgram(vars, geo, scene.logarithmicDepthBufferEnabled, true)), { vertices: false }),
401
401
  vertex: lazy((vars, geo, c) => c(EdgesProgram(vars, geo, scene.logarithmicDepthBufferEnabled, false)), { vertices: false })
402
402
  },
403
- occlusionRenderer: lazy((vars, geo, c) => c(OcclusionProgram(vars, scene.logarithmicDepthBufferEnabled))),
403
+ occlusionRenderer: lazy((vars, geo, c) => c(OcclusionProgram(vars))),
404
404
  pickDepthRenderer: eager(makePickDepthProgram),
405
405
  pickMeshRenderer: eager(makePickMeshProgram),
406
406
  pickNormalsFlatRenderer: eager((vars, geo, c) => makePickNormalsProgram(vars, geo, c, true)),
@@ -1,11 +1,7 @@
1
- export const OcclusionProgram = function(programVariables, logarithmicDepthBufferEnabled) {
1
+ export const OcclusionProgram = function(programVariables) {
2
2
  const outColor = programVariables.createOutput("vec4", "outColor");
3
3
  return {
4
4
  programName: "Occlusion",
5
- // Logarithmic depth buffer involves an accuracy tradeoff, sacrificing
6
- // accuracy at close range to improve accuracy at long range. This can
7
- // mess up accuracy for occlusion tests, so we'll disable for now.
8
- getLogDepth: false && logarithmicDepthBufferEnabled && (vFragDepth => vFragDepth),
9
5
  renderPassFlag: 0, // COLOR_OPAQUE // Only opaque objects can be occluders
10
6
  appendFragmentOutputs: (src) => src.push(`${outColor} = vec4(0.0, 0.0, 1.0, 1.0);`) // Occluders are blue
11
7
  };
@@ -636,6 +636,8 @@ class Scene extends Component {
636
636
  alphaDepthMask: alphaDepthMask
637
637
  });
638
638
 
639
+ this.canvas._renderer = this._renderer;
640
+
639
641
  this._sectionPlanesState = new (function () {
640
642
 
641
643
  this.sectionPlanes = [];
@@ -1,6 +1,6 @@
1
1
  import {Component} from '../Component.js';
2
2
  import {math} from "../math/math.js";
3
- import {SectionPlane} from "./SectionPlane";
3
+ import {SectionPlane} from "./SectionPlane.js";
4
4
 
5
5
  const tempVec3a = math.vec3();
6
6
 
@@ -132,13 +132,12 @@ export class OcclusionTester {
132
132
  "OcclusionTester",
133
133
  {
134
134
  sectionPlanesState: sectionPlanesState,
135
- getLogDepth: scene.logarithmicDepthBufferEnabled && (vFragDepth => vFragDepth),
136
135
  clippableTest: () => "true",
137
136
  getVertexData: () => {
138
137
  const src = [ ];
139
138
  src.push(`vec4 worldPosition = vec4(${position}, 1.0);`);
140
139
  src.push(`vec4 ${clipPos} = ${projMatrix} * ${viewMatrix} * worldPosition;`);
141
- if ((! scene.logarithmicDepthBufferEnabled) && (scene.markerZOffset < 0.000)) {
140
+ if (scene.markerZOffset < 0.000) {
142
141
  src.push(`${clipPos}.z += ${scene.markerZOffset};`);
143
142
  }
144
143
  return src;