diff --git a/Documentation/content/docs/intro_vtk_as_external_script.md b/Documentation/content/docs/intro_vtk_as_external_script.md index 96664099051..a78453b8bc5 100644 --- a/Documentation/content/docs/intro_vtk_as_external_script.md +++ b/Documentation/content/docs/intro_vtk_as_external_script.md @@ -1,35 +1,42 @@ title: Importing vtk.js as an external script --- -This guide illustrates how to build an application using vtk.js as a pre-built script file. This is not the recommended way of building vtk.js applications but enables quick prototyping and easy access without any tools or infrastructure needed. +This guide illustrates how to build a vtk.js application by leveraging import maps. While this approach may require a modern browser that supports import maps, it offers a cleaner setup and gives you fine-grained control over which modules are imported. -Below you can find an [html](https://raw.githubusercontent.com/Kitware/vtk-js/master/Documentation/content/docs/vtk-js-demo.html) file example that leverages vtk.js and builds a visualization with it. You can see its ES6 example counter part [here](https://kitware.github.io/vtk-js/examples/ConeSource.html). +Below you can find an [HTML](https://raw.githubusercontent.com/Kitware/vtk-js/master/Documentation/content/docs/vtk-js-demo.html) file example that demonstrates how to use vtk.js with import maps to create a visualization. ```html vtk-js-demo.html - - - - - + + + + ``` diff --git a/Documentation/content/docs/vtk-js-demo.html b/Documentation/content/docs/vtk-js-demo.html index 5113147fadc..e78fdb9a02b 100644 --- a/Documentation/content/docs/vtk-js-demo.html +++ b/Documentation/content/docs/vtk-js-demo.html @@ -1,26 +1,32 @@ - - - - - + + + + diff --git a/Examples/Volume/VolumeMapperParallelProjection/index.js b/Examples/Volume/VolumeMapperParallelProjection/index.js index dc59a30f529..010986bd633 100644 --- a/Examples/Volume/VolumeMapperParallelProjection/index.js +++ b/Examples/Volume/VolumeMapperParallelProjection/index.js @@ -39,7 +39,7 @@ fullScreenRenderer.addController(controlPanel); // ---------------------------------------------------------------------------- // SETUP ================ -// Load script from https://unpkg.com/vtk.js then... +// Load script from https://cdn.skypack.dev/@kitware/vtk.js then... const cubeSource = vtkCubeSource.newInstance(); diff --git a/Examples/Volume/VolumeRenderingWithPolyData/index.js b/Examples/Volume/VolumeRenderingWithPolyData/index.js index 84887e295ec..cb03add2726 100644 --- a/Examples/Volume/VolumeRenderingWithPolyData/index.js +++ b/Examples/Volume/VolumeRenderingWithPolyData/index.js @@ -41,7 +41,7 @@ fullScreenRenderer.addController(controlPanel); // ---------------------------------------------------------------------------- // SETUP ================ -// Load script from https://unpkg.com/vtk.js then... +// Load script from https://cdn.skypack.dev/@kitware/vtk.js then... const clipPlane1 = vtkPlane.newInstance(); const clipPlane2 = vtkPlane.newInstance();