Skip to content

Commit 4fcc192

Browse files
committed
docs(usage): update Reader examples
1 parent 29c44c3 commit 4fcc192

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

usage/src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import useQueryString from './useQueryString';
66

77
const demos = new Map([
88
['Geometry/Picking', lazy(() => import('./Geometry/Picking'))],
9-
// ['Geometry/OBJViewer', lazy(() => import('./Geometry/OBJViewer'))],
9+
['Geometry/OBJViewer', lazy(() => import('./Geometry/OBJViewer'))],
1010
// ['Geometry/PointCloud', lazy(() => import('./Geometry/PointCloud'))],
1111
['Geometry/PolyDataViewer', lazy(() => import('./Geometry/PolyDataViewer'))],
1212
[
@@ -19,7 +19,7 @@ const demos = new Map([
1919
// ],
2020
['Geometry/SourceViewer', lazy(() => import('./Geometry/SourceViewer'))],
2121
// ['Geometry/Glyph', lazy(() => import('./Geometry/Glyph'))],
22-
// ['Geometry/CutterExample', lazy(() => import('./Geometry/CutterExample'))],
22+
['Geometry/CutterExample', lazy(() => import('./Geometry/CutterExample'))],
2323
['Geometry/TubeExample', lazy(() => import('./Geometry/TubeExample'))],
2424
// ['Volume/SliceRendering', lazy(() => import('./Volume/SliceRendering'))],
2525
// ['Volume/ImageSeriesRendering', lazy(() => import('./Volume/ImageSeriesRendering'))],

usage/src/Geometry/CutterExample.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import React from 'react';
2-
31
import { newInstance as newVtkPlaneInstance } from '@kitware/vtk.js/Common/DataModel/Plane.js';
42

5-
import { Algorithm, View, GeometryRepresentation, Reader } from 'react-vtk-js';
3+
// vtkCutter
4+
import '@kitware/vtk.js/Filters/Core/Cutter';
5+
// vtkOBJReader
6+
import '@kitware/vtk.js/IO/Misc/OBJReader';
7+
import { Algorithm, GeometryRepresentation, Reader, View } from 'react-vtk-js';
68

79
function Example(props) {
810
const plane = newVtkPlaneInstance({

usage/src/Geometry/OBJViewer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React from 'react';
2-
3-
import { View, GeometryRepresentation, Reader } from 'react-vtk-js';
1+
// imports vtkOBJReader
2+
import '@kitware/vtk.js/IO/Misc/OBJReader';
3+
import { GeometryRepresentation, Reader, View } from 'react-vtk-js';
44

55
// React complains about unique key prop but I don't see why
66
function Example(props) {

0 commit comments

Comments
 (0)