ros3djs icon indicating copy to clipboard operation
ros3djs copied to clipboard

added canvas as option to the viewer

Open haoming29 opened this issue 3 years ago • 7 comments

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

haoming29 avatar Nov 11 '22 22:11 haoming29

Hi @MatthijsBurgh, could you please review this PR at your convenience? Thanks.

haoming29 avatar Nov 11 '22 22:11 haoming29

@MatthijsBurgh Appreciate all the suggestions! Made the modifications and please help review it at your convenience. Thanks!

haoming29 avatar Nov 16 '22 15:11 haoming29

@Techming could you please edit your first commit to exclude the changes in the build folder?

MatthijsBurgh avatar Nov 22 '22 09:11 MatthijsBurgh

@MatthijsBurgh Sorry about that. Reverted build files to the previous commit. (Apologies for the typo in the commit message)

haoming29 avatar Nov 22 '22 17:11 haoming29

@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.

MatthijsBurgh avatar Nov 22 '22 18:11 MatthijsBurgh

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

haoming29 avatar Nov 22 '22 20:11 haoming29

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

haoming29 avatar Nov 22 '22 21:11 haoming29