When using Vue 3 with VTK.js why doesn't the render display on the screen?

69 Views Asked by At

When following the official VTK.js/Vue.js tutorial (and using a recent 3.x release) why doesn't the cone render in the browser window?

1

There are 1 best solutions below

0
Dave Mackey On

In the default CSS shipped with Vue the base.css file forces all elements to have the style:

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  position: relative;
  font-weight: normal;
}

The position being set to relative causes the canvas on which the cone is supposed to be rendered to be set to 0 for both width and height.

Commenting out position: relative; resolves the issue.