codeSandbox examples for vtk.js gives error for controller.html

Pretty much the title. When I want to add the controller.html to my example in codesandbox, it gives error.

Cannot read properties of null (reading 'addEventListener')

So basically it doesn’t have document?

I couldn’t figure out why. Examples without controller works fine.

Can we have an official kitware/vtk codesandbox template that works and people can fork from it?

Thanks

Just rename controller.html to controller.txt and that will solve your issue.

1 Like

That worked great!

1 Like

My guess is that loading/importing an html asset was confusing to CodeSandbox while we only needed a string that could be injected as innerHTML somewhere…