use vtk.js

BASE_PATH is not defined

Would you mind giving more information of your problem.
BASE_PATH is used in the examples. You need to run them with npm run example

Hello, below is my code, when I import the vti file, it shows BASE_PATH is not defined. thank

reader
.setUrl(${__BASE_PATH__}/data/volume/headsq.vti, { loadData: true })
.then(() => {
const data = reader.getOutputData();
const dataRange = data.getPointData().getScalars().getRange();
const extent = data.getExtent();

I mean if it is your code, you should know the URL of your data. And if that is the case, you should provide it to the setUrl(...) method.

Like Julien is saying BASE_PATH is related to our infrastructure which get replaced automatically at compile time when the example get published.

Hello, npm built successfully, the absolute path of the VTI file filled in seturl, but the following problems occur when opening the web page.

BW$4J_{VU~16}UPJ53`AM4