-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor screenshot code #54
Conversation
if (blob) { | ||
const link = document.createElement("a"); | ||
link.href = URL.createObjectURL(blob); | ||
link.download = "screenshot.png"; |
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.
suggestion (non-blocking): I would prefer a more meaningful download name (potentially one that uses the workspace name or active neurons) but we can keep it like this until it becomes a request from the customer (if it happens)
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.
@afonsobspinto i have updated the code for both screenshot and recording files naming with the workspace name
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.
All looks good to me, I would just do a small modification (almost nothing), but more to keep consistent with the rest of the base code.
applications/visualizer/frontend/src/components/viewers/ThreeD/SceneControls.tsx
Outdated
Show resolved
Hide resolved
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.
@Salam-Dalloul Thanks a lot 🙏 !
#96 implement background colour change function
Issue: The use of preserveDrawingBuffer: true in the WebGL renderer can negatively impact performance. This setting is typically used to retain canvas content for tasks like taking screenshots. However, when preserveDrawingBuffer is set to false (the default), WebGL clears the drawing buffer after each frame, allowing for efficient memory management and optimal performance. When set to true, the buffer contents are preserved between frames, leading to increased memory usage and reduced rendering efficiency, which can significantly affect overall performance.
Solution: By default, preserveDrawingBuffer is set to false to improve performance during normal rendering.
A temporary WebGL renderer with preserveDrawingBuffer: true is created only when taking a screenshot to ensure the content is retained without affecting the performance during regular use.
Screen.Recording.2024-10-02.at.4.38.54.PM.mov