@kitware/vtk.js 34.16.2 → 34.16.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +8 -8
- package/Common/Core/CellArray.d.ts +5 -1
- package/Common/Core/CellArray.js +6 -10
- package/Common/Core/DataArray.js +9 -23
- package/Common/Core/ImageHelper.d.ts +2 -2
- package/Common/Core/ImageHelper.js +6 -8
- package/Common/Core/LookupTable.js +1 -3
- package/Common/Core/Math/index.js +19 -47
- package/Common/Core/MatrixBuilder.js +2 -5
- package/Common/Core/Points.js +3 -8
- package/Common/Core/PriorityQueue.js +4 -8
- package/Common/Core/ProgressHandler.js +4 -7
- package/Common/Core/ScalarsToColors.js +1 -2
- package/Common/Core/StringArray.js +4 -12
- package/Common/Core/URLExtract.js +1 -3
- package/Common/Core/VariantArray.js +4 -12
- package/Common/DataModel/AbstractPointLocator.js +1 -2
- package/Common/DataModel/BoundingBox.js +6 -16
- package/Common/DataModel/Box.js +7 -11
- package/Common/DataModel/CardinalSpline1D.js +2 -4
- package/Common/DataModel/Cell.js +2 -4
- package/Common/DataModel/CellLinks.js +2 -4
- package/Common/DataModel/CellTypes.js +2 -5
- package/Common/DataModel/Collection.js +1 -2
- package/Common/DataModel/Cone.js +1 -2
- package/Common/DataModel/Cylinder.js +1 -2
- package/Common/DataModel/DataSet/Constants.js +0 -1
- package/Common/DataModel/DataSet.js +2 -4
- package/Common/DataModel/DataSetAttributes/Constants.js +0 -4
- package/Common/DataModel/DataSetAttributes/FieldData.js +3 -11
- package/Common/DataModel/DataSetAttributes.js +1 -2
- package/Common/DataModel/EdgeLocator.js +2 -4
- package/Common/DataModel/ITKHelper.js +4 -8
- package/Common/DataModel/ImageData.js +17 -33
- package/Common/DataModel/ImplicitBoolean.js +1 -2
- package/Common/DataModel/ImplicitFunction.js +1 -2
- package/Common/DataModel/IncrementalOctreeNode.js +1 -2
- package/Common/DataModel/IncrementalOctreePointLocator.js +2 -3
- package/Common/DataModel/KochanekSpline1D.js +2 -4
- package/Common/DataModel/Line.js +2 -4
- package/Common/DataModel/Locator.js +1 -2
- package/Common/DataModel/MergePoints.js +1 -2
- package/Common/DataModel/Molecule.js +1 -2
- package/Common/DataModel/PiecewiseFunction.js +2 -4
- package/Common/DataModel/Plane.js +1 -2
- package/Common/DataModel/Planes.js +2 -4
- package/Common/DataModel/PointLocator.js +3 -7
- package/Common/DataModel/PointSet.js +2 -4
- package/Common/DataModel/PolyData.js +4 -8
- package/Common/DataModel/PolyLine.js +1 -2
- package/Common/DataModel/Polygon.js +2 -4
- package/Common/DataModel/Quad.js +1 -2
- package/Common/DataModel/SelectionNode.js +1 -2
- package/Common/DataModel/Sphere.js +1 -2
- package/Common/DataModel/Spline1D.js +2 -3
- package/Common/DataModel/Spline3D.js +1 -2
- package/Common/DataModel/Triangle.js +2 -6
- package/Common/DataModel/TriangleStrip.js +1 -2
- package/Common/Transform/LandmarkTransform.js +1 -2
- package/Common/Transform/Transform.js +4 -10
- package/Filters/Core/CleanPolyData.js +1 -2
- package/Filters/Core/Cutter.js +1 -3
- package/Filters/Core/PolyDataNormals.js +1 -3
- package/Filters/Core/ThresholdPoints.js +2 -4
- package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +1 -2
- package/Filters/General/AppendPolyData.js +1 -2
- package/Filters/General/Calculator.js +40 -47
- package/Filters/General/ClipClosedSurface.js +1 -4
- package/Filters/General/ClosedPolyLineToSurfaceFilter.js +1 -2
- package/Filters/General/ContourLoopExtraction.js +1 -2
- package/Filters/General/ContourTriangulator/helper.js +1 -5
- package/Filters/General/ContourTriangulator.js +2 -4
- package/Filters/General/ImageCropFilter.js +1 -2
- package/Filters/General/ImageDataOutlineFilter.js +1 -2
- package/Filters/General/ImageMarchingCubes/caseTable.js +0 -1
- package/Filters/General/ImageMarchingCubes.js +1 -4
- package/Filters/General/ImageMarchingSquares/caseTable.js +0 -1
- package/Filters/General/ImageMarchingSquares.js +1 -4
- package/Filters/General/ImageOutlineFilter.js +1 -2
- package/Filters/General/ImageSliceFilter.js +1 -2
- package/Filters/General/ImageStreamline.js +1 -3
- package/Filters/General/LineFilter.js +1 -2
- package/Filters/General/MoleculeToRepresentation.js +2 -5
- package/Filters/General/OBBTree/OBBNode.js +1 -2
- package/Filters/General/OBBTree.js +2 -6
- package/Filters/General/OutlineFilter.js +1 -2
- package/Filters/General/PaintFilter/PaintFilter.worker.js +20 -25
- package/Filters/General/PaintFilter.js +1 -2
- package/Filters/General/ScalarToRGBA.js +1 -2
- package/Filters/General/ShrinkPolyData.js +2 -4
- package/Filters/General/TransformPolyDataFilter.js +1 -2
- package/Filters/General/TriangleFilter.js +1 -2
- package/Filters/General/TubeFilter.js +2 -6
- package/Filters/General/WarpScalar.js +1 -2
- package/Filters/General/WindowedSincPolyDataFilter.js +1 -2
- package/Filters/Sources/ArcSource.js +1 -2
- package/Filters/Sources/Arrow2DSource.js +1 -2
- package/Filters/Sources/ArrowSource.js +1 -2
- package/Filters/Sources/CircleSource.d.ts +2 -3
- package/Filters/Sources/CircleSource.js +1 -2
- package/Filters/Sources/ConcentricCylinderSource.js +2 -6
- package/Filters/Sources/ConeSource.js +1 -2
- package/Filters/Sources/CubeSource.js +6 -7
- package/Filters/Sources/Cursor3D.js +1 -2
- package/Filters/Sources/CylinderSource.js +1 -2
- package/Filters/Sources/DiskSource.js +1 -2
- package/Filters/Sources/EllipseArcSource.js +1 -2
- package/Filters/Sources/FrustumSource.js +1 -2
- package/Filters/Sources/ImageGridSource.js +1 -2
- package/Filters/Sources/LineSource.js +1 -2
- package/Filters/Sources/PlaneSource.js +21 -22
- package/Filters/Sources/PlatonicSolidSource.js +1 -2
- package/Filters/Sources/PointSource.js +1 -2
- package/Filters/Sources/RTAnalyticSource.js +1 -2
- package/Filters/Sources/SLICSource.js +1 -2
- package/Filters/Sources/SphereSource.js +1 -2
- package/Filters/Sources/TorusSource.js +1 -2
- package/Filters/Sources/ViewFinderSource.js +1 -2
- package/Filters/Texture/TextureMapToPlane.js +1 -2
- package/Filters/Texture/TextureMapToSphere.js +1 -2
- package/IO/Core/BinaryHelper.js +1 -2
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +4 -5
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +5 -9
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +7 -16
- package/IO/Core/DataAccessHelper.js +1 -3
- package/IO/Core/HttpDataSetReader.js +10 -16
- package/IO/Core/HttpDataSetSeriesReader.js +4 -8
- package/IO/Core/HttpSceneLoader.js +3 -8
- package/IO/Core/ImageStream/DefaultProtocol.js +12 -42
- package/IO/Core/ImageStream/ViewStream.js +5 -8
- package/IO/Core/ImageStream.js +4 -9
- package/IO/Core/Serializer/ArraySerializer.js +1 -2
- package/IO/Core/WSLinkClient.js +14 -25
- package/IO/Core/ZipMultiDataSetReader.js +5 -12
- package/IO/Core/ZipMultiDataSetWriter.js +1 -2
- package/IO/Geometry/DracoReader.js +6 -10
- package/IO/Geometry/GLTFImporter/Animations.js +9 -14
- package/IO/Geometry/GLTFImporter/Constants.js +0 -1
- package/IO/Geometry/GLTFImporter/Parser.js +1 -3
- package/IO/Geometry/GLTFImporter/Reader.js +2 -5
- package/IO/Geometry/GLTFImporter.js +7 -12
- package/IO/Geometry/IFCImporter.d.ts +1 -1
- package/IO/Geometry/IFCImporter.js +6 -10
- package/IO/Geometry/PLYReader.js +6 -11
- package/IO/Geometry/PLYWriter.js +1 -2
- package/IO/Geometry/STLReader.js +6 -11
- package/IO/Geometry/STLWriter.js +2 -6
- package/IO/Image/HDRReader/Utils.js +1 -2
- package/IO/Image/HDRReader.js +7 -10
- package/IO/Image/TGAReader.js +7 -9
- package/IO/Image/TIFFReader.js +7 -10
- package/IO/Legacy/LegacyAsciiParser.js +1 -2
- package/IO/Legacy/PolyDataReader.js +5 -7
- package/IO/Misc/ElevationReader.js +1 -2
- package/IO/Misc/GCodeReader.js +6 -11
- package/IO/Misc/HttpDataSetLODsLoader.js +1 -2
- package/IO/Misc/ITKImageReader.js +6 -13
- package/IO/Misc/ITKPolyDataReader.js +6 -13
- package/IO/Misc/JSONNucleoReader.js +1 -2
- package/IO/Misc/JSONReader.js +4 -10
- package/IO/Misc/MTLReader.js +2 -4
- package/IO/Misc/OBJReader.js +4 -10
- package/IO/Misc/OBJWriter.js +1 -2
- package/IO/Misc/PDBReader.js +1 -2
- package/IO/Misc/SkyboxReader.js +5 -10
- package/IO/XML/XMLImageDataReader.js +1 -2
- package/IO/XML/XMLImageDataWriter.js +1 -2
- package/IO/XML/XMLPolyDataReader.js +1 -2
- package/IO/XML/XMLPolyDataWriter.js +1 -2
- package/IO/XML/XMLReader.js +4 -10
- package/IO/XML/XMLWriter.js +2 -4
- package/Imaging/Core/AbstractImageInterpolator.js +1 -3
- package/Imaging/Core/ImageInterpolator.js +1 -3
- package/Imaging/Core/ImagePointDataIterator.js +2 -6
- package/Imaging/Core/ImageReslice.js +1 -3
- package/Imaging/Hybrid/SampleFunction.js +1 -2
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +1 -2
- package/Interaction/Manipulators/3DControllerModelSelectorManipulator/index.js +1 -2
- package/Interaction/Manipulators/CompositeCameraManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeGestureManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeKeyboardManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeMouseManipulator.js +1 -2
- package/Interaction/Manipulators/CompositeVRManipulator.js +1 -2
- package/Interaction/Manipulators/GestureCameraManipulator.js +1 -2
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +1 -2
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraSliceManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulatorAutoCenter.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +1 -2
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +1 -2
- package/Interaction/Manipulators/MouseRangeManipulator.js +4 -11
- package/Interaction/Manipulators/VRButtonPanManipulator.js +1 -2
- package/Interaction/Misc/DeviceOrientationToCamera.js +1 -2
- package/Interaction/Style/InteractorStyleHMDXR.js +1 -2
- package/Interaction/Style/InteractorStyleImage.js +1 -2
- package/Interaction/Style/InteractorStyleMPRSlice.js +2 -6
- package/Interaction/Style/InteractorStyleManipulator.js +1 -2
- package/Interaction/Style/InteractorStyleRemoteMouse.js +1 -2
- package/Interaction/Style/InteractorStyleTrackballCamera.js +1 -3
- package/Interaction/Style/InteractorStyleUnicam.js +1 -2
- package/Interaction/UI/CornerAnnotation.js +2 -4
- package/Interaction/UI/FPSMonitor.js +3 -9
- package/Interaction/UI/Slider.js +1 -3
- package/Interaction/UI/VolumeController.js +2 -5
- package/Interaction/Widgets/OrientationMarkerWidget.js +1 -2
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +42 -59
- package/Proxy/Animation/AbstractAnimationProxy.js +1 -2
- package/Proxy/Animation/AnimationProxyManager.js +1 -2
- package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +1 -2
- package/Proxy/Core/AbstractRepresentationProxy.js +3 -6
- package/Proxy/Core/LookupTableProxy.js +1 -3
- package/Proxy/Core/PiecewiseFunctionProxy.js +3 -11
- package/Proxy/Core/ProxyManager/state.js +171 -182
- package/Proxy/Core/ProxyManager/view.js +3 -6
- package/Proxy/Core/ProxyManager.js +1 -2
- package/Proxy/Core/SourceProxy.js +2 -6
- package/Proxy/Core/View2DProxy.js +2 -4
- package/Proxy/Core/ViewProxy.js +20 -37
- package/Proxy/Representations/GeometryRepresentationProxy.js +1 -2
- package/Proxy/Representations/GlyphRepresentationProxy.js +1 -2
- package/Proxy/Representations/MoleculeRepresentationProxy.js +1 -2
- package/Proxy/Representations/ResliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SkyboxRepresentationProxy.js +1 -2
- package/Proxy/Representations/SliceRepresentationProxy.js +3 -8
- package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +3 -6
- package/Proxy/Representations/VolumeRepresentationProxy.js +9 -17
- package/Rendering/Core/AbstractImageMapper.js +1 -2
- package/Rendering/Core/AbstractMapper.js +1 -2
- package/Rendering/Core/AbstractMapper3D.js +1 -2
- package/Rendering/Core/AbstractPicker.js +1 -2
- package/Rendering/Core/Actor.js +1 -2
- package/Rendering/Core/Actor2D.js +1 -2
- package/Rendering/Core/AnnotatedCubeActor.js +2 -4
- package/Rendering/Core/AxesActor.js +2 -4
- package/Rendering/Core/Camera.js +2 -6
- package/Rendering/Core/CellPicker.js +1 -3
- package/Rendering/Core/ColorTransferFunction/CssFilters.js +8 -16
- package/Rendering/Core/ColorTransferFunction.js +4 -10
- package/Rendering/Core/Coordinate.js +2 -6
- package/Rendering/Core/CubeAxesActor.js +4 -6
- package/Rendering/Core/Follower.js +1 -2
- package/Rendering/Core/Glyph3DMapper.js +1 -2
- package/Rendering/Core/HardwareSelector.js +1 -2
- package/Rendering/Core/ImageArrayMapper.js +6 -13
- package/Rendering/Core/ImageCPRMapper.js +1 -2
- package/Rendering/Core/ImageMapper.d.ts +2 -0
- package/Rendering/Core/ImageMapper.js +2 -5
- package/Rendering/Core/ImageProperty.js +9 -28
- package/Rendering/Core/ImageResliceMapper.js +1 -2
- package/Rendering/Core/ImageSlice.js +1 -2
- package/Rendering/Core/InteractorObserver.js +1 -2
- package/Rendering/Core/InteractorStyle.js +1 -2
- package/Rendering/Core/Light.js +1 -2
- package/Rendering/Core/Mapper/Static.js +1 -2
- package/Rendering/Core/Mapper.js +1 -6
- package/Rendering/Core/Mapper2D.js +1 -3
- package/Rendering/Core/Picker.js +1 -2
- package/Rendering/Core/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/Core/PointPicker.js +1 -2
- package/Rendering/Core/Prop.js +1 -2
- package/Rendering/Core/Prop3D.js +3 -8
- package/Rendering/Core/Property.js +1 -2
- package/Rendering/Core/Property2D.js +1 -2
- package/Rendering/Core/RenderWindow.js +4 -11
- package/Rendering/Core/RenderWindowInteractor/Constants.js +0 -1
- package/Rendering/Core/RenderWindowInteractor.js +7 -12
- package/Rendering/Core/Renderer.js +3 -6
- package/Rendering/Core/ScalarBarActor.js +4 -6
- package/Rendering/Core/Skybox.js +1 -2
- package/Rendering/Core/SphereMapper.js +1 -2
- package/Rendering/Core/StickMapper.js +1 -2
- package/Rendering/Core/SurfaceLICInterface.js +1 -2
- package/Rendering/Core/SurfaceLICMapper.js +1 -2
- package/Rendering/Core/TextActor.js +1 -2
- package/Rendering/Core/TextProperty.js +1 -2
- package/Rendering/Core/Texture.js +1 -2
- package/Rendering/Core/VectorText/Utils.js +4 -8
- package/Rendering/Core/VectorText.js +1 -3
- package/Rendering/Core/Viewport.js +2 -4
- package/Rendering/Core/Volume.js +1 -2
- package/Rendering/Core/VolumeMapper.js +1 -2
- package/Rendering/Core/VolumeProperty.js +9 -22
- package/Rendering/Misc/CanvasView.js +1 -2
- package/Rendering/Misc/FullScreenRenderWindow.js +1 -2
- package/Rendering/Misc/GenericRenderWindow.js +1 -2
- package/Rendering/Misc/RemoteView.js +1 -2
- package/Rendering/Misc/RenderWindowWithControlBar.js +1 -2
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +1 -3
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +5 -6
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +24 -43
- package/Rendering/Misc/SynchronizableRenderWindow.js +3 -6
- package/Rendering/Misc/TextureLODsDownloader.js +1 -2
- package/Rendering/OpenGL/Actor.js +1 -2
- package/Rendering/OpenGL/Actor2D.js +1 -2
- package/Rendering/OpenGL/BufferObject.js +1 -3
- package/Rendering/OpenGL/Camera.js +1 -2
- package/Rendering/OpenGL/CellArrayBufferObject.js +2 -4
- package/Rendering/OpenGL/Convolution2DPass.js +2 -3
- package/Rendering/OpenGL/CubeAxesActor.js +1 -2
- package/Rendering/OpenGL/ForwardPass.js +2 -4
- package/Rendering/OpenGL/Framebuffer.js +4 -8
- package/Rendering/OpenGL/Glyph3DMapper.js +1 -2
- package/Rendering/OpenGL/HardwareSelector.js +21 -27
- package/Rendering/OpenGL/Helper.js +1 -2
- package/Rendering/OpenGL/ImageCPRMapper.js +1 -2
- package/Rendering/OpenGL/ImageMapper.js +1 -2
- package/Rendering/OpenGL/ImageResliceMapper.js +10 -16
- package/Rendering/OpenGL/ImageSlice.js +1 -2
- package/Rendering/OpenGL/OrderIndependentTranslucentPass.js +1 -2
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/OpenGL/PolyDataMapper.js +5 -4
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -2
- package/Rendering/OpenGL/RadialDistortionPass.js +2 -3
- package/Rendering/OpenGL/RenderWindow.js +36 -53
- package/Rendering/OpenGL/Renderer.js +1 -3
- package/Rendering/OpenGL/ReplacementShaderMapper.js +2 -2
- package/Rendering/OpenGL/ScalarBarActor.js +1 -2
- package/Rendering/OpenGL/Shader.js +1 -2
- package/Rendering/OpenGL/ShaderCache.js +1 -2
- package/Rendering/OpenGL/ShaderProgram.js +4 -14
- package/Rendering/OpenGL/Skybox.js +1 -2
- package/Rendering/OpenGL/SphereMapper.js +1 -2
- package/Rendering/OpenGL/StickMapper.js +1 -2
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +6 -12
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +4 -12
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +2 -4
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +1 -2
- package/Rendering/OpenGL/Texture.js +91 -113
- package/Rendering/OpenGL/TextureUnitManager.js +1 -2
- package/Rendering/OpenGL/VertexArrayObject.js +1 -2
- package/Rendering/OpenGL/ViewNodeFactory.js +1 -2
- package/Rendering/OpenGL/Volume.js +1 -2
- package/Rendering/OpenGL/VolumeMapper.js +11 -17
- package/Rendering/SceneGraph/RenderPass.js +2 -4
- package/Rendering/SceneGraph/RenderWindowViewNode.js +1 -2
- package/Rendering/SceneGraph/ViewNode.js +3 -6
- package/Rendering/SceneGraph/ViewNodeFactory.js +1 -2
- package/Rendering/WebGPU/Actor.js +1 -2
- package/Rendering/WebGPU/Actor2D.js +1 -2
- package/Rendering/WebGPU/BindGroup.js +1 -2
- package/Rendering/WebGPU/Buffer.js +2 -5
- package/Rendering/WebGPU/BufferManager.js +1 -2
- package/Rendering/WebGPU/Camera.js +1 -2
- package/Rendering/WebGPU/CellArrayMapper.js +3 -6
- package/Rendering/WebGPU/CubeAxesActor.js +1 -2
- package/Rendering/WebGPU/Device.js +2 -6
- package/Rendering/WebGPU/ForwardPass.js +2 -4
- package/Rendering/WebGPU/FullScreenQuad.js +1 -2
- package/Rendering/WebGPU/Glyph3DMapper.js +2 -4
- package/Rendering/WebGPU/HardwareSelectionPass.js +1 -2
- package/Rendering/WebGPU/HardwareSelector.js +1 -2
- package/Rendering/WebGPU/ImageMapper.js +1 -2
- package/Rendering/WebGPU/ImageSlice.js +1 -2
- package/Rendering/WebGPU/IndexBuffer.js +1 -2
- package/Rendering/WebGPU/OpaquePass.js +1 -2
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +1 -2
- package/Rendering/WebGPU/Pipeline.js +1 -2
- package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +1 -2
- package/Rendering/WebGPU/PolyDataMapper.js +1 -2
- package/Rendering/WebGPU/PolyDataMapper2D.js +1 -2
- package/Rendering/WebGPU/RenderEncoder.js +2 -5
- package/Rendering/WebGPU/RenderWindow.js +15 -25
- package/Rendering/WebGPU/Renderer.js +1 -2
- package/Rendering/WebGPU/Sampler.js +2 -4
- package/Rendering/WebGPU/ScalarBarActor.js +1 -2
- package/Rendering/WebGPU/ShaderCache.js +2 -4
- package/Rendering/WebGPU/ShaderDescription.js +2 -4
- package/Rendering/WebGPU/ShaderModule.js +1 -2
- package/Rendering/WebGPU/SimpleMapper.js +1 -3
- package/Rendering/WebGPU/SphereMapper.js +1 -2
- package/Rendering/WebGPU/StickMapper.js +1 -2
- package/Rendering/WebGPU/StorageBuffer.js +1 -2
- package/Rendering/WebGPU/Texture.js +3 -7
- package/Rendering/WebGPU/TextureManager.js +2 -6
- package/Rendering/WebGPU/TextureView.js +1 -3
- package/Rendering/WebGPU/UniformBuffer.js +1 -2
- package/Rendering/WebGPU/VertexInput.js +2 -4
- package/Rendering/WebGPU/ViewNodeFactory.js +1 -2
- package/Rendering/WebGPU/Volume.js +1 -2
- package/Rendering/WebGPU/VolumePass.js +1 -2
- package/Rendering/WebGPU/VolumePassFSQ.js +1 -2
- package/Rendering/WebXR/RenderWindowHelper.js +2 -6
- package/Widgets/Core/AbstractWidget.js +6 -10
- package/Widgets/Core/AbstractWidgetFactory.js +17 -22
- package/Widgets/Core/StateBuilder/boundsMixin.js +1 -2
- package/Widgets/Core/StateBuilder/color3Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/colorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/cornerMixin.js +1 -2
- package/Widgets/Core/StateBuilder/directionMixin.js +1 -2
- package/Widgets/Core/StateBuilder/manipulatorMixin.js +1 -2
- package/Widgets/Core/StateBuilder/nameMixin.js +1 -2
- package/Widgets/Core/StateBuilder/orientationMixin.js +1 -2
- package/Widgets/Core/StateBuilder/originMixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale1Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/scale3Mixin.js +1 -2
- package/Widgets/Core/StateBuilder/shapeMixin.js +1 -2
- package/Widgets/Core/StateBuilder/textMixin.js +1 -2
- package/Widgets/Core/StateBuilder/visibleMixin.js +1 -2
- package/Widgets/Core/StateBuilder.js +23 -33
- package/Widgets/Core/WidgetManager/Constants.js +0 -1
- package/Widgets/Core/WidgetManager.js +25 -30
- package/Widgets/Core/WidgetState.js +2 -4
- package/Widgets/Manipulators/AbstractManipulator.js +1 -2
- package/Widgets/Manipulators/CPRManipulator.js +1 -2
- package/Widgets/Manipulators/LineManipulator.js +1 -2
- package/Widgets/Manipulators/PickerManipulator.js +1 -2
- package/Widgets/Manipulators/PlaneManipulator.js +1 -2
- package/Widgets/Manipulators/TrackballManipulator.js +1 -2
- package/Widgets/Representations/ArrowHandleRepresentation.js +2 -6
- package/Widgets/Representations/CircleContextRepresentation.js +1 -2
- package/Widgets/Representations/ContextRepresentation.js +1 -2
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +2 -6
- package/Widgets/Representations/CroppingOutlineRepresentation.js +1 -2
- package/Widgets/Representations/CubeHandleRepresentation.js +1 -2
- package/Widgets/Representations/GlyphRepresentation.js +3 -11
- package/Widgets/Representations/HandleRepresentation.js +1 -2
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +1 -2
- package/Widgets/Representations/LineHandleRepresentation.js +1 -2
- package/Widgets/Representations/OutlineContextRepresentation.js +1 -2
- package/Widgets/Representations/PolyLineRepresentation.js +2 -4
- package/Widgets/Representations/RectangleContextRepresentation.js +1 -2
- package/Widgets/Representations/RotateTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/ScaleTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/SphereContextRepresentation.js +1 -2
- package/Widgets/Representations/SphereHandleRepresentation.js +1 -2
- package/Widgets/Representations/SplineContextRepresentation.js +2 -6
- package/Widgets/Representations/TranslateTransformHandleRepresentation/TransformHandleSource.js +1 -2
- package/Widgets/Representations/TranslateTransformHandleRepresentation.js +1 -2
- package/Widgets/Representations/WidgetRepresentation.js +6 -20
- package/Widgets/Widgets3D/AngleWidget.js +1 -2
- package/Widgets/Widgets3D/EllipseWidget.js +1 -2
- package/Widgets/Widgets3D/ImageCroppingWidget.js +1 -2
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +1 -3
- package/Widgets/Widgets3D/InteractiveOrientationWidget/helpers.js +6 -7
- package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +0 -1
- package/Widgets/Widgets3D/InteractiveOrientationWidget.js +1 -2
- package/Widgets/Widgets3D/LabelWidget.js +1 -2
- package/Widgets/Widgets3D/LineWidget/behavior.js +1 -2
- package/Widgets/Widgets3D/LineWidget/helpers.js +1 -2
- package/Widgets/Widgets3D/LineWidget.js +1 -2
- package/Widgets/Widgets3D/PaintWidget.js +1 -2
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +3 -4
- package/Widgets/Widgets3D/PolyLineWidget.js +1 -2
- package/Widgets/Widgets3D/RectangleWidget.js +1 -2
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +0 -1
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +2 -3
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +1 -3
- package/Widgets/Widgets3D/ResliceCursorWidget.js +1 -3
- package/Widgets/Widgets3D/SeedWidget/behavior.js +15 -14
- package/Widgets/Widgets3D/SeedWidget.d.ts +18 -1
- package/Widgets/Widgets3D/SeedWidget.js +1 -2
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +7 -10
- package/Widgets/Widgets3D/ShapeWidget.js +1 -2
- package/Widgets/Widgets3D/SphereWidget.js +1 -2
- package/Widgets/Widgets3D/SplineWidget/behavior.js +13 -13
- package/Widgets/Widgets3D/SplineWidget.js +1 -2
- package/Widgets/Widgets3D/TransformControlsWidget.js +1 -2
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +20 -25
- package/macros2.js +46 -114
- package/package.json +24 -16
package/macros2.js
CHANGED
|
@@ -40,20 +40,20 @@ function setLoggerFunction(name, fn) {
|
|
|
40
40
|
loggerFunctions[name] = fn || noOp;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function vtkLogMacro() {
|
|
44
|
-
loggerFunctions.log(...
|
|
43
|
+
function vtkLogMacro(...args) {
|
|
44
|
+
loggerFunctions.log(...args);
|
|
45
45
|
}
|
|
46
|
-
function vtkInfoMacro() {
|
|
47
|
-
loggerFunctions.info(...
|
|
46
|
+
function vtkInfoMacro(...args) {
|
|
47
|
+
loggerFunctions.info(...args);
|
|
48
48
|
}
|
|
49
|
-
function vtkDebugMacro() {
|
|
50
|
-
loggerFunctions.debug(...
|
|
49
|
+
function vtkDebugMacro(...args) {
|
|
50
|
+
loggerFunctions.debug(...args);
|
|
51
51
|
}
|
|
52
|
-
function vtkErrorMacro() {
|
|
53
|
-
loggerFunctions.error(...
|
|
52
|
+
function vtkErrorMacro(...args) {
|
|
53
|
+
loggerFunctions.error(...args);
|
|
54
54
|
}
|
|
55
|
-
function vtkWarningMacro() {
|
|
56
|
-
loggerFunctions.warn(...
|
|
55
|
+
function vtkWarningMacro(...args) {
|
|
56
|
+
loggerFunctions.warn(...args);
|
|
57
57
|
}
|
|
58
58
|
const ERROR_ONCE_MAP = {};
|
|
59
59
|
function vtkOnceErrorMacro(str) {
|
|
@@ -83,16 +83,10 @@ try {
|
|
|
83
83
|
} catch {
|
|
84
84
|
// ignore
|
|
85
85
|
}
|
|
86
|
-
function newTypedArray(type) {
|
|
87
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
88
|
-
args[_key - 1] = arguments[_key];
|
|
89
|
-
}
|
|
86
|
+
function newTypedArray(type, ...args) {
|
|
90
87
|
return new (TYPED_ARRAYS[type] || Float64Array)(...args);
|
|
91
88
|
}
|
|
92
|
-
function newTypedArrayFrom(type) {
|
|
93
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
94
|
-
args[_key2 - 1] = arguments[_key2];
|
|
95
|
-
}
|
|
89
|
+
function newTypedArrayFrom(type, ...args) {
|
|
96
90
|
return (TYPED_ARRAYS[type] || Float64Array).from(...args);
|
|
97
91
|
}
|
|
98
92
|
|
|
@@ -114,9 +108,7 @@ function uncapitalize(str) {
|
|
|
114
108
|
// Convert byte size into a well formatted string
|
|
115
109
|
// ----------------------------------------------------------------------------
|
|
116
110
|
|
|
117
|
-
function formatBytesToProperUnit(size) {
|
|
118
|
-
let precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
|
|
119
|
-
let chunkSize = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
|
|
111
|
+
function formatBytesToProperUnit(size, precision = 2, chunkSize = 1000) {
|
|
120
112
|
const units = ['TB', 'GB', 'MB', 'KB'];
|
|
121
113
|
let value = Number(size);
|
|
122
114
|
let currentUnit = 'B';
|
|
@@ -131,8 +123,7 @@ function formatBytesToProperUnit(size) {
|
|
|
131
123
|
// Convert thousand number with proper separator
|
|
132
124
|
// ----------------------------------------------------------------------------
|
|
133
125
|
|
|
134
|
-
function formatNumbersWithThousandSeparator(n) {
|
|
135
|
-
let separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
|
|
126
|
+
function formatNumbersWithThousandSeparator(n, separator = ' ') {
|
|
136
127
|
const sections = [];
|
|
137
128
|
let size = n;
|
|
138
129
|
while (size > 1000) {
|
|
@@ -223,9 +214,7 @@ function measurePromiseExecution(promise, callback) {
|
|
|
223
214
|
// vtkObject: modified(), onModified(callback), delete()
|
|
224
215
|
// ----------------------------------------------------------------------------
|
|
225
216
|
|
|
226
|
-
function obj() {
|
|
227
|
-
let publicAPI = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
228
|
-
let model = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
217
|
+
function obj(publicAPI = {}, model = {}) {
|
|
229
218
|
// Ensure each instance as a unique ref of array
|
|
230
219
|
safeArrays(model);
|
|
231
220
|
const callbacks = [];
|
|
@@ -285,14 +274,8 @@ function obj() {
|
|
|
285
274
|
}
|
|
286
275
|
return false;
|
|
287
276
|
};
|
|
288
|
-
publicAPI.getClassName =
|
|
289
|
-
|
|
290
|
-
return model.classHierarchy[model.classHierarchy.length - 1 - depth];
|
|
291
|
-
};
|
|
292
|
-
publicAPI.set = function () {
|
|
293
|
-
let map = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
294
|
-
let noWarning = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
295
|
-
let noFunction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
277
|
+
publicAPI.getClassName = (depth = 0) => model.classHierarchy[model.classHierarchy.length - 1 - depth];
|
|
278
|
+
publicAPI.set = (map = {}, noWarning = false, noFunction = false) => {
|
|
296
279
|
let ret = false;
|
|
297
280
|
Object.keys(map).forEach(name => {
|
|
298
281
|
const fn = noFunction ? null : publicAPI[`set${capitalize(name)}`];
|
|
@@ -311,10 +294,7 @@ function obj() {
|
|
|
311
294
|
});
|
|
312
295
|
return ret;
|
|
313
296
|
};
|
|
314
|
-
publicAPI.get =
|
|
315
|
-
for (var _len3 = arguments.length, list = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
316
|
-
list[_key3] = arguments[_key3];
|
|
317
|
-
}
|
|
297
|
+
publicAPI.get = (...list) => {
|
|
318
298
|
if (!list.length) {
|
|
319
299
|
return model;
|
|
320
300
|
}
|
|
@@ -371,8 +351,7 @@ function obj() {
|
|
|
371
351
|
};
|
|
372
352
|
|
|
373
353
|
// Add shallowCopy(otherInstance) support
|
|
374
|
-
publicAPI.shallowCopy =
|
|
375
|
-
let debug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
354
|
+
publicAPI.shallowCopy = (other, debug = false) => {
|
|
376
355
|
if (other.getClassName() !== publicAPI.getClassName()) {
|
|
377
356
|
throw new Error(`Cannot ShallowCopy ${other.getClassName()} into ${publicAPI.getClassName()}`);
|
|
378
357
|
}
|
|
@@ -477,10 +456,7 @@ const objectSetterMap = {
|
|
|
477
456
|
vtkWarningMacro('Setter of type "object" with a single "param" field is not supported');
|
|
478
457
|
}
|
|
479
458
|
const onChanged = `_on${_capitalize(field.name)}Changed`;
|
|
480
|
-
return
|
|
481
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
482
|
-
args[_key4] = arguments[_key4];
|
|
483
|
-
}
|
|
459
|
+
return (...args) => {
|
|
484
460
|
let value;
|
|
485
461
|
if (args.length > 1 && field.params?.length) {
|
|
486
462
|
value = field.params.reduce((acc, prop, idx) => Object.assign(acc, {
|
|
@@ -564,21 +540,17 @@ function getArray(publicAPI, model, fieldNames) {
|
|
|
564
540
|
// set...From: fast path to copy the content of an array to the current one without call to modified.
|
|
565
541
|
// ----------------------------------------------------------------------------
|
|
566
542
|
|
|
567
|
-
function setArray(publicAPI, model, fieldNames, size) {
|
|
568
|
-
let defaultVal = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
|
|
543
|
+
function setArray(publicAPI, model, fieldNames, size, defaultVal = undefined) {
|
|
569
544
|
fieldNames.forEach(field => {
|
|
570
545
|
if (model[field] && size && model[field].length !== size) {
|
|
571
546
|
throw new RangeError(`Invalid initial number of values for array (${field})`);
|
|
572
547
|
}
|
|
573
548
|
const onChanged = `_on${_capitalize(field)}Changed`;
|
|
574
|
-
publicAPI[`set${_capitalize(field)}`] =
|
|
549
|
+
publicAPI[`set${_capitalize(field)}`] = (...args) => {
|
|
575
550
|
if (model.deleted) {
|
|
576
551
|
vtkErrorMacro('instance deleted - cannot call any method');
|
|
577
552
|
return false;
|
|
578
553
|
}
|
|
579
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
580
|
-
args[_key5] = arguments[_key5];
|
|
581
|
-
}
|
|
582
554
|
let array = args;
|
|
583
555
|
let changeDetected;
|
|
584
556
|
let needCopy = false;
|
|
@@ -630,8 +602,7 @@ function setArray(publicAPI, model, fieldNames, size) {
|
|
|
630
602
|
// set/get XXX: add setter and getter for object of type array
|
|
631
603
|
// ----------------------------------------------------------------------------
|
|
632
604
|
|
|
633
|
-
function setGetArray(publicAPI, model, fieldNames, size) {
|
|
634
|
-
let defaultVal = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : undefined;
|
|
605
|
+
function setGetArray(publicAPI, model, fieldNames, size, defaultVal = undefined) {
|
|
635
606
|
getArray(publicAPI, model, fieldNames);
|
|
636
607
|
setArray(publicAPI, model, fieldNames, size, defaultVal);
|
|
637
608
|
}
|
|
@@ -674,8 +645,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
674
645
|
model.numberOfInputs = numberOfInputs;
|
|
675
646
|
|
|
676
647
|
// Methods
|
|
677
|
-
function setInputData(dataset) {
|
|
678
|
-
let port = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
648
|
+
function setInputData(dataset, port = 0) {
|
|
679
649
|
if (model.deleted) {
|
|
680
650
|
vtkErrorMacro('instance deleted - cannot call any method');
|
|
681
651
|
return;
|
|
@@ -692,15 +662,13 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
692
662
|
}
|
|
693
663
|
}
|
|
694
664
|
}
|
|
695
|
-
function getInputData() {
|
|
696
|
-
let port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
665
|
+
function getInputData(port = 0) {
|
|
697
666
|
if (model.inputConnection[port]) {
|
|
698
667
|
model.inputData[port] = model.inputConnection[port]();
|
|
699
668
|
}
|
|
700
669
|
return model.inputData[port];
|
|
701
670
|
}
|
|
702
|
-
function setInputConnection(outputPort) {
|
|
703
|
-
let port = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
671
|
+
function setInputConnection(outputPort, port = 0) {
|
|
704
672
|
if (model.deleted) {
|
|
705
673
|
vtkErrorMacro('instance deleted - cannot call any method');
|
|
706
674
|
return;
|
|
@@ -715,8 +683,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
715
683
|
model.inputData[port] = null;
|
|
716
684
|
model.inputConnection[port] = outputPort;
|
|
717
685
|
}
|
|
718
|
-
function getInputConnection() {
|
|
719
|
-
let port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
686
|
+
function getInputConnection(port = 0) {
|
|
720
687
|
return model.inputConnection[port];
|
|
721
688
|
}
|
|
722
689
|
function getPortToFill() {
|
|
@@ -743,8 +710,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
743
710
|
}
|
|
744
711
|
setInputData(dataset, getPortToFill());
|
|
745
712
|
}
|
|
746
|
-
function getOutputData() {
|
|
747
|
-
let port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
713
|
+
function getOutputData(port = 0) {
|
|
748
714
|
if (model.deleted) {
|
|
749
715
|
vtkErrorMacro('instance deleted - cannot call any method');
|
|
750
716
|
return null;
|
|
@@ -778,8 +744,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
778
744
|
}
|
|
779
745
|
return false;
|
|
780
746
|
};
|
|
781
|
-
function getOutputPort() {
|
|
782
|
-
let port = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
747
|
+
function getOutputPort(port = 0) {
|
|
783
748
|
const outputPortAccess = () => getOutputData(port);
|
|
784
749
|
// Add reference to filter
|
|
785
750
|
outputPortAccess.filter = publicAPI;
|
|
@@ -830,8 +795,7 @@ function algo(publicAPI, model, numberOfInputs, numberOfOutputs) {
|
|
|
830
795
|
}
|
|
831
796
|
return null;
|
|
832
797
|
};
|
|
833
|
-
publicAPI.setInputArrayToProcess =
|
|
834
|
-
let attributeType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'Scalars';
|
|
798
|
+
publicAPI.setInputArrayToProcess = (inputPort, arrayName, fieldAssociation, attributeType = 'Scalars') => {
|
|
835
799
|
while (model.inputArrayToProcess.length < inputPort) {
|
|
836
800
|
model.inputArrayToProcess.push(null);
|
|
837
801
|
}
|
|
@@ -883,7 +847,6 @@ function event(publicAPI, model, eventName) {
|
|
|
883
847
|
if (!cb) {
|
|
884
848
|
continue; // eslint-disable-line
|
|
885
849
|
}
|
|
886
|
-
|
|
887
850
|
if (priority < 0) {
|
|
888
851
|
setTimeout(() => cb.apply(publicAPI, arguments), 1 - priority);
|
|
889
852
|
} else {
|
|
@@ -896,10 +859,8 @@ function event(publicAPI, model, eventName) {
|
|
|
896
859
|
}
|
|
897
860
|
/* eslint-enable prefer-rest-params */
|
|
898
861
|
}
|
|
899
|
-
|
|
900
862
|
publicAPI[`invoke${_capitalize(eventName)}`] = invoke;
|
|
901
|
-
publicAPI[`on${_capitalize(eventName)}`] =
|
|
902
|
-
let priority = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.0;
|
|
863
|
+
publicAPI[`on${_capitalize(eventName)}`] = (callback, priority = 0.0) => {
|
|
903
864
|
if (!callback.apply) {
|
|
904
865
|
console.error(`Invalid callback for event ${eventName}`);
|
|
905
866
|
return null;
|
|
@@ -915,10 +876,7 @@ function event(publicAPI, model, eventName) {
|
|
|
915
876
|
};
|
|
916
877
|
publicAPI.delete = () => {
|
|
917
878
|
previousDelete();
|
|
918
|
-
callbacks.forEach(
|
|
919
|
-
let [cbID] = _ref;
|
|
920
|
-
return off(cbID);
|
|
921
|
-
});
|
|
879
|
+
callbacks.forEach(([cbID]) => off(cbID));
|
|
922
880
|
};
|
|
923
881
|
}
|
|
924
882
|
|
|
@@ -927,8 +885,7 @@ function event(publicAPI, model, eventName) {
|
|
|
927
885
|
// ----------------------------------------------------------------------------
|
|
928
886
|
|
|
929
887
|
function newInstance(extend, className) {
|
|
930
|
-
const constructor =
|
|
931
|
-
let initialValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
888
|
+
const constructor = (initialValues = {}) => {
|
|
932
889
|
const model = {};
|
|
933
890
|
const publicAPI = {};
|
|
934
891
|
extend(publicAPI, model, initialValues);
|
|
@@ -946,16 +903,8 @@ function newInstance(extend, className) {
|
|
|
946
903
|
// Chain function calls
|
|
947
904
|
// ----------------------------------------------------------------------------
|
|
948
905
|
|
|
949
|
-
function chain() {
|
|
950
|
-
|
|
951
|
-
fn[_key6] = arguments[_key6];
|
|
952
|
-
}
|
|
953
|
-
return function () {
|
|
954
|
-
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
955
|
-
args[_key7] = arguments[_key7];
|
|
956
|
-
}
|
|
957
|
-
return fn.filter(i => !!i).map(i => i(...args));
|
|
958
|
-
};
|
|
906
|
+
function chain(...fn) {
|
|
907
|
+
return (...args) => fn.filter(i => !!i).map(i => i(...args));
|
|
959
908
|
}
|
|
960
909
|
|
|
961
910
|
// ----------------------------------------------------------------------------
|
|
@@ -965,9 +914,7 @@ function chain() {
|
|
|
965
914
|
function isVtkObject(instance) {
|
|
966
915
|
return instance && instance.isA && instance.isA('vtkObject');
|
|
967
916
|
}
|
|
968
|
-
function traverseInstanceTree(instance, extractFunction) {
|
|
969
|
-
let accumulator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
970
|
-
let visitedInstances = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
917
|
+
function traverseInstanceTree(instance, extractFunction, accumulator = [], visitedInstances = []) {
|
|
971
918
|
if (isVtkObject(instance)) {
|
|
972
919
|
if (visitedInstances.indexOf(instance) >= 0) {
|
|
973
920
|
// avoid cycles
|
|
@@ -1002,13 +949,9 @@ function traverseInstanceTree(instance, extractFunction) {
|
|
|
1002
949
|
// leading edge, instead of the trailing.
|
|
1003
950
|
|
|
1004
951
|
function debounce(func, wait, immediate) {
|
|
1005
|
-
var _this = this;
|
|
1006
952
|
let timeout;
|
|
1007
|
-
const debounced =
|
|
1008
|
-
|
|
1009
|
-
args[_key8] = arguments[_key8];
|
|
1010
|
-
}
|
|
1011
|
-
const context = _this;
|
|
953
|
+
const debounced = (...args) => {
|
|
954
|
+
const context = this;
|
|
1012
955
|
const later = () => {
|
|
1013
956
|
timeout = null;
|
|
1014
957
|
if (!immediate) {
|
|
@@ -1040,10 +983,7 @@ function throttle(callback, delay) {
|
|
|
1040
983
|
argsToUse = null;
|
|
1041
984
|
}
|
|
1042
985
|
}
|
|
1043
|
-
function wrapper() {
|
|
1044
|
-
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
1045
|
-
args[_key9] = arguments[_key9];
|
|
1046
|
-
}
|
|
986
|
+
function wrapper(...args) {
|
|
1047
987
|
if (isThrottled) {
|
|
1048
988
|
argsToUse = args;
|
|
1049
989
|
return;
|
|
@@ -1068,8 +1008,7 @@ function throttle(callback, delay) {
|
|
|
1068
1008
|
// deleteKey(key) : Boolean
|
|
1069
1009
|
// ----------------------------------------------------------------------------
|
|
1070
1010
|
|
|
1071
|
-
function keystore(publicAPI, model) {
|
|
1072
|
-
let initialKeystore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1011
|
+
function keystore(publicAPI, model, initialKeystore = {}) {
|
|
1073
1012
|
model.keystore = Object.assign(model.keystore || {}, initialKeystore);
|
|
1074
1013
|
publicAPI.setKey = (key, value) => {
|
|
1075
1014
|
model.keystore[key] = value;
|
|
@@ -1131,8 +1070,7 @@ function proxy(publicAPI, model) {
|
|
|
1131
1070
|
registerProperties(model.ui, ROOT_GROUP_NAME);
|
|
1132
1071
|
publicAPI.modified();
|
|
1133
1072
|
};
|
|
1134
|
-
function listProxyProperties() {
|
|
1135
|
-
let gName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ROOT_GROUP_NAME;
|
|
1073
|
+
function listProxyProperties(gName = ROOT_GROUP_NAME) {
|
|
1136
1074
|
return groupChildrenNames[gName];
|
|
1137
1075
|
}
|
|
1138
1076
|
publicAPI.updateProxyProperty = (propertyName, propUI) => {
|
|
@@ -1169,8 +1107,7 @@ function proxy(publicAPI, model) {
|
|
|
1169
1107
|
}
|
|
1170
1108
|
};
|
|
1171
1109
|
model.propertyLinkMap = {};
|
|
1172
|
-
publicAPI.getPropertyLink =
|
|
1173
|
-
let persistent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1110
|
+
publicAPI.getPropertyLink = (id, persistent = false) => {
|
|
1174
1111
|
if (model.propertyLinkMap[id]) {
|
|
1175
1112
|
return model.propertyLinkMap[id];
|
|
1176
1113
|
}
|
|
@@ -1178,8 +1115,7 @@ function proxy(publicAPI, model) {
|
|
|
1178
1115
|
const links = [];
|
|
1179
1116
|
let count = 0;
|
|
1180
1117
|
let updateInProgress = false;
|
|
1181
|
-
function update(source) {
|
|
1182
|
-
let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
1118
|
+
function update(source, force = false) {
|
|
1183
1119
|
if (updateInProgress) {
|
|
1184
1120
|
return null;
|
|
1185
1121
|
}
|
|
@@ -1228,8 +1164,7 @@ function proxy(publicAPI, model) {
|
|
|
1228
1164
|
links.splice(indexToDelete.pop(), 1);
|
|
1229
1165
|
}
|
|
1230
1166
|
}
|
|
1231
|
-
function bind(instance, propertyName) {
|
|
1232
|
-
let updateMe = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1167
|
+
function bind(instance, propertyName, updateMe = false) {
|
|
1233
1168
|
const subscription = instance.onModified(update);
|
|
1234
1169
|
const other = links[0];
|
|
1235
1170
|
links.push({
|
|
@@ -1266,8 +1201,7 @@ function proxy(publicAPI, model) {
|
|
|
1266
1201
|
};
|
|
1267
1202
|
|
|
1268
1203
|
// extract values
|
|
1269
|
-
function getProperties() {
|
|
1270
|
-
let groupName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ROOT_GROUP_NAME;
|
|
1204
|
+
function getProperties(groupName = ROOT_GROUP_NAME) {
|
|
1271
1205
|
const values = [];
|
|
1272
1206
|
const id = model.proxyId;
|
|
1273
1207
|
const propertyNames = listProxyProperties(groupName) || [];
|
|
@@ -1394,9 +1328,7 @@ function proxyPropertyMapping(publicAPI, model, map) {
|
|
|
1394
1328
|
// get / set Representation ( string ) => push state to various internal objects
|
|
1395
1329
|
// ----------------------------------------------------------------------------
|
|
1396
1330
|
|
|
1397
|
-
function proxyPropertyState(publicAPI, model) {
|
|
1398
|
-
let state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1399
|
-
let defaults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
1331
|
+
function proxyPropertyState(publicAPI, model, state = {}, defaults = {}) {
|
|
1400
1332
|
model.this = publicAPI;
|
|
1401
1333
|
function applyState(map) {
|
|
1402
1334
|
const modelKeys = Object.keys(map);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitware/vtk.js",
|
|
3
|
-
"version": "34.16.
|
|
3
|
+
"version": "34.16.6",
|
|
4
4
|
"description": "Visualization Toolkit for the Web",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"3d",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "https://github.com/Kitware/vtk-js.git"
|
|
23
|
+
"url": "git+https://github.com/Kitware/vtk-js.git"
|
|
24
24
|
},
|
|
25
25
|
"license": "BSD-3-Clause",
|
|
26
26
|
"bugs": {
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
83
83
|
"eslint-plugin-prettier": "4.0.0",
|
|
84
84
|
"eslint-webpack-plugin": "3.1.1",
|
|
85
|
+
"eta": "4.5.0",
|
|
85
86
|
"expose-loader": "3.1.0",
|
|
86
87
|
"glob": "8.0.3",
|
|
87
88
|
"handlebars": "4.7.7",
|
|
@@ -96,9 +97,8 @@
|
|
|
96
97
|
"karma-firefox-launcher": "2.1.2",
|
|
97
98
|
"karma-junit-reporter": "2.0.1",
|
|
98
99
|
"karma-webpack": "5.0.0",
|
|
99
|
-
"kw-doc": "3.1.2",
|
|
100
100
|
"lil-gui": "0.19.2",
|
|
101
|
-
"lodash": "4.17.
|
|
101
|
+
"lodash": "4.17.23",
|
|
102
102
|
"magic-string": "0.26.2",
|
|
103
103
|
"moment": "2.29.4",
|
|
104
104
|
"patch-package": "6.4.7",
|
|
@@ -116,12 +116,15 @@
|
|
|
116
116
|
"rollup-plugin-string": "3.0.0",
|
|
117
117
|
"rollup-plugin-svgo": "2.0.0",
|
|
118
118
|
"rollup-plugin-web-worker-loader": "1.6.1",
|
|
119
|
-
"semantic-release": "
|
|
119
|
+
"semantic-release": "25.0.2",
|
|
120
120
|
"snabbdom": "^3.5.1",
|
|
121
121
|
"string-replace-loader": "3.1.0",
|
|
122
122
|
"style-loader": "3.3.1",
|
|
123
123
|
"tape": "5.5.3",
|
|
124
124
|
"typescript": "^5.8.3",
|
|
125
|
+
"vitepress": "1.6.4",
|
|
126
|
+
"vitepress-plugin-google-analytics": "^1.0.2",
|
|
127
|
+
"vitepress-plugin-llms": "^1.10.0",
|
|
125
128
|
"webpack": "^5.97.1",
|
|
126
129
|
"webpack-bundle-analyzer": "4.5.0",
|
|
127
130
|
"webpack-cli": "^5.1.4",
|
|
@@ -144,19 +147,24 @@
|
|
|
144
147
|
"lint-fix": "eslint --fix Sources Examples",
|
|
145
148
|
"lint": "eslint Sources Examples",
|
|
146
149
|
"typecheck": "tsc --noEmit",
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
150
|
+
"docs:dev": "vitepress dev Documentation",
|
|
151
|
+
"docs:build": "vitepress build Documentation",
|
|
152
|
+
"docs:serve": "vitepress serve Documentation",
|
|
153
|
+
"docs:build-examples": "npm run build:pre && node ./Documentation/scripts/build-examples.mjs",
|
|
154
|
+
"docs:generate-api": "npm run build:pre && node ./Documentation/scripts/generate-api-docs.mjs",
|
|
155
|
+
"docs:generate-examples": "npm run build:pre && node ./Documentation/scripts/generate-examples.mjs",
|
|
156
|
+
"docs:generate-sidebar": "npm run build:pre && node ./Documentation/scripts/generate-sidebar-config.mjs",
|
|
157
|
+
"docs:generate-gallery": "npm run build:pre && node ./Documentation/scripts/generate-gallery.mjs",
|
|
158
|
+
"example": "node ./Utilities/ExampleRunner/example-runner-cli.js",
|
|
159
|
+
"example:https": "node ./Utilities/ExampleRunner/example-runner-cli.js --server-type https",
|
|
160
|
+
"example:webgpu": "cross-env WEBGPU=1 NO_WEBGL=1 node ./Utilities/ExampleRunner/example-runner-cli.js --server-type https",
|
|
154
161
|
"build:pre": "patch-package",
|
|
155
162
|
"dev:esm": "npm run build:esm -- -w",
|
|
156
163
|
"dev:umd": "npm run build:pre && webpack --watch --config webpack.dev.js --progress",
|
|
157
164
|
"build": "npm run build:release",
|
|
158
165
|
"build:esm": "npm run build:pre && rollup -c rollup.config.js",
|
|
159
166
|
"build:umd": "npm run build:pre && webpack --config webpack.prod.js --progress",
|
|
167
|
+
"build:examples": "npm run build:pre && webpack --config webpack.examples.config.js --progress",
|
|
160
168
|
"build:release": "npm run lint && npm run build:pre && concurrently \"cross-env NOLINT=1 npm run build:esm\" \"cross-env NOLINT=1 npm run build:umd\"",
|
|
161
169
|
"release:create-packages": "node ./Utilities/ci/build-npm-package.js",
|
|
162
170
|
"test": "karma start ./karma.conf.js",
|
|
@@ -175,8 +183,8 @@
|
|
|
175
183
|
}
|
|
176
184
|
},
|
|
177
185
|
"bin": {
|
|
178
|
-
"vtkDataConverter": "
|
|
179
|
-
"xml2json": "
|
|
186
|
+
"vtkDataConverter": "Utilities/DataGenerator/convert-cli.js",
|
|
187
|
+
"xml2json": "Utilities/XMLConverter/xml2json-cli.js"
|
|
180
188
|
},
|
|
181
189
|
"nyc": {
|
|
182
190
|
"include": [
|
|
@@ -219,13 +227,13 @@
|
|
|
219
227
|
[
|
|
220
228
|
"@semantic-release/npm",
|
|
221
229
|
{
|
|
222
|
-
"pkgRoot": "./dist/
|
|
230
|
+
"pkgRoot": "./dist/esm"
|
|
223
231
|
}
|
|
224
232
|
],
|
|
225
233
|
[
|
|
226
234
|
"@semantic-release/npm",
|
|
227
235
|
{
|
|
228
|
-
"pkgRoot": "./dist/
|
|
236
|
+
"pkgRoot": "./dist/umd"
|
|
229
237
|
}
|
|
230
238
|
],
|
|
231
239
|
[
|