@kitware/vtk.js 34.16.3 → 34.16.7
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.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 +1 -2
- package/Rendering/OpenGL/PolyDataMapper2D.js +1 -2
- package/Rendering/OpenGL/RadialDistortionPass.js +2 -3
- package/Rendering/OpenGL/RenderWindow.js +33 -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.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 +26 -19
|
@@ -57,9 +57,7 @@ function vtkWebGPUBuffer(publicAPI, model) {
|
|
|
57
57
|
|
|
58
58
|
// simple forwarders
|
|
59
59
|
for (let i = 0; i < forwarded.length; i++) {
|
|
60
|
-
publicAPI[forwarded[i]] =
|
|
61
|
-
return model.handle[forwarded[i]](...arguments);
|
|
62
|
-
};
|
|
60
|
+
publicAPI[forwarded[i]] = (...args) => model.handle[forwarded[i]](...args);
|
|
63
61
|
}
|
|
64
62
|
}
|
|
65
63
|
|
|
@@ -80,8 +78,7 @@ const DEFAULT_VALUES = {
|
|
|
80
78
|
|
|
81
79
|
// ----------------------------------------------------------------------------
|
|
82
80
|
|
|
83
|
-
function extend(publicAPI, model) {
|
|
84
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
81
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
85
82
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
86
83
|
|
|
87
84
|
// Object methods
|
|
@@ -340,8 +340,7 @@ const DEFAULT_VALUES = {
|
|
|
340
340
|
|
|
341
341
|
// ----------------------------------------------------------------------------
|
|
342
342
|
|
|
343
|
-
function extend(publicAPI, model) {
|
|
344
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
343
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
345
344
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
346
345
|
|
|
347
346
|
// Object methods
|
|
@@ -100,8 +100,7 @@ const DEFAULT_VALUES = {
|
|
|
100
100
|
|
|
101
101
|
// ----------------------------------------------------------------------------
|
|
102
102
|
|
|
103
|
-
function extend(publicAPI, model) {
|
|
104
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
103
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
105
104
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
106
105
|
|
|
107
106
|
// Inheritance
|
|
@@ -874,8 +874,7 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
|
|
|
874
874
|
const actor = model.WebGPUActor.getRenderable();
|
|
875
875
|
const renderer = model.WebGPURenderer.getRenderable();
|
|
876
876
|
const textures = [['DiffuseTexture', actor.getProperty().getDiffuseTexture?.()], ['DiffuseTexture', actor.getTextures()[0]], ['DiffuseTexture', model.colorTexture], ['ORMTexture', actor.getProperty().getORMTexture?.()], ['RMTexture', actor.getProperty().getRMTexture?.()], ['RoughnessTexture', actor.getProperty().getRoughnessTexture?.()], ['MetallicTexture', actor.getProperty().getMetallicTexture?.()], ['NormalTexture', actor.getProperty().getNormalTexture?.()], ['AmbientOcclusionTexture', actor.getProperty().getAmbientOcclusionTexture?.()], ['EmissionTexture', actor.getProperty().getEmissionTexture?.()], ['EnvironmentTexture', renderer.getEnvironmentTexture?.()]];
|
|
877
|
-
textures.forEach(
|
|
878
|
-
let [name, tex] = _ref;
|
|
877
|
+
textures.forEach(([name, tex]) => {
|
|
879
878
|
if (!tex) return;
|
|
880
879
|
if (tex.getInputData() || tex.getJsImageData() || tex.getCanvas() || tex.getImageBitmap()) {
|
|
881
880
|
newTextures.push([name, tex]);
|
|
@@ -886,8 +885,7 @@ function vtkWebGPUCellArrayMapper(publicAPI, model) {
|
|
|
886
885
|
});
|
|
887
886
|
|
|
888
887
|
// Add textures to manager only if not present
|
|
889
|
-
newTextures.forEach(
|
|
890
|
-
let [textureName, srcTexture] = _ref2;
|
|
888
|
+
newTextures.forEach(([textureName, srcTexture]) => {
|
|
891
889
|
const newTex = model.device.getTextureManager().getTextureForVTKTexture(srcTexture, textureName);
|
|
892
890
|
if (!newTex.getReady()) return;
|
|
893
891
|
let found = false;
|
|
@@ -1015,8 +1013,7 @@ const DEFAULT_VALUES = {
|
|
|
1015
1013
|
|
|
1016
1014
|
// ----------------------------------------------------------------------------
|
|
1017
1015
|
|
|
1018
|
-
function extend(publicAPI, model) {
|
|
1019
|
-
let initiaLalues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1016
|
+
function extend(publicAPI, model, initiaLalues = {}) {
|
|
1020
1017
|
Object.assign(model, DEFAULT_VALUES, initiaLalues);
|
|
1021
1018
|
|
|
1022
1019
|
// Inheritance
|
|
@@ -41,8 +41,7 @@ const DEFAULT_VALUES = {};
|
|
|
41
41
|
|
|
42
42
|
// ----------------------------------------------------------------------------
|
|
43
43
|
|
|
44
|
-
function extend(publicAPI, model) {
|
|
45
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
46
45
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
47
46
|
|
|
48
47
|
// Inheritance
|
|
@@ -120,7 +120,7 @@ function vtkWebGPUDevice(publicAPI, model) {
|
|
|
120
120
|
|
|
121
121
|
// is the object already cached?
|
|
122
122
|
publicAPI.hasCachedObject = hash => model.objectCache.getValue(hash);
|
|
123
|
-
publicAPI.getCachedObject =
|
|
123
|
+
publicAPI.getCachedObject = (hash, creator, ...args) => {
|
|
124
124
|
if (!hash) {
|
|
125
125
|
vtkErrorMacro('attempt to cache an object without a hash');
|
|
126
126
|
return null;
|
|
@@ -129,9 +129,6 @@ function vtkWebGPUDevice(publicAPI, model) {
|
|
|
129
129
|
if (existingValue) {
|
|
130
130
|
return existingValue;
|
|
131
131
|
}
|
|
132
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
133
|
-
args[_key - 2] = arguments[_key];
|
|
134
|
-
}
|
|
135
132
|
const createdObject = creator(...args);
|
|
136
133
|
model.objectCache.setValue(hash, createdObject);
|
|
137
134
|
return createdObject;
|
|
@@ -151,8 +148,7 @@ const DEFAULT_VALUES = {
|
|
|
151
148
|
};
|
|
152
149
|
|
|
153
150
|
// ----------------------------------------------------------------------------
|
|
154
|
-
function extend(publicAPI, model) {
|
|
155
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
151
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
156
152
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
157
153
|
|
|
158
154
|
// Build VTK API
|
|
@@ -42,8 +42,7 @@ function vtkForwardPass(publicAPI, model) {
|
|
|
42
42
|
// if both volumes and opaque geometry are present
|
|
43
43
|
// it will mix the two together by capturing a zbuffer
|
|
44
44
|
// first
|
|
45
|
-
publicAPI.traverse =
|
|
46
|
-
let parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
45
|
+
publicAPI.traverse = (viewNode, parent = null) => {
|
|
47
46
|
if (model.deleted) {
|
|
48
47
|
return;
|
|
49
48
|
}
|
|
@@ -189,8 +188,7 @@ const DEFAULT_VALUES = {
|
|
|
189
188
|
|
|
190
189
|
// ----------------------------------------------------------------------------
|
|
191
190
|
|
|
192
|
-
function extend(publicAPI, model) {
|
|
193
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
191
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
194
192
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
195
193
|
|
|
196
194
|
// Build VTK API
|
|
@@ -33,8 +33,7 @@ const DEFAULT_VALUES = {};
|
|
|
33
33
|
|
|
34
34
|
// ----------------------------------------------------------------------------
|
|
35
35
|
|
|
36
|
-
function extend(publicAPI, model) {
|
|
37
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
36
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
38
37
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
39
38
|
|
|
40
39
|
// Inheritance
|
|
@@ -71,8 +71,7 @@ function vtkWebGPUGlyph3DCellArrayMapper(publicAPI, model) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
// ----------------------------------------------------------------------------
|
|
74
|
-
function caExtend(publicAPI, model) {
|
|
75
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
74
|
+
function caExtend(publicAPI, model, initialValues = {}) {
|
|
76
75
|
Object.assign(model, {}, initialValues);
|
|
77
76
|
|
|
78
77
|
// Inheritance
|
|
@@ -152,8 +151,7 @@ const DEFAULT_VALUES = {};
|
|
|
152
151
|
|
|
153
152
|
// ----------------------------------------------------------------------------
|
|
154
153
|
|
|
155
|
-
function extend(publicAPI, model) {
|
|
156
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
154
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
157
155
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
158
156
|
|
|
159
157
|
// Inheritance
|
|
@@ -114,8 +114,7 @@ const DEFAULT_VALUES = {
|
|
|
114
114
|
|
|
115
115
|
// ----------------------------------------------------------------------------
|
|
116
116
|
|
|
117
|
-
function extend(publicAPI, model) {
|
|
118
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
117
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
119
118
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
120
119
|
|
|
121
120
|
// Build VTK API
|
|
@@ -320,8 +320,7 @@ const DEFAULT_VALUES = {
|
|
|
320
320
|
|
|
321
321
|
// ----------------------------------------------------------------------------
|
|
322
322
|
|
|
323
|
-
function extend(publicAPI, model) {
|
|
324
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
323
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
325
324
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
326
325
|
|
|
327
326
|
// Build VTK API
|
|
@@ -353,8 +353,7 @@ const DEFAULT_VALUES = {
|
|
|
353
353
|
|
|
354
354
|
// ----------------------------------------------------------------------------
|
|
355
355
|
|
|
356
|
-
function extend(publicAPI, model) {
|
|
357
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
356
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
358
357
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
359
358
|
|
|
360
359
|
// Inheritance
|
|
@@ -117,8 +117,7 @@ const DEFAULT_VALUES = {
|
|
|
117
117
|
|
|
118
118
|
// ----------------------------------------------------------------------------
|
|
119
119
|
|
|
120
|
-
function extend(publicAPI, model) {
|
|
121
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
120
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
122
121
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
123
122
|
|
|
124
123
|
// Inheritance
|
|
@@ -338,8 +338,7 @@ const DEFAULT_VALUES = {
|
|
|
338
338
|
|
|
339
339
|
// ----------------------------------------------------------------------------
|
|
340
340
|
|
|
341
|
-
function extend(publicAPI, model) {
|
|
342
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
341
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
343
342
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
344
343
|
|
|
345
344
|
// Inheritance
|
|
@@ -80,8 +80,7 @@ const DEFAULT_VALUES = {
|
|
|
80
80
|
|
|
81
81
|
// ----------------------------------------------------------------------------
|
|
82
82
|
|
|
83
|
-
function extend(publicAPI, model) {
|
|
84
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
83
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
85
84
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
86
85
|
|
|
87
86
|
// Build VTK API
|
|
@@ -230,8 +230,7 @@ const DEFAULT_VALUES = {
|
|
|
230
230
|
|
|
231
231
|
// ----------------------------------------------------------------------------
|
|
232
232
|
|
|
233
|
-
function extend(publicAPI, model) {
|
|
234
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
233
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
235
234
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
236
235
|
|
|
237
236
|
// Build VTK API
|
|
@@ -80,8 +80,7 @@ const DEFAULT_VALUES = {
|
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
// ----------------------------------------------------------------------------
|
|
83
|
-
function extend(publicAPI, model) {
|
|
84
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
83
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
85
84
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
86
85
|
|
|
87
86
|
// Build VTK API
|
|
@@ -28,8 +28,7 @@ const DEFAULT_VALUES = {};
|
|
|
28
28
|
|
|
29
29
|
// ----------------------------------------------------------------------------
|
|
30
30
|
|
|
31
|
-
function extend(publicAPI, model) {
|
|
32
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
31
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
33
32
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
34
33
|
|
|
35
34
|
// Inheritance
|
|
@@ -109,8 +109,7 @@ const DEFAULT_VALUES = {
|
|
|
109
109
|
|
|
110
110
|
// ----------------------------------------------------------------------------
|
|
111
111
|
|
|
112
|
-
function extend(publicAPI, model) {
|
|
113
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
112
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
114
113
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
115
114
|
|
|
116
115
|
// Inheritance
|
|
@@ -70,8 +70,7 @@ function defaultValues(initialValues) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// ----------------------------------------------------------------------------
|
|
73
|
-
function extend(publicAPI, model) {
|
|
74
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
73
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
75
74
|
Object.assign(model, defaultValues(initialValues));
|
|
76
75
|
|
|
77
76
|
// Inheritance
|
|
@@ -121,9 +121,7 @@ function vtkWebGPURenderEncoder(publicAPI, model) {
|
|
|
121
121
|
|
|
122
122
|
// simple forwarders
|
|
123
123
|
for (let i = 0; i < forwarded.length; i++) {
|
|
124
|
-
publicAPI[forwarded[i]] =
|
|
125
|
-
return model.handle[forwarded[i]](...arguments);
|
|
126
|
-
};
|
|
124
|
+
publicAPI[forwarded[i]] = (...args) => model.handle[forwarded[i]](...args);
|
|
127
125
|
}
|
|
128
126
|
}
|
|
129
127
|
|
|
@@ -142,8 +140,7 @@ const DEFAULT_VALUES = {
|
|
|
142
140
|
};
|
|
143
141
|
|
|
144
142
|
// ----------------------------------------------------------------------------
|
|
145
|
-
function extend(publicAPI, model) {
|
|
146
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
143
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
147
144
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
148
145
|
|
|
149
146
|
// Build VTK API
|
|
@@ -219,8 +219,7 @@ function vtkWebGPURenderWindow(publicAPI, model) {
|
|
|
219
219
|
model.el.removeChild(model.bgImage);
|
|
220
220
|
}
|
|
221
221
|
};
|
|
222
|
-
async function getCanvasDataURL() {
|
|
223
|
-
let format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : model.imageFormat;
|
|
222
|
+
async function getCanvasDataURL(format = model.imageFormat) {
|
|
224
223
|
// Copy current canvas to not modify the original
|
|
225
224
|
const temporaryCanvas = document.createElement('canvas');
|
|
226
225
|
const temporaryContext = temporaryCanvas.getContext('2d');
|
|
@@ -257,13 +256,11 @@ function vtkWebGPURenderWindow(publicAPI, model) {
|
|
|
257
256
|
temporaryCanvas.remove();
|
|
258
257
|
publicAPI.invokeImageReady(screenshot);
|
|
259
258
|
}
|
|
260
|
-
publicAPI.captureNextImage =
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
scale = 1
|
|
266
|
-
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
259
|
+
publicAPI.captureNextImage = (format = 'image/png', {
|
|
260
|
+
resetCamera = false,
|
|
261
|
+
size = null,
|
|
262
|
+
scale = 1
|
|
263
|
+
} = {}) => {
|
|
267
264
|
if (model.deleted) {
|
|
268
265
|
return null;
|
|
269
266
|
}
|
|
@@ -287,13 +284,10 @@ function vtkWebGPURenderWindow(publicAPI, model) {
|
|
|
287
284
|
|
|
288
285
|
// restore the saved camera parameters, if applicable
|
|
289
286
|
if (model._screenshot.cameras) {
|
|
290
|
-
model._screenshot.cameras.forEach(
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
} = _ref;
|
|
295
|
-
return restoreParamsFn(arg);
|
|
296
|
-
});
|
|
287
|
+
model._screenshot.cameras.forEach(({
|
|
288
|
+
restoreParamsFn,
|
|
289
|
+
arg
|
|
290
|
+
}) => restoreParamsFn(arg));
|
|
297
291
|
}
|
|
298
292
|
|
|
299
293
|
// Trigger a render at the original size
|
|
@@ -344,13 +338,10 @@ function vtkWebGPURenderWindow(publicAPI, model) {
|
|
|
344
338
|
// Perform the resetCamera() on each renderer only after capturing
|
|
345
339
|
// the params from all active cameras, in case there happen to be
|
|
346
340
|
// linked cameras among the renderers.
|
|
347
|
-
model._screenshot.cameras.forEach(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
} = _ref2;
|
|
352
|
-
return resetCameraFn(resetCameraArgs);
|
|
353
|
-
});
|
|
341
|
+
model._screenshot.cameras.forEach(({
|
|
342
|
+
resetCameraFn,
|
|
343
|
+
resetCameraArgs
|
|
344
|
+
}) => resetCameraFn(resetCameraArgs));
|
|
354
345
|
}
|
|
355
346
|
|
|
356
347
|
// Trigger a render at the custom size
|
|
@@ -529,8 +520,7 @@ const DEFAULT_VALUES = {
|
|
|
529
520
|
|
|
530
521
|
// ----------------------------------------------------------------------------
|
|
531
522
|
|
|
532
|
-
function extend(publicAPI, model) {
|
|
533
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
523
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
534
524
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
535
525
|
|
|
536
526
|
// Create internal instances
|
|
@@ -453,8 +453,7 @@ const DEFAULT_VALUES = {
|
|
|
453
453
|
|
|
454
454
|
// ----------------------------------------------------------------------------
|
|
455
455
|
|
|
456
|
-
function extend(publicAPI, model) {
|
|
457
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
456
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
458
457
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
459
458
|
|
|
460
459
|
// Inheritance
|
|
@@ -9,8 +9,7 @@ import { m as macro } from '../../macros2.js';
|
|
|
9
9
|
function vtkWebGPUSampler(publicAPI, model) {
|
|
10
10
|
// Set our className
|
|
11
11
|
model.classHierarchy.push('vtkWebGPUSampler');
|
|
12
|
-
publicAPI.create =
|
|
13
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12
|
+
publicAPI.create = (device, options = {}) => {
|
|
14
13
|
model.device = device;
|
|
15
14
|
model.options.addressModeU = options.addressModeU ? options.addressModeU : 'clamp-to-edge';
|
|
16
15
|
model.options.addressModeV = options.addressModeV ? options.addressModeV : 'clamp-to-edge';
|
|
@@ -47,8 +46,7 @@ const DEFAULT_VALUES = {
|
|
|
47
46
|
|
|
48
47
|
// ----------------------------------------------------------------------------
|
|
49
48
|
|
|
50
|
-
function extend(publicAPI, model) {
|
|
51
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
49
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
52
50
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
53
51
|
|
|
54
52
|
// Object methods
|
|
@@ -41,8 +41,7 @@ const DEFAULT_VALUES = {};
|
|
|
41
41
|
|
|
42
42
|
// ----------------------------------------------------------------------------
|
|
43
43
|
|
|
44
|
-
function extend(publicAPI, model) {
|
|
45
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
46
45
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
47
46
|
|
|
48
47
|
// Inheritance
|
|
@@ -4,8 +4,7 @@ import vtkWebGPUShaderModule from './ShaderModule.js';
|
|
|
4
4
|
// perform in place string substitutions, indicate if a substitution was done
|
|
5
5
|
// this is useful for building up shader strings which typically involve
|
|
6
6
|
// lots of string substitutions. Return true if a substitution was done.
|
|
7
|
-
function substitute(source, search, replace) {
|
|
8
|
-
let all = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
7
|
+
function substitute(source, search, replace, all = true) {
|
|
9
8
|
const replaceStr = Array.isArray(replace) ? replace.join('\n') : replace;
|
|
10
9
|
let replaced = false;
|
|
11
10
|
if (source.search(search) !== -1) {
|
|
@@ -63,8 +62,7 @@ const DEFAULT_VALUES = {
|
|
|
63
62
|
|
|
64
63
|
// ----------------------------------------------------------------------------
|
|
65
64
|
|
|
66
|
-
function extend(publicAPI, model) {
|
|
67
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
65
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
68
66
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
69
67
|
|
|
70
68
|
// Internal objects
|
|
@@ -11,8 +11,7 @@ function vtkWebGPUShaderDescription(publicAPI, model) {
|
|
|
11
11
|
// Set our className
|
|
12
12
|
model.classHierarchy.push('vtkWebGPUShaderDescription');
|
|
13
13
|
publicAPI.hasOutput = name => model.outputNames.includes(name);
|
|
14
|
-
publicAPI.addOutput =
|
|
15
|
-
let interpolation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
14
|
+
publicAPI.addOutput = (type, name, interpolation = undefined) => {
|
|
16
15
|
model.outputTypes.push(type);
|
|
17
16
|
model.outputNames.push(name);
|
|
18
17
|
model.outputInterpolations.push(interpolation);
|
|
@@ -97,8 +96,7 @@ const DEFAULT_VALUES = {
|
|
|
97
96
|
|
|
98
97
|
// ----------------------------------------------------------------------------
|
|
99
98
|
|
|
100
|
-
function extend(publicAPI, model) {
|
|
101
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
99
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
102
100
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
103
101
|
model.outputNames = [];
|
|
104
102
|
model.outputTypes = [];
|
|
@@ -31,8 +31,7 @@ const DEFAULT_VALUES = {
|
|
|
31
31
|
|
|
32
32
|
// ----------------------------------------------------------------------------
|
|
33
33
|
|
|
34
|
-
function extend(publicAPI, model) {
|
|
35
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
34
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
36
35
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
37
36
|
|
|
38
37
|
// Build VTK API
|
|
@@ -133,7 +133,6 @@ function vtkWebGPUSimpleMapper(publicAPI, model) {
|
|
|
133
133
|
// console.log(vDesc.getCode());
|
|
134
134
|
// console.log(fDesc.getCode());
|
|
135
135
|
};
|
|
136
|
-
|
|
137
136
|
publicAPI.replaceShaderIOStructs = (hash, pipeline, vertexInput) => {
|
|
138
137
|
const vDesc = pipeline.getShaderDescription('vertex');
|
|
139
138
|
vDesc.replaceShaderCode(null, vertexInput);
|
|
@@ -316,8 +315,7 @@ const DEFAULT_VALUES = {
|
|
|
316
315
|
|
|
317
316
|
// ----------------------------------------------------------------------------
|
|
318
317
|
|
|
319
|
-
function extend(publicAPI, model) {
|
|
320
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
318
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
321
319
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
322
320
|
|
|
323
321
|
// Inheritance
|
|
@@ -280,8 +280,7 @@ const DEFAULT_VALUES = {};
|
|
|
280
280
|
|
|
281
281
|
// ----------------------------------------------------------------------------
|
|
282
282
|
|
|
283
|
-
function extend(publicAPI, model) {
|
|
284
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
283
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
285
284
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
286
285
|
|
|
287
286
|
// Inheritance
|
|
@@ -395,8 +395,7 @@ const DEFAULT_VALUES = {};
|
|
|
395
395
|
|
|
396
396
|
// ----------------------------------------------------------------------------
|
|
397
397
|
|
|
398
|
-
function extend(publicAPI, model) {
|
|
399
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
398
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
400
399
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
401
400
|
|
|
402
401
|
// Inheritance
|
|
@@ -190,8 +190,7 @@ const DEFAULT_VALUES = {
|
|
|
190
190
|
|
|
191
191
|
// ----------------------------------------------------------------------------
|
|
192
192
|
|
|
193
|
-
function extend(publicAPI, model) {
|
|
194
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
193
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
195
194
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
196
195
|
|
|
197
196
|
// Build VTK API
|
|
@@ -51,7 +51,6 @@ function vtkWebGPUTexture(publicAPI, model) {
|
|
|
51
51
|
/* eslint-enable no-undef */
|
|
52
52
|
/* eslint-enable no-bitwise */
|
|
53
53
|
};
|
|
54
|
-
|
|
55
54
|
publicAPI.writeImageData = req => {
|
|
56
55
|
let nativeArray = [];
|
|
57
56
|
const _copyImageToTexture = source => {
|
|
@@ -223,8 +222,7 @@ function vtkWebGPUTexture(publicAPI, model) {
|
|
|
223
222
|
});
|
|
224
223
|
}
|
|
225
224
|
};
|
|
226
|
-
publicAPI.resize =
|
|
227
|
-
let depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
|
|
225
|
+
publicAPI.resize = (width, height, depth = 1) => {
|
|
228
226
|
if (width !== model.width || height !== model.height || depth !== model.depth) {
|
|
229
227
|
model.width = width;
|
|
230
228
|
model.height = height;
|
|
@@ -237,8 +235,7 @@ function vtkWebGPUTexture(publicAPI, model) {
|
|
|
237
235
|
});
|
|
238
236
|
}
|
|
239
237
|
};
|
|
240
|
-
publicAPI.createView =
|
|
241
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
238
|
+
publicAPI.createView = (label, options = {}) => {
|
|
242
239
|
// if options is missing values try to add them in
|
|
243
240
|
if (!options.dimension) {
|
|
244
241
|
options.dimension = model.depth === 1 ? '2d' : '3d';
|
|
@@ -265,8 +262,7 @@ const DEFAULT_VALUES = {
|
|
|
265
262
|
|
|
266
263
|
// ----------------------------------------------------------------------------
|
|
267
264
|
|
|
268
|
-
function extend(publicAPI, model) {
|
|
269
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
265
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
270
266
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
271
267
|
|
|
272
268
|
// Object methods
|
|
@@ -91,7 +91,6 @@ function vtkWebGPUTextureManager(publicAPI, model) {
|
|
|
91
91
|
/* eslint-enable no-undef */
|
|
92
92
|
/* eslint-enable no-bitwise */
|
|
93
93
|
}
|
|
94
|
-
|
|
95
94
|
if (req.imageBitmap) {
|
|
96
95
|
req.width = req.imageBitmap.width;
|
|
97
96
|
req.height = req.imageBitmap.height;
|
|
@@ -104,7 +103,6 @@ function vtkWebGPUTextureManager(publicAPI, model) {
|
|
|
104
103
|
/* eslint-enable no-undef */
|
|
105
104
|
/* eslint-enable no-bitwise */
|
|
106
105
|
}
|
|
107
|
-
|
|
108
106
|
if (req.canvas) {
|
|
109
107
|
req.width = req.canvas.width;
|
|
110
108
|
req.height = req.canvas.height;
|
|
@@ -160,8 +158,7 @@ function vtkWebGPUTextureManager(publicAPI, model) {
|
|
|
160
158
|
treq.hash = treq.time + treq.format + treq.mipLevel;
|
|
161
159
|
return model.device.getTextureManager().getTexture(treq);
|
|
162
160
|
};
|
|
163
|
-
publicAPI.getTextureForVTKTexture =
|
|
164
|
-
let label = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
161
|
+
publicAPI.getTextureForVTKTexture = (srcTexture, label = undefined) => {
|
|
165
162
|
const treq = {
|
|
166
163
|
time: srcTexture.getMTime(),
|
|
167
164
|
label
|
|
@@ -196,8 +193,7 @@ const DEFAULT_VALUES = {
|
|
|
196
193
|
|
|
197
194
|
// ----------------------------------------------------------------------------
|
|
198
195
|
|
|
199
|
-
function extend(publicAPI, model) {
|
|
200
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
196
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
201
197
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
202
198
|
|
|
203
199
|
// Object methods
|
|
@@ -94,8 +94,7 @@ const DEFAULT_VALUES = {
|
|
|
94
94
|
|
|
95
95
|
// ----------------------------------------------------------------------------
|
|
96
96
|
|
|
97
|
-
function extend(publicAPI, model) {
|
|
98
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
97
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
99
98
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
100
99
|
|
|
101
100
|
// Object methods
|
|
@@ -110,7 +109,6 @@ function extend(publicAPI, model) {
|
|
|
110
109
|
// multisampled: false,
|
|
111
110
|
}
|
|
112
111
|
};
|
|
113
|
-
|
|
114
112
|
model.bindGroupTime = {};
|
|
115
113
|
macro.obj(model.bindGroupTime, {
|
|
116
114
|
mtime: 0
|
|
@@ -291,8 +291,7 @@ const DEFAULT_VALUES = {
|
|
|
291
291
|
|
|
292
292
|
// ----------------------------------------------------------------------------
|
|
293
293
|
|
|
294
|
-
function extend(publicAPI, model) {
|
|
295
|
-
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
294
|
+
function extend(publicAPI, model, initialValues = {}) {
|
|
296
295
|
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
297
296
|
|
|
298
297
|
// Build VTK API
|