Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalDybizbanskiCreoox committed Aug 21, 2024
1 parent 2817d36 commit a6218ee
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 54 deletions.
59 changes: 37 additions & 22 deletions dist/xeokit-sdk.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -74718,6 +74718,12 @@ class DTXTrianglesPickMeshRenderer {
const textureState = state.textureState;
const origin = dataTextureLayer._state.origin;
const {position, rotationMatrix, rotationMatrixConjugate} = model;

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

textureState.bindCommonTextures(
this._program,
this.uTexturePerObjectPositionsDecodeMatrix,
Expand All @@ -74744,24 +74750,24 @@ class DTXTrianglesPickMeshRenderer {
rtcOrigin[0] += position[0];
rtcOrigin[1] += position[1];
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$8);
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8);
rtcCameraEye = tempVec3c$c;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
} else {
rtcViewMatrix = camera.viewMatrix;
rtcCameraEye = camera.eye;
rtcViewMatrix = viewMatrix;
rtcCameraEye = eye;
}
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
gl.uniform1i(this._uRenderPass, renderPass);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far from pick project matrix?
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
Expand Down Expand Up @@ -75138,7 +75144,11 @@ class DTXTrianglesPickDepthRenderer {
const textureState = state.textureState;
const origin = dataTextureLayer._state.origin;
const {position, rotationMatrix, rotationMatrixConjugate} = model;

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

if (!this._program) {
this._allocate();
Expand Down Expand Up @@ -75178,15 +75188,15 @@ class DTXTrianglesPickDepthRenderer {
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$7);
rtcCameraEye = tempVec3c$b;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
frameCtx.snapPickOrigin[0] = rtcOrigin[0];
frameCtx.snapPickOrigin[1] = rtcOrigin[1];
frameCtx.snapPickOrigin[2] = rtcOrigin[2];
} else {
rtcViewMatrix = viewMatrix;
rtcCameraEye = camera.eye;
rtcCameraEye = eye;
frameCtx.snapPickOrigin[0] = 0;
frameCtx.snapPickOrigin[1] = 0;
frameCtx.snapPickOrigin[2] = 0;
Expand All @@ -75201,9 +75211,9 @@ class DTXTrianglesPickDepthRenderer {
gl.uniform1f(this._uPickZFar, frameCtx.pickZFar);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix?
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}

Expand Down Expand Up @@ -77713,6 +77723,11 @@ class DTXTrianglesPickNormalsFlatRenderer {
this._bindProgram(frameCtx, state);
}

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

textureState.bindCommonTextures(
this._program,
this.uTexturePerObjectPositionsDecodeMatrix,
Expand Down Expand Up @@ -77741,24 +77756,24 @@ class DTXTrianglesPickNormalsFlatRenderer {
rtcOrigin[0] += position[0];
rtcOrigin[1] += position[1];
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$1);
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$1);
rtcCameraEye = tempVec3c$5;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
} else {
rtcViewMatrix = camera.viewMatrix; // TODO: make pickMatrix
rtcCameraEye = camera.eye;
rtcViewMatrix = viewMatrix;
rtcCameraEye = eye;
}
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); // TODO: pickProjMatrix
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
gl.uniform1i(this._uRenderPass, renderPass);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2);
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
Expand Down
59 changes: 37 additions & 22 deletions dist/xeokit-sdk.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -74714,6 +74714,12 @@ class DTXTrianglesPickMeshRenderer {
const textureState = state.textureState;
const origin = dataTextureLayer._state.origin;
const {position, rotationMatrix, rotationMatrixConjugate} = model;

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

textureState.bindCommonTextures(
this._program,
this.uTexturePerObjectPositionsDecodeMatrix,
Expand All @@ -74740,24 +74746,24 @@ class DTXTrianglesPickMeshRenderer {
rtcOrigin[0] += position[0];
rtcOrigin[1] += position[1];
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$8);
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$8);
rtcCameraEye = tempVec3c$c;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
} else {
rtcViewMatrix = camera.viewMatrix;
rtcCameraEye = camera.eye;
rtcViewMatrix = viewMatrix;
rtcCameraEye = eye;
}
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
gl.uniform1i(this._uRenderPass, renderPass);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(camera.project.far + 1.0) / Math.LN2); // TODO: Far from pick project matrix?
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
Expand Down Expand Up @@ -75134,7 +75140,11 @@ class DTXTrianglesPickDepthRenderer {
const textureState = state.textureState;
const origin = dataTextureLayer._state.origin;
const {position, rotationMatrix, rotationMatrixConjugate} = model;

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

if (!this._program) {
this._allocate();
Expand Down Expand Up @@ -75174,15 +75184,15 @@ class DTXTrianglesPickDepthRenderer {
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$7);
rtcCameraEye = tempVec3c$b;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
frameCtx.snapPickOrigin[0] = rtcOrigin[0];
frameCtx.snapPickOrigin[1] = rtcOrigin[1];
frameCtx.snapPickOrigin[2] = rtcOrigin[2];
} else {
rtcViewMatrix = viewMatrix;
rtcCameraEye = camera.eye;
rtcCameraEye = eye;
frameCtx.snapPickOrigin[0] = 0;
frameCtx.snapPickOrigin[1] = 0;
frameCtx.snapPickOrigin[2] = 0;
Expand All @@ -75197,9 +75207,9 @@ class DTXTrianglesPickDepthRenderer {
gl.uniform1f(this._uPickZFar, frameCtx.pickZFar);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2); // TODO: Far from pick project matrix?
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}

Expand Down Expand Up @@ -77709,6 +77719,11 @@ class DTXTrianglesPickNormalsFlatRenderer {
this._bindProgram(frameCtx, state);
}

const viewMatrix = frameCtx.pickViewMatrix || camera.viewMatrix;
const projMatrix = frameCtx.pickProjMatrix || camera.projMatrix;
const eye = frameCtx.pickOrigin || camera.eye;
const far = frameCtx.pickProjMatrix ? frameCtx.pickZFar : camera.project.far;

textureState.bindCommonTextures(
this._program,
this.uTexturePerObjectPositionsDecodeMatrix,
Expand Down Expand Up @@ -77737,24 +77752,24 @@ class DTXTrianglesPickNormalsFlatRenderer {
rtcOrigin[0] += position[0];
rtcOrigin[1] += position[1];
rtcOrigin[2] += position[2];
rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$1);
rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$1);
rtcCameraEye = tempVec3c$5;
rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
rtcCameraEye[0] = eye[0] - rtcOrigin[0];
rtcCameraEye[1] = eye[1] - rtcOrigin[1];
rtcCameraEye[2] = eye[2] - rtcOrigin[2];
} else {
rtcViewMatrix = camera.viewMatrix; // TODO: make pickMatrix
rtcCameraEye = camera.eye;
rtcViewMatrix = viewMatrix;
rtcCameraEye = eye;
}
gl.uniform2fv(this._uPickClipPos, frameCtx.pickClipPos);
gl.uniform2f(this._uDrawingBufferSize, gl.drawingBufferWidth, gl.drawingBufferHeight);
gl.uniformMatrix4fv(this._uSceneModelMatrix, false, rotationMatrixConjugate);
gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix); // TODO: pickProjMatrix
gl.uniformMatrix4fv(this._uProjMatrix, false, projMatrix);
gl.uniform3fv(this._uCameraEyeRtc, rtcCameraEye);
gl.uniform1i(this._uRenderPass, renderPass);
if (scene.logarithmicDepthBufferEnabled) {
const logDepthBufFC = 2.0 / (Math.log(frameCtx.pickZFar + 1.0) / Math.LN2);
const logDepthBufFC = 2.0 / (Math.log(far + 1.0) / Math.LN2);
gl.uniform1f(this._uLogDepthBufFC, logDepthBufFC);
}
const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
Expand Down
Loading

0 comments on commit a6218ee

Please sign in to comment.