Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rendering bug in oblique (and probably flight) mode #5289

Merged
merged 5 commits into from
Mar 17, 2021

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Mar 17, 2021

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

Issues:


@philippotto philippotto requested a review from daniel-wer March 17, 2021 11:09
@philippotto philippotto self-assigned this Mar 17, 2021
Comment on lines +131 to +152
let renderedLines = [];

window.addLine = (a: Vector3, b: Vector3) => {
const material = new THREE.LineBasicMaterial({ color: 0x0000ff });

const points = [];
points.push(new THREE.Vector3(...a));
points.push(new THREE.Vector3(...b));

const geometry = new THREE.BufferGeometry().setFromPoints(points);

const line = new THREE.Line(geometry, material);
this.rootNode.add(line);
renderedLines.push(line);
};

window.removeLines = () => {
for (const line of renderedLines) {
this.rootNode.remove(line);
}
renderedLines = [];
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used that code to visualize the scan lines which the oblique bucket picker casts. Might be useful in the future, too, which is why I left it here (next to the debugging visualization of buckets).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out-of-scope for this PR, but maybe it would makes sense to put these debug helpers in an object (e.g. window.__debug) to not clutter the window object?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I created #5290

Copy link
Member

@normanrz normanrz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Comment on lines +131 to +152
let renderedLines = [];

window.addLine = (a: Vector3, b: Vector3) => {
const material = new THREE.LineBasicMaterial({ color: 0x0000ff });

const points = [];
points.push(new THREE.Vector3(...a));
points.push(new THREE.Vector3(...b));

const geometry = new THREE.BufferGeometry().setFromPoints(points);

const line = new THREE.Line(geometry, material);
this.rootNode.add(line);
renderedLines.push(line);
};

window.removeLines = () => {
for (const line of renderedLines) {
this.rootNode.remove(line);
}
renderedLines = [];
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out-of-scope for this PR, but maybe it would makes sense to put these debug helpers in an object (e.g. window.__debug) to not clutter the window object?

@philippotto philippotto enabled auto-merge (squash) March 17, 2021 12:26
@philippotto philippotto merged commit 54e4a6f into master Mar 17, 2021
@@ -23,6 +23,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released

### Fixed
- Fixed a regression in the task search which could lead to a frontend crash. [#5267](https://github.com/scalableminds/webknossos/pull/5267)
- Fixed a rendering bug in oblique mode. [#5267](https://github.com/scalableminds/webknossos/pull/5289)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed this, maybe you can slip it into another PR :)

Suggested change
- Fixed a rendering bug in oblique mode. [#5267](https://github.com/scalableminds/webknossos/pull/5289)
- Fixed a rendering bug in oblique mode. [#5289](https://github.com/scalableminds/webknossos/pull/5289)

@philippotto philippotto deleted the fix-oblique-bug branch June 14, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing buckets in oblique mode
3 participants