-
Notifications
You must be signed in to change notification settings - Fork 26
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
Conversation
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 = []; | ||
}; |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
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 = []; | ||
}; |
There was a problem hiding this comment.
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?
@@ -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) |
There was a problem hiding this comment.
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 :)
- 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) |
URL of deployed dev instance (used for testing):
Steps to test:
Issues: