Open ivankusuma07 opened 1 week ago
try
import 'vue-vtk-js';
app.use(window.vue_vtk);
or
import { install } from 'vue-vtk-js';
app.use({ install });
Still got an error and cannot show 3D file from url.
I call it like
<vtk-view>
<vtk-geometry-representation>
<vtk-reader vtkClass="vtkOBJReader" :url="`https://github.com/ivankusuma07/test/blob/master/cottage_obj.obj`" />
</vtk-geometry-representation>
</vtk-view>
But that is not the same one as before... So for that one, it is because we did not pre-compiled the vue components and rely on the vue library that still has the compiler in it. That is how we manage a component that works with either vue2 and vue3.
Keep in mind that you could bundle vue-vtk-js into yours by importing the source of it instead of the generated bundle.
How to run this on Vue 3? I got error like this when running it.