added canvas as option to the viewer
Public API Changes
The Viewer constructor now accepts canvas as an option in the parameter options.
Description
- Added canvas as the parameter to the Viewer constructor so that the user can pass OffscreenCanvas to ROS 3D for performance improvement
- Added related test to make sure Viewer correctly initialize with the canvas option
This is built upon PR #549 which will be closed when this PR opens.
https://github.com/RobotWebTools/ros3djs/issues/546
Hi @MatthijsBurgh, could you please review this PR at your convenience? Thanks.
@MatthijsBurgh Appreciate all the suggestions! Made the modifications and please help review it at your convenience. Thanks!
@Techming could you please edit your first commit to exclude the changes in the build folder?
@MatthijsBurgh Sorry about that. Reverted build files to the previous commit. (Apologies for the typo in the commit message)
@Techming there are 2 test folders. One is just for running manually in your browser. The other one is running in CI too. You didn't add the test there. I did add it there. Now CI fails.
I’m working on identifying the issue and wrote additional tests to make sure the Viewer itself can pass the CI test. Could you help approve the workflow? Thanks. @MatthijsBurgh
From the CI error log it seems that the Viewer class fails the CI without canvas passed in as the param. I will confirm locally if the changes of in my code have effects on the result. @MatthijsBurgh