@kitware/vtk.js 28.10.1 → 28.11.0
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/Common/Core/Base64.js +53 -82
- package/Common/Core/CellArray.js +52 -60
- package/Common/Core/ClassHierarchy.js +8 -36
- package/Common/Core/DataArray/Constants.js +6 -6
- package/Common/Core/DataArray.js +185 -270
- package/Common/Core/Endian.js +14 -17
- package/Common/Core/HalfFloat.js +17 -34
- package/Common/Core/ImageHelper.js +17 -25
- package/Common/Core/LookupTable.js +131 -144
- package/Common/Core/Math/Constants.js +8 -8
- package/Common/Core/Math/index.js +778 -903
- package/Common/Core/Math.d.ts +14 -0
- package/Common/Core/Math.js +2 -4
- package/Common/Core/MatrixBuilder.js +99 -151
- package/Common/Core/Points.js +43 -43
- package/Common/Core/PriorityQueue.js +30 -28
- package/Common/Core/ProgressHandler.js +31 -32
- package/Common/Core/ScalarsToColors/Constants.js +4 -4
- package/Common/Core/ScalarsToColors.js +196 -253
- package/Common/Core/StringArray.js +48 -73
- package/Common/Core/URLExtract.js +10 -29
- package/Common/Core/VariantArray.js +48 -73
- package/Common/Core.js +11 -11
- package/Common/DataModel/AbstractPointLocator.js +19 -17
- package/Common/DataModel/BoundingBox.js +322 -490
- package/Common/DataModel/Box.js +46 -63
- package/Common/DataModel/CardinalSpline1D.js +92 -102
- package/Common/DataModel/Cell.js +41 -61
- package/Common/DataModel/CellLinks.js +91 -127
- package/Common/DataModel/CellTypes/Constants.js +7 -6
- package/Common/DataModel/CellTypes.js +55 -74
- package/Common/DataModel/Collection.js +45 -61
- package/Common/DataModel/Cone.js +28 -20
- package/Common/DataModel/Cylinder.js +41 -35
- package/Common/DataModel/DataSet/Constants.js +11 -5
- package/Common/DataModel/DataSet.js +37 -25
- package/Common/DataModel/DataSetAttributes/Constants.js +18 -18
- package/Common/DataModel/DataSetAttributes/FieldData.js +103 -194
- package/Common/DataModel/DataSetAttributes.js +96 -138
- package/Common/DataModel/EdgeLocator.js +45 -70
- package/Common/DataModel/ITKHelper.js +67 -137
- package/Common/DataModel/ImageData.js +115 -172
- package/Common/DataModel/ImplicitBoolean/Constants.js +2 -2
- package/Common/DataModel/ImplicitBoolean.js +66 -96
- package/Common/DataModel/IncrementalOctreeNode.js +201 -231
- package/Common/DataModel/IncrementalOctreePointLocator.js +160 -198
- package/Common/DataModel/KochanekSpline1D.js +78 -81
- package/Common/DataModel/Line/Constants.js +2 -2
- package/Common/DataModel/Line.js +82 -105
- package/Common/DataModel/Locator.js +17 -10
- package/Common/DataModel/Molecule.js +26 -17
- package/Common/DataModel/PiecewiseFunction.js +218 -239
- package/Common/DataModel/Plane.js +90 -113
- package/Common/DataModel/PointSet.js +30 -26
- package/Common/DataModel/PolyData/Constants.js +2 -2
- package/Common/DataModel/PolyData.js +95 -120
- package/Common/DataModel/PolyLine.js +44 -61
- package/Common/DataModel/Polygon/Constants.js +4 -4
- package/Common/DataModel/Polygon.js +128 -169
- package/Common/DataModel/Quad/Constants.js +2 -2
- package/Common/DataModel/Quad.js +61 -100
- package/Common/DataModel/SelectionNode/Constants.js +5 -4
- package/Common/DataModel/SelectionNode.js +25 -21
- package/Common/DataModel/Sphere.js +40 -35
- package/Common/DataModel/Spline1D/Constants.js +3 -2
- package/Common/DataModel/Spline1D.js +34 -18
- package/Common/DataModel/Spline3D/Constants.js +2 -2
- package/Common/DataModel/Spline3D.js +46 -41
- package/Common/DataModel/StructuredData/Constants.js +2 -2
- package/Common/DataModel/StructuredData.js +9 -20
- package/Common/DataModel/Triangle.js +207 -250
- package/Common/DataModel.js +19 -19
- package/Common/System/MobileVR.js +56 -61
- package/Common/System/TimerLog.js +1 -1
- package/Common/System.js +2 -2
- package/Common/Transform/LandmarkTransform/Constants.js +2 -2
- package/Common/Transform/LandmarkTransform.js +133 -117
- package/Common/Transform/Transform.js +42 -57
- package/Common/Transform.js +2 -2
- package/Common/index.js +4 -4
- package/Filters/Core/Cutter.js +134 -146
- package/Filters/Core/PolyDataNormals.js +44 -50
- package/Filters/Core.js +2 -2
- package/Filters/Cornerstone/ImageDataToCornerstoneImage.js +45 -33
- package/Filters/Cornerstone.js +1 -1
- package/Filters/General/AppendPolyData.js +84 -100
- package/Filters/General/Calculator.js +95 -163
- package/Filters/General/ClipClosedSurface/Constants.js +2 -2
- package/Filters/General/ClipClosedSurface.js +341 -416
- package/Filters/General/ClosedPolyLineToSurfaceFilter.js +141 -156
- package/Filters/General/ContourTriangulator/Constants.js +2 -2
- package/Filters/General/ContourTriangulator/helper.js +684 -812
- package/Filters/General/ContourTriangulator.js +92 -89
- package/Filters/General/ImageCropFilter.js +77 -78
- package/Filters/General/ImageDataOutlineFilter.js +42 -36
- package/Filters/General/ImageMarchingCubes/caseTable.js +9 -521
- package/Filters/General/ImageMarchingCubes.js +99 -112
- package/Filters/General/ImageMarchingSquares/caseTable.js +9 -41
- package/Filters/General/ImageMarchingSquares.js +93 -118
- package/Filters/General/ImageOutlineFilter.js +53 -54
- package/Filters/General/ImageSliceFilter.js +39 -30
- package/Filters/General/ImageStreamline.js +107 -124
- package/Filters/General/LineFilter.js +26 -15
- package/Filters/General/MoleculeToRepresentation.js +136 -149
- package/Filters/General/OBBTree/OBBNode.js +36 -34
- package/Filters/General/OBBTree/helper.js +19 -24
- package/Filters/General/OBBTree.js +396 -488
- package/Filters/General/OutlineFilter.js +52 -34
- package/Filters/General/PaintFilter/PaintFilter.worker.js +93 -130
- package/Filters/General/PaintFilter.js +150 -162
- package/Filters/General/ScalarToRGBA.js +38 -33
- package/Filters/General/TriangleFilter.js +65 -62
- package/Filters/General/TubeFilter/Constants.js +4 -4
- package/Filters/General/TubeFilter.js +376 -496
- package/Filters/General/WarpScalar.js +58 -60
- package/Filters/General/WindowedSincPolyDataFilter.js +258 -330
- package/Filters/General.js +21 -21
- package/Filters/Sources/Arrow2DSource/Constants.js +2 -2
- package/Filters/Sources/Arrow2DSource.js +56 -56
- package/Filters/Sources/ArrowSource.js +39 -29
- package/Filters/Sources/CircleSource.js +43 -43
- package/Filters/Sources/ConcentricCylinderSource.js +151 -174
- package/Filters/Sources/ConeSource.js +51 -42
- package/Filters/Sources/CubeSource.js +75 -96
- package/Filters/Sources/Cursor3D.js +94 -109
- package/Filters/Sources/CylinderSource.js +90 -90
- package/Filters/Sources/ImageGridSource.js +43 -43
- package/Filters/Sources/LineSource.js +49 -39
- package/Filters/Sources/PlaneSource.js +97 -104
- package/Filters/Sources/PointSource.js +46 -37
- package/Filters/Sources/RTAnalyticSource.js +50 -48
- package/Filters/Sources/SLICSource.js +63 -73
- package/Filters/Sources/SphereSource.js +88 -78
- package/Filters/Sources/ViewFinderSource.js +26 -23
- package/Filters/Sources.js +14 -14
- package/Filters/Texture/TextureMapToPlane.js +95 -97
- package/Filters/Texture/TextureMapToSphere.js +46 -54
- package/Filters/Texture.js +2 -2
- package/Filters/index.js +5 -5
- package/IO/Core/BinaryHelper.js +12 -18
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +43 -59
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +76 -113
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +62 -112
- package/IO/Core/DataAccessHelper/LiteHttpDataAccessHelper.js +76 -113
- package/IO/Core/DataAccessHelper.js +6 -6
- package/IO/Core/HttpDataSetReader.js +136 -139
- package/IO/Core/HttpDataSetSeriesReader.js +64 -75
- package/IO/Core/HttpSceneLoader.js +130 -179
- package/IO/Core/ImageStream/DefaultProtocol.js +29 -43
- package/IO/Core/ImageStream/ViewStream.js +100 -103
- package/IO/Core/ImageStream.js +62 -54
- package/IO/Core/ResourceLoader.js +10 -9
- package/IO/Core/Serializer/ArraySerializer.js +40 -40
- package/IO/Core/Serializer/FieldDataSerializer.js +18 -28
- package/IO/Core/Serializer/ImageDataSerializer.js +22 -23
- package/IO/Core/Serializer/PolyDataSerializer.js +17 -21
- package/IO/Core/Serializer.js +6 -13
- package/IO/Core/WSLinkClient.js +90 -76
- package/IO/Core/ZipMultiDataSetReader.js +46 -44
- package/IO/Core/ZipMultiDataSetWriter.js +43 -34
- package/IO/Core.js +7 -7
- package/IO/Geometry/DracoReader.js +118 -121
- package/IO/Geometry/PLYReader.js +163 -223
- package/IO/Geometry/PLYWriter/Constants.js +5 -5
- package/IO/Geometry/PLYWriter.js +139 -154
- package/IO/Geometry/STLReader.js +123 -146
- package/IO/Geometry/STLWriter/Constants.js +2 -2
- package/IO/Geometry/STLWriter.js +83 -82
- package/IO/Geometry.js +5 -5
- package/IO/Legacy/LegacyAsciiParser.js +78 -139
- package/IO/Legacy/PolyDataReader.js +48 -36
- package/IO/Legacy.js +2 -2
- package/IO/Misc/ElevationReader.js +67 -60
- package/IO/Misc/HttpDataSetLODsLoader.js +41 -38
- package/IO/Misc/ITKImageReader.js +58 -45
- package/IO/Misc/ITKPolyDataReader.js +50 -38
- package/IO/Misc/JSONNucleoReader.js +49 -42
- package/IO/Misc/JSONReader.js +38 -33
- package/IO/Misc/MTLReader.js +74 -119
- package/IO/Misc/OBJReader.js +153 -206
- package/IO/Misc/PDBReader.js +70 -68
- package/IO/Misc/SkyboxReader.js +77 -82
- package/IO/Misc.js +9 -9
- package/IO/XML/XMLImageDataReader.js +36 -38
- package/IO/XML/XMLImageDataWriter.js +28 -21
- package/IO/XML/XMLPolyDataReader.js +49 -46
- package/IO/XML/XMLPolyDataWriter.js +43 -42
- package/IO/XML/XMLReader.js +262 -304
- package/IO/XML/XMLWriter/Constants.js +3 -3
- package/IO/XML/XMLWriter.js +70 -84
- package/IO/XML.js +6 -6
- package/IO/index.js +5 -5
- package/Imaging/Core/AbstractImageInterpolator/Constants.js +4 -4
- package/Imaging/Core/AbstractImageInterpolator/InterpolationInfo.js +30 -27
- package/Imaging/Core/AbstractImageInterpolator.js +74 -87
- package/Imaging/Core/ImageInterpolator.js +201 -252
- package/Imaging/Core/ImagePointDataIterator.js +96 -122
- package/Imaging/Core/ImageReslice/Constants.js +2 -2
- package/Imaging/Core/ImageReslice.js +327 -464
- package/Imaging/Core.js +4 -4
- package/Imaging/Hybrid/SampleFunction.js +58 -51
- package/Imaging/Hybrid.js +1 -1
- package/Imaging/index.js +2 -2
- package/Interaction/Animations/TimeStepBasedAnimationHandler.js +39 -54
- package/Interaction/Manipulators/CompositeCameraManipulator.js +22 -13
- package/Interaction/Manipulators/CompositeGestureManipulator.js +31 -43
- package/Interaction/Manipulators/CompositeKeyboardManipulator.js +15 -11
- package/Interaction/Manipulators/CompositeMouseManipulator.js +27 -33
- package/Interaction/Manipulators/CompositeVRManipulator.js +22 -15
- package/Interaction/Manipulators/GestureCameraManipulator.js +54 -36
- package/Interaction/Manipulators/KeyboardCameraManipulator.js +95 -97
- package/Interaction/Manipulators/MouseBoxSelectorManipulator.js +70 -89
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +67 -54
- package/Interaction/Manipulators/MouseCameraSliceManipulator.js +40 -38
- package/Interaction/Manipulators/MouseCameraTrackballFirstPersonManipulator.js +83 -68
- package/Interaction/Manipulators/MouseCameraTrackballMultiRotateManipulator.js +32 -28
- package/Interaction/Manipulators/MouseCameraTrackballPanManipulator.js +47 -40
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +55 -43
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +56 -46
- package/Interaction/Manipulators/MouseCameraTrackballZoomManipulator.js +41 -46
- package/Interaction/Manipulators/MouseCameraTrackballZoomToMouseManipulator.js +29 -27
- package/Interaction/Manipulators/MouseCameraUnicamManipulator.js +123 -146
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +144 -166
- package/Interaction/Manipulators/MouseRangeManipulator.js +127 -132
- package/Interaction/Manipulators/VRButtonPanManipulator.js +33 -23
- package/Interaction/Manipulators.js +21 -21
- package/Interaction/Misc/DeviceOrientationToCamera.js +25 -47
- package/Interaction/Misc.js +1 -1
- package/Interaction/Style/InteractorStyleImage.js +101 -121
- package/Interaction/Style/InteractorStyleMPRSlice.js +111 -128
- package/Interaction/Style/InteractorStyleManipulator/Presets.js +9 -17
- package/Interaction/Style/InteractorStyleManipulator.js +254 -329
- package/Interaction/Style/InteractorStyleRemoteMouse.js +195 -180
- package/Interaction/Style/InteractorStyleTrackballCamera.js +154 -157
- package/Interaction/Style/InteractorStyleUnicam.js +30 -38
- package/Interaction/Style.js +5 -5
- package/Interaction/UI/CornerAnnotation/CornerAnnotation.module.css.js +1 -1
- package/Interaction/UI/CornerAnnotation.js +65 -48
- package/Interaction/UI/FPSMonitor.js +104 -105
- package/Interaction/UI/Icons.js +1 -1
- package/Interaction/UI/Slider/Constants.js +2 -2
- package/Interaction/UI/Slider.js +78 -95
- package/Interaction/UI/VolumeController.js +104 -97
- package/Interaction/UI.js +5 -5
- package/Interaction/Widgets/OrientationMarkerWidget/Constants.js +2 -2
- package/Interaction/Widgets/OrientationMarkerWidget.js +90 -135
- package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +0 -3
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +381 -498
- package/Interaction/Widgets.js +2 -2
- package/Interaction/index.js +5 -5
- package/Proxy/Animation/AbstractAnimationProxy.js +22 -15
- package/Proxy/Animation/AnimationProxyManager.js +43 -51
- package/Proxy/Animation/TimeStepBasedAnimationHandlerProxy.js +26 -19
- package/Proxy/Core/AbstractRepresentationProxy.js +97 -151
- package/Proxy/Core/LookupTableProxy/Constants.js +4 -4
- package/Proxy/Core/LookupTableProxy.js +49 -52
- package/Proxy/Core/PiecewiseFunctionProxy/Constants.js +4 -4
- package/Proxy/Core/PiecewiseFunctionProxy.js +63 -72
- package/Proxy/Core/ProxyManager/core.js +83 -106
- package/Proxy/Core/ProxyManager/properties.js +53 -76
- package/Proxy/Core/ProxyManager/state.js +100 -110
- package/Proxy/Core/ProxyManager/view.js +45 -55
- package/Proxy/Core/ProxyManager.js +16 -8
- package/Proxy/Core/SourceProxy.js +41 -38
- package/Proxy/Core/View2DProxy.js +143 -199
- package/Proxy/Core/ViewProxy.js +223 -269
- package/Proxy/Core.js +7 -7
- package/Proxy/Representations/GeometryRepresentationProxy.js +34 -20
- package/Proxy/Representations/GlyphRepresentationProxy.js +42 -41
- package/Proxy/Representations/MoleculeRepresentationProxy.js +32 -22
- package/Proxy/Representations/ResliceRepresentationProxy.js +48 -32
- package/Proxy/Representations/SkyboxRepresentationProxy.js +30 -29
- package/Proxy/Representations/SliceRepresentationProxy.js +93 -112
- package/Proxy/Representations/SlicedGeometryRepresentationProxy.js +46 -42
- package/Proxy/Representations/VolumeRepresentationProxy.js +108 -133
- package/Proxy/Representations.js +7 -7
- package/Proxy/index.js +2 -2
- package/Rendering/Core/AbstractImageMapper/helper.js +44 -49
- package/Rendering/Core/AbstractImageMapper.js +18 -19
- package/Rendering/Core/AbstractMapper.js +39 -55
- package/Rendering/Core/AbstractMapper3D.js +26 -31
- package/Rendering/Core/AbstractPicker.js +25 -21
- package/Rendering/Core/Actor.js +71 -93
- package/Rendering/Core/Actor2D.js +64 -78
- package/Rendering/Core/AnnotatedCubeActor/Presets.js +5 -11
- package/Rendering/Core/AnnotatedCubeActor.js +94 -79
- package/Rendering/Core/AxesActor.js +65 -87
- package/Rendering/Core/Camera.js +246 -271
- package/Rendering/Core/CellPicker.js +125 -148
- package/Rendering/Core/ColorTransferFunction/ColorMaps.js +20 -21
- package/Rendering/Core/ColorTransferFunction/ColorMapsLite.js +20 -21
- package/Rendering/Core/ColorTransferFunction/Constants.js +4 -4
- package/Rendering/Core/ColorTransferFunction.js +460 -546
- package/Rendering/Core/Coordinate/Constants.js +2 -2
- package/Rendering/Core/Coordinate.js +119 -198
- package/Rendering/Core/CubeAxesActor.js +294 -320
- package/Rendering/Core/Follower.js +46 -45
- package/Rendering/Core/Glyph3DMapper/Constants.js +4 -4
- package/Rendering/Core/Glyph3DMapper.js +96 -148
- package/Rendering/Core/HardwareSelector.js +36 -69
- package/Rendering/Core/ImageArrayMapper.js +87 -126
- package/Rendering/Core/ImageCPRMapper.js +134 -209
- package/Rendering/Core/ImageMapper/Constants.js +2 -2
- package/Rendering/Core/ImageMapper.js +92 -170
- package/Rendering/Core/ImageProperty/Constants.js +2 -2
- package/Rendering/Core/ImageProperty.js +66 -81
- package/Rendering/Core/ImageResliceMapper/Constants.js +2 -2
- package/Rendering/Core/ImageResliceMapper.js +36 -29
- package/Rendering/Core/ImageSlice.js +85 -127
- package/Rendering/Core/InteractorObserver.js +82 -73
- package/Rendering/Core/InteractorStyle/Constants.js +2 -2
- package/Rendering/Core/InteractorStyle.js +56 -58
- package/Rendering/Core/Light.js +43 -49
- package/Rendering/Core/Mapper/CoincidentTopologyHelper.js +37 -48
- package/Rendering/Core/Mapper/Constants.js +6 -6
- package/Rendering/Core/Mapper/Static.js +15 -12
- package/Rendering/Core/Mapper.js +194 -259
- package/Rendering/Core/Mapper2D.js +61 -100
- package/Rendering/Core/Picker.js +124 -143
- package/Rendering/Core/PixelSpaceCallbackMapper.js +40 -37
- package/Rendering/Core/PointPicker.js +68 -79
- package/Rendering/Core/Prop/Constants.js +2 -2
- package/Rendering/Core/Prop.js +58 -106
- package/Rendering/Core/Prop3D.js +54 -83
- package/Rendering/Core/Property/Constants.js +6 -6
- package/Rendering/Core/Property.js +45 -74
- package/Rendering/Core/Property2D/Constants.js +2 -2
- package/Rendering/Core/Property2D.js +33 -42
- package/Rendering/Core/RenderWindow.js +70 -82
- package/Rendering/Core/RenderWindowInteractor/Constants.js +7 -7
- package/Rendering/Core/RenderWindowInteractor.js +324 -439
- package/Rendering/Core/Renderer.js +193 -257
- package/Rendering/Core/ScalarBarActor.js +267 -272
- package/Rendering/Core/Skybox.js +26 -24
- package/Rendering/Core/SphereMapper.js +22 -12
- package/Rendering/Core/StickMapper.js +22 -12
- package/Rendering/Core/SurfaceLICInterface/Constants.js +6 -6
- package/Rendering/Core/SurfaceLICInterface.js +13 -9
- package/Rendering/Core/SurfaceLICMapper.js +23 -15
- package/Rendering/Core/Texture.js +99 -141
- package/Rendering/Core/Viewport.js +60 -88
- package/Rendering/Core/Volume.js +55 -77
- package/Rendering/Core/VolumeMapper/Constants.js +4 -4
- package/Rendering/Core/VolumeMapper.js +59 -91
- package/Rendering/Core/VolumeProperty/Constants.js +4 -4
- package/Rendering/Core/VolumeProperty.js +78 -115
- package/Rendering/Core.js +47 -49
- package/Rendering/Misc/CanvasView.js +62 -61
- package/Rendering/Misc/FullScreenRenderWindow.js +60 -62
- package/Rendering/Misc/GenericRenderWindow.js +48 -37
- package/Rendering/Misc/RemoteView.js +86 -80
- package/Rendering/Misc/RenderWindowWithControlBar.js +54 -48
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager/CameraSynchronizer.js +43 -51
- package/Rendering/Misc/SynchronizableRenderWindow/BehaviorManager.js +52 -82
- package/Rendering/Misc/SynchronizableRenderWindow/ObjectManager.js +258 -308
- package/Rendering/Misc/SynchronizableRenderWindow.js +133 -163
- package/Rendering/Misc/TextureLODsDownloader.js +72 -74
- package/Rendering/Misc.js +7 -7
- package/Rendering/OpenGL/Actor.js +57 -68
- package/Rendering/OpenGL/Actor2D.js +56 -56
- package/Rendering/OpenGL/BufferObject/Constants.js +2 -2
- package/Rendering/OpenGL/BufferObject.js +50 -65
- package/Rendering/OpenGL/Camera.js +35 -29
- package/Rendering/OpenGL/CellArrayBufferObject.js +119 -149
- package/Rendering/OpenGL/Convolution2DPass.js +87 -81
- package/Rendering/OpenGL/CubeAxesActor.js +28 -21
- package/Rendering/OpenGL/ForwardPass.js +53 -64
- package/Rendering/OpenGL/Framebuffer.js +61 -101
- package/Rendering/OpenGL/Glyph3DMapper.js +165 -196
- package/Rendering/OpenGL/HardwareSelector/Constants.js +2 -2
- package/Rendering/OpenGL/HardwareSelector.js +272 -397
- package/Rendering/OpenGL/Helper.js +58 -73
- package/Rendering/OpenGL/ImageCPRMapper.js +339 -421
- package/Rendering/OpenGL/ImageMapper.js +268 -361
- package/Rendering/OpenGL/ImageResliceMapper.js +306 -438
- package/Rendering/OpenGL/ImageSlice.js +48 -54
- package/Rendering/OpenGL/OrderIndependentTranslucentPass.js +102 -84
- package/Rendering/OpenGL/PixelSpaceCallbackMapper.js +43 -42
- package/Rendering/OpenGL/PolyDataMapper.js +358 -492
- package/Rendering/OpenGL/PolyDataMapper2D.js +153 -205
- package/Rendering/OpenGL/RadialDistortionPass.js +86 -89
- package/Rendering/OpenGL/RenderWindow/Constants.js +2 -2
- package/Rendering/OpenGL/RenderWindow/ContextProxy.js +20 -29
- package/Rendering/OpenGL/RenderWindow.js +356 -510
- package/Rendering/OpenGL/Renderer.js +77 -89
- package/Rendering/OpenGL/ReplacementShaderMapper.js +28 -46
- package/Rendering/OpenGL/ScalarBarActor.js +28 -21
- package/Rendering/OpenGL/Shader.js +37 -31
- package/Rendering/OpenGL/ShaderCache.js +67 -74
- package/Rendering/OpenGL/ShaderProgram.js +136 -248
- package/Rendering/OpenGL/Skybox.js +99 -60
- package/Rendering/OpenGL/SphereMapper.js +94 -108
- package/Rendering/OpenGL/StickMapper.js +110 -114
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D/pingpong.js +91 -157
- package/Rendering/OpenGL/SurfaceLIC/LineIntegralConvolution2D.js +142 -151
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +142 -216
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICMapper.js +79 -100
- package/Rendering/OpenGL/SurfaceLIC.js +2 -2
- package/Rendering/OpenGL/Texture/Constants.js +4 -4
- package/Rendering/OpenGL/Texture.js +444 -609
- package/Rendering/OpenGL/TextureUnitManager.js +47 -43
- package/Rendering/OpenGL/VertexArrayObject.js +92 -131
- package/Rendering/OpenGL/ViewNodeFactory.js +25 -13
- package/Rendering/OpenGL/Volume.js +38 -34
- package/Rendering/OpenGL/VolumeMapper.js +437 -547
- package/Rendering/OpenGL.js +28 -28
- package/Rendering/SceneGraph/RenderPass.js +34 -31
- package/Rendering/SceneGraph/RenderWindowViewNode.js +68 -94
- package/Rendering/SceneGraph/ViewNode.js +82 -111
- package/Rendering/SceneGraph/ViewNodeFactory.js +31 -26
- package/Rendering/SceneGraph.js +4 -4
- package/Rendering/WebGPU/Actor.js +49 -49
- package/Rendering/WebGPU/Actor2D.js +45 -44
- package/Rendering/WebGPU/BindGroup.js +43 -50
- package/Rendering/WebGPU/Buffer.js +41 -50
- package/Rendering/WebGPU/BufferManager/Constants.js +4 -4
- package/Rendering/WebGPU/BufferManager.js +111 -141
- package/Rendering/WebGPU/Camera.js +65 -67
- package/Rendering/WebGPU/CellArrayMapper.js +621 -388
- package/Rendering/WebGPU/CubeAxesActor.js +28 -19
- package/Rendering/WebGPU/Device.js +78 -133
- package/Rendering/WebGPU/ForwardPass.js +75 -72
- package/Rendering/WebGPU/FullScreenQuad.js +25 -18
- package/Rendering/WebGPU/Glyph3DMapper.js +62 -74
- package/Rendering/WebGPU/HardwareSelectionPass.js +45 -38
- package/Rendering/WebGPU/HardwareSelector.js +200 -276
- package/Rendering/WebGPU/ImageMapper.js +180 -171
- package/Rendering/WebGPU/ImageSlice.js +45 -44
- package/Rendering/WebGPU/IndexBuffer.js +166 -200
- package/Rendering/WebGPU/OpaquePass.js +37 -36
- package/Rendering/WebGPU/OrderIndependentTranslucentPass.js +72 -45
- package/Rendering/WebGPU/Pipeline.js +37 -51
- package/Rendering/WebGPU/PixelSpaceCallbackMapper.js +27 -19
- package/Rendering/WebGPU/PolyDataMapper.js +50 -53
- package/Rendering/WebGPU/PolyDataMapper2D.js +39 -39
- package/Rendering/WebGPU/RenderEncoder.js +68 -88
- package/Rendering/WebGPU/RenderWindow.js +262 -376
- package/Rendering/WebGPU/Renderer.js +224 -208
- package/Rendering/WebGPU/Sampler.js +27 -21
- package/Rendering/WebGPU/ScalarBarActor.js +28 -19
- package/Rendering/WebGPU/ShaderCache.js +43 -41
- package/Rendering/WebGPU/ShaderDescription.js +52 -59
- package/Rendering/WebGPU/ShaderModule.js +26 -17
- package/Rendering/WebGPU/SimpleMapper.js +185 -121
- package/Rendering/WebGPU/SphereMapper.js +200 -130
- package/Rendering/WebGPU/StickMapper.js +289 -152
- package/Rendering/WebGPU/StorageBuffer.js +100 -115
- package/Rendering/WebGPU/Texture.js +79 -99
- package/Rendering/WebGPU/TextureManager.js +52 -54
- package/Rendering/WebGPU/TextureView.js +40 -43
- package/Rendering/WebGPU/Types.js +53 -70
- package/Rendering/WebGPU/UniformBuffer.js +158 -184
- package/Rendering/WebGPU/VertexInput.js +64 -90
- package/Rendering/WebGPU/ViewNodeFactory.js +25 -13
- package/Rendering/WebGPU/Volume.js +52 -51
- package/Rendering/WebGPU/VolumePass.js +218 -239
- package/Rendering/WebGPU/VolumePassFSQ.js +625 -306
- package/Rendering/WebGPU.js +1 -1
- package/Rendering/index.js +5 -5
- package/Widgets/Core/AbstractWidget/Constants.js +2 -2
- package/Widgets/Core/AbstractWidget.js +49 -58
- package/Widgets/Core/AbstractWidgetFactory.js +101 -122
- package/Widgets/Core/StateBuilder/boundsMixin.js +23 -28
- package/Widgets/Core/StateBuilder/color3Mixin.js +10 -7
- package/Widgets/Core/StateBuilder/colorMixin.js +10 -6
- package/Widgets/Core/StateBuilder/cornerMixin.js +16 -15
- package/Widgets/Core/StateBuilder/directionMixin.js +20 -18
- package/Widgets/Core/StateBuilder/manipulatorMixin.js +26 -18
- package/Widgets/Core/StateBuilder/nameMixin.js +10 -6
- package/Widgets/Core/StateBuilder/orientationMixin.js +19 -16
- package/Widgets/Core/StateBuilder/originMixin.js +25 -32
- package/Widgets/Core/StateBuilder/scale1Mixin.js +10 -6
- package/Widgets/Core/StateBuilder/scale3Mixin.js +10 -6
- package/Widgets/Core/StateBuilder/shapeMixin.js +12 -6
- package/Widgets/Core/StateBuilder/textMixin.js +10 -6
- package/Widgets/Core/StateBuilder/visibleMixin.js +10 -6
- package/Widgets/Core/StateBuilder.js +120 -149
- package/Widgets/Core/WidgetManager/Constants.js +7 -7
- package/Widgets/Core/WidgetManager.js +249 -421
- package/Widgets/Core/WidgetState.js +48 -57
- package/Widgets/Core.js +5 -5
- package/Widgets/Manipulators/AbstractManipulator.js +20 -14
- package/Widgets/Manipulators/CPRManipulator.js +55 -71
- package/Widgets/Manipulators/LineManipulator.js +31 -28
- package/Widgets/Manipulators/PickerManipulator.d.ts +48 -0
- package/Widgets/Manipulators/PickerManipulator.js +65 -0
- package/Widgets/Manipulators/PlaneManipulator.js +26 -23
- package/Widgets/Manipulators/TrackballManipulator.js +39 -35
- package/Widgets/Manipulators.js +4 -2
- package/Widgets/Representations/ArrowHandleRepresentation.js +148 -162
- package/Widgets/Representations/CircleContextRepresentation.js +44 -38
- package/Widgets/Representations/ContextRepresentation.js +17 -14
- package/Widgets/Representations/ConvexFaceContextRepresentation.js +50 -47
- package/Widgets/Representations/CroppingOutlineRepresentation.js +38 -27
- package/Widgets/Representations/CubeHandleRepresentation.js +21 -18
- package/Widgets/Representations/GlyphRepresentation.js +107 -152
- package/Widgets/Representations/HandleRepresentation.js +17 -14
- package/Widgets/Representations/ImplicitPlaneRepresentation.js +97 -91
- package/Widgets/Representations/LineHandleRepresentation.js +44 -41
- package/Widgets/Representations/OutlineContextRepresentation.js +42 -36
- package/Widgets/Representations/PolyLineRepresentation.js +60 -75
- package/Widgets/Representations/RectangleContextRepresentation.js +42 -37
- package/Widgets/Representations/SphereContextRepresentation.js +19 -27
- package/Widgets/Representations/SphereHandleRepresentation.js +31 -27
- package/Widgets/Representations/SplineContextRepresentation.js +46 -70
- package/Widgets/Representations/WidgetRepresentation/Constants.js +2 -2
- package/Widgets/Representations/WidgetRepresentation.js +99 -134
- package/Widgets/Representations.js +13 -13
- package/Widgets/Widgets3D/AngleWidget/behavior.js +41 -63
- package/Widgets/Widgets3D/AngleWidget.js +41 -39
- package/Widgets/Widgets3D/DistanceWidget/behavior.js +40 -61
- package/Widgets/Widgets3D/DistanceWidget.js +38 -36
- package/Widgets/Widgets3D/EllipseWidget/behavior.js +14 -19
- package/Widgets/Widgets3D/EllipseWidget/state.js +4 -2
- package/Widgets/Widgets3D/EllipseWidget.js +37 -26
- package/Widgets/Widgets3D/ImageCroppingWidget/behavior.js +26 -56
- package/Widgets/Widgets3D/ImageCroppingWidget/helpers.js +14 -17
- package/Widgets/Widgets3D/ImageCroppingWidget/state.js +20 -16
- package/Widgets/Widgets3D/ImageCroppingWidget.js +80 -98
- package/Widgets/Widgets3D/ImplicitPlaneWidget.js +55 -77
- package/Widgets/Widgets3D/InteractiveOrientationWidget/behavior.js +17 -18
- package/Widgets/Widgets3D/InteractiveOrientationWidget/state.js +15 -7
- package/Widgets/Widgets3D/InteractiveOrientationWidget.js +30 -29
- package/Widgets/Widgets3D/LabelWidget/behavior.js +37 -62
- package/Widgets/Widgets3D/LabelWidget.js +31 -25
- package/Widgets/Widgets3D/LineWidget/Constants.js +8 -8
- package/Widgets/Widgets3D/LineWidget/behavior.js +77 -114
- package/Widgets/Widgets3D/LineWidget/helpers.js +13 -20
- package/Widgets/Widgets3D/LineWidget/state.js +2 -1
- package/Widgets/Widgets3D/LineWidget.js +39 -35
- package/Widgets/Widgets3D/PaintWidget/behavior.js +24 -59
- package/Widgets/Widgets3D/PaintWidget.js +39 -37
- package/Widgets/Widgets3D/PolyLineWidget/behavior.js +44 -68
- package/Widgets/Widgets3D/PolyLineWidget.js +36 -31
- package/Widgets/Widgets3D/RectangleWidget/behavior.js +6 -11
- package/Widgets/Widgets3D/RectangleWidget/state.js +4 -2
- package/Widgets/Widgets3D/RectangleWidget.js +37 -25
- package/Widgets/Widgets3D/ResliceCursorWidget/Constants.js +35 -21
- package/Widgets/Widgets3D/ResliceCursorWidget/behavior.js +134 -210
- package/Widgets/Widgets3D/ResliceCursorWidget/cprBehavior.js +26 -41
- package/Widgets/Widgets3D/ResliceCursorWidget/helpers.js +90 -117
- package/Widgets/Widgets3D/ResliceCursorWidget/state.js +33 -40
- package/Widgets/Widgets3D/ResliceCursorWidget.js +186 -227
- package/Widgets/Widgets3D/SeedWidget/behavior.js +82 -0
- package/Widgets/Widgets3D/SeedWidget/state.js +18 -0
- package/Widgets/Widgets3D/SeedWidget.d.ts +44 -0
- package/Widgets/Widgets3D/SeedWidget.js +43 -0
- package/Widgets/Widgets3D/ShapeWidget/Constants.js +19 -19
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +150 -252
- package/Widgets/Widgets3D/ShapeWidget.js +24 -27
- package/Widgets/Widgets3D/SphereWidget/behavior.js +35 -69
- package/Widgets/Widgets3D/SphereWidget/state.js +9 -5
- package/Widgets/Widgets3D/SphereWidget.js +34 -44
- package/Widgets/Widgets3D/SplineWidget/behavior.js +85 -120
- package/Widgets/Widgets3D/SplineWidget.js +43 -39
- package/Widgets/Widgets3D.js +15 -15
- package/Widgets/index.js +4 -4
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +95 -207
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +0 -3
- package/favicon.js +5 -6
- package/index.d.ts +4 -2
- package/index.js +4 -3
- package/macros.js +4 -1931
- package/macros2.js +1684 -0
- package/package.json +6 -6
- package/vtk.js +18 -31
|
@@ -1,592 +1,471 @@
|
|
|
1
|
-
import macro from '../../
|
|
1
|
+
import { m as macro } from '../../macros2.js';
|
|
2
2
|
import vtkShader from './Shader.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const {
|
|
5
|
+
vtkErrorMacro
|
|
6
|
+
} = macro;
|
|
7
|
+
|
|
8
|
+
// perform in place string substitutions, indicate if a substitution was done
|
|
5
9
|
// this is useful for building up shader strings which typically involve
|
|
6
10
|
// lots of string substitutions. Return true if a substitution was done.
|
|
7
|
-
|
|
8
11
|
function substitute(source, search, replace, all) {
|
|
9
12
|
// We only accept strings or array of strings, typeof is faster than Array.isArray
|
|
10
|
-
|
|
13
|
+
const replaceStr = typeof replace === 'string' ? replace : replace.join('\n');
|
|
14
|
+
|
|
15
|
+
// We don't need to instantiate a RegExp if we don't want a global substitution.
|
|
11
16
|
// In all other cases, we need to take the provided string or RegExp and
|
|
12
17
|
// instantiate a new one to add the `g` flag.
|
|
13
18
|
// Argument defaults are transpiled to slow `arguments`-based operations
|
|
14
19
|
// better assume undefined as flag to know if the value is set or not
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var resultstr = source.replace(replaceSearch, replaceStr);
|
|
20
|
+
const replaceSearch = all === false ? search : new RegExp(search, 'g');
|
|
21
|
+
const resultstr = source.replace(replaceSearch, replaceStr);
|
|
18
22
|
return {
|
|
19
23
|
// If the result is different than the input, we did perform a replacement
|
|
20
24
|
replace: resultstr !== replaceStr,
|
|
21
25
|
result: resultstr
|
|
22
26
|
};
|
|
23
|
-
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
24
30
|
// vtkShaderProgram methods
|
|
25
31
|
// ----------------------------------------------------------------------------
|
|
26
32
|
|
|
27
33
|
function vtkShaderProgram(publicAPI, model) {
|
|
28
34
|
// Set our className
|
|
29
35
|
model.classHierarchy.push('vtkShaderProgram');
|
|
30
|
-
|
|
31
|
-
publicAPI.compileShader = function () {
|
|
36
|
+
publicAPI.compileShader = () => {
|
|
32
37
|
if (!model.vertexShader.compile()) {
|
|
33
|
-
vtkErrorMacro(model.vertexShader.getSource().split('\n').map(
|
|
34
|
-
return "".concat(index, ": ").concat(line);
|
|
35
|
-
}).join('\n'));
|
|
38
|
+
vtkErrorMacro(model.vertexShader.getSource().split('\n').map((line, index) => `${index}: ${line}`).join('\n'));
|
|
36
39
|
vtkErrorMacro(model.vertexShader.getError());
|
|
37
40
|
return 0;
|
|
38
41
|
}
|
|
39
|
-
|
|
40
42
|
if (!model.fragmentShader.compile()) {
|
|
41
|
-
vtkErrorMacro(model.fragmentShader.getSource().split('\n').map(
|
|
42
|
-
return "".concat(index, ": ").concat(line);
|
|
43
|
-
}).join('\n'));
|
|
43
|
+
vtkErrorMacro(model.fragmentShader.getSource().split('\n').map((line, index) => `${index}: ${line}`).join('\n'));
|
|
44
44
|
vtkErrorMacro(model.fragmentShader.getError());
|
|
45
45
|
return 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}
|
|
47
|
+
// skip geometry for now
|
|
49
48
|
if (!publicAPI.attachShader(model.vertexShader)) {
|
|
50
49
|
vtkErrorMacro(model.error);
|
|
51
50
|
return 0;
|
|
52
51
|
}
|
|
53
|
-
|
|
54
52
|
if (!publicAPI.attachShader(model.fragmentShader)) {
|
|
55
53
|
vtkErrorMacro(model.error);
|
|
56
54
|
return 0;
|
|
57
55
|
}
|
|
58
|
-
|
|
59
56
|
if (!publicAPI.link()) {
|
|
60
|
-
vtkErrorMacro(
|
|
57
|
+
vtkErrorMacro(`Links failed: ${model.error}`);
|
|
61
58
|
return 0;
|
|
62
59
|
}
|
|
63
|
-
|
|
64
60
|
publicAPI.setCompiled(true);
|
|
65
61
|
return 1;
|
|
66
62
|
};
|
|
67
|
-
|
|
68
|
-
publicAPI.cleanup = function () {
|
|
63
|
+
publicAPI.cleanup = () => {
|
|
69
64
|
if (model.shaderType === 'Unknown' || model.handle === 0) {
|
|
70
65
|
return;
|
|
71
66
|
}
|
|
72
|
-
|
|
73
67
|
model.context.deleteShader(model.handle);
|
|
74
68
|
model.handle = 0;
|
|
75
69
|
};
|
|
76
|
-
|
|
77
|
-
publicAPI.bind = function () {
|
|
70
|
+
publicAPI.bind = () => {
|
|
78
71
|
if (!model.linked && !publicAPI.link()) {
|
|
79
72
|
return false;
|
|
80
73
|
}
|
|
81
|
-
|
|
82
74
|
model.context.useProgram(model.handle);
|
|
83
75
|
publicAPI.setBound(true);
|
|
84
76
|
return true;
|
|
85
77
|
};
|
|
86
|
-
|
|
87
|
-
publicAPI.
|
|
88
|
-
return !!model.bound;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
publicAPI.release = function () {
|
|
78
|
+
publicAPI.isBound = () => !!model.bound;
|
|
79
|
+
publicAPI.release = () => {
|
|
92
80
|
model.context.useProgram(null);
|
|
93
81
|
publicAPI.setBound(false);
|
|
94
82
|
};
|
|
95
|
-
|
|
96
|
-
publicAPI.setContext = function (ctx) {
|
|
83
|
+
publicAPI.setContext = ctx => {
|
|
97
84
|
model.vertexShader.setContext(ctx);
|
|
98
85
|
model.fragmentShader.setContext(ctx);
|
|
99
86
|
model.geometryShader.setContext(ctx);
|
|
100
87
|
};
|
|
101
|
-
|
|
102
|
-
publicAPI.link = function () {
|
|
88
|
+
publicAPI.link = () => {
|
|
103
89
|
if (model.linked) {
|
|
104
90
|
return true;
|
|
105
91
|
}
|
|
106
|
-
|
|
107
92
|
if (model.handle === 0) {
|
|
108
93
|
model.error = 'Program has not been initialized, and/or does not have shaders.';
|
|
109
94
|
return false;
|
|
110
|
-
}
|
|
111
|
-
|
|
95
|
+
}
|
|
112
96
|
|
|
97
|
+
// clear out the list of uniforms used
|
|
113
98
|
model.uniformLocs = {};
|
|
114
99
|
model.context.linkProgram(model.handle);
|
|
115
|
-
|
|
116
|
-
|
|
100
|
+
const isCompiled = model.context.getProgramParameter(model.handle, model.context.LINK_STATUS);
|
|
117
101
|
if (!isCompiled) {
|
|
118
|
-
|
|
119
|
-
vtkErrorMacro(
|
|
102
|
+
const lastError = model.context.getProgramInfoLog(model.handle);
|
|
103
|
+
vtkErrorMacro(`Error linking shader ${lastError}`);
|
|
120
104
|
model.handle = 0;
|
|
121
105
|
return false;
|
|
122
106
|
}
|
|
123
|
-
|
|
124
107
|
publicAPI.setLinked(true);
|
|
125
108
|
model.attributeLocs = {};
|
|
126
109
|
return true;
|
|
127
110
|
};
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var location = publicAPI.findUniform(name);
|
|
131
|
-
|
|
111
|
+
publicAPI.setUniformMatrix = (name, v) => {
|
|
112
|
+
const location = publicAPI.findUniform(name);
|
|
132
113
|
if (location === -1) {
|
|
133
|
-
model.error =
|
|
114
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
134
115
|
return false;
|
|
135
116
|
}
|
|
136
|
-
|
|
137
|
-
var f32 = new Float32Array(v);
|
|
117
|
+
const f32 = new Float32Array(v);
|
|
138
118
|
model.context.uniformMatrix4fv(location, false, f32);
|
|
139
119
|
return true;
|
|
140
120
|
};
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
var location = publicAPI.findUniform(name);
|
|
144
|
-
|
|
121
|
+
publicAPI.setUniformMatrix3x3 = (name, v) => {
|
|
122
|
+
const location = publicAPI.findUniform(name);
|
|
145
123
|
if (location === -1) {
|
|
146
|
-
model.error =
|
|
124
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
147
125
|
return false;
|
|
148
126
|
}
|
|
149
|
-
|
|
150
|
-
var f32 = new Float32Array(v);
|
|
127
|
+
const f32 = new Float32Array(v);
|
|
151
128
|
model.context.uniformMatrix3fv(location, false, f32);
|
|
152
129
|
return true;
|
|
153
130
|
};
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var location = publicAPI.findUniform(name);
|
|
157
|
-
|
|
131
|
+
publicAPI.setUniformf = (name, v) => {
|
|
132
|
+
const location = publicAPI.findUniform(name);
|
|
158
133
|
if (location === -1) {
|
|
159
|
-
model.error =
|
|
134
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
160
135
|
return false;
|
|
161
136
|
}
|
|
162
|
-
|
|
163
137
|
model.context.uniform1f(location, v);
|
|
164
138
|
return true;
|
|
165
139
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
var location = publicAPI.findUniform(name);
|
|
169
|
-
|
|
140
|
+
publicAPI.setUniformfv = (name, v) => {
|
|
141
|
+
const location = publicAPI.findUniform(name);
|
|
170
142
|
if (location === -1) {
|
|
171
|
-
model.error =
|
|
143
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
172
144
|
return false;
|
|
173
145
|
}
|
|
174
|
-
|
|
175
146
|
model.context.uniform1fv(location, v);
|
|
176
147
|
return true;
|
|
177
148
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
var location = publicAPI.findUniform(name);
|
|
181
|
-
|
|
149
|
+
publicAPI.setUniformi = (name, v) => {
|
|
150
|
+
const location = publicAPI.findUniform(name);
|
|
182
151
|
if (location === -1) {
|
|
183
|
-
model.error =
|
|
152
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
184
153
|
return false;
|
|
185
154
|
}
|
|
186
|
-
|
|
187
155
|
model.context.uniform1i(location, v);
|
|
188
156
|
return true;
|
|
189
157
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
var location = publicAPI.findUniform(name);
|
|
193
|
-
|
|
158
|
+
publicAPI.setUniformiv = (name, v) => {
|
|
159
|
+
const location = publicAPI.findUniform(name);
|
|
194
160
|
if (location === -1) {
|
|
195
|
-
model.error =
|
|
161
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
196
162
|
return false;
|
|
197
163
|
}
|
|
198
|
-
|
|
199
164
|
model.context.uniform1iv(location, v);
|
|
200
165
|
return true;
|
|
201
166
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
var location = publicAPI.findUniform(name);
|
|
205
|
-
|
|
167
|
+
publicAPI.setUniform2f = (name, v1, v2) => {
|
|
168
|
+
const location = publicAPI.findUniform(name);
|
|
206
169
|
if (location === -1) {
|
|
207
|
-
model.error =
|
|
170
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
208
171
|
return false;
|
|
209
172
|
}
|
|
210
|
-
|
|
211
173
|
if (v2 === undefined) {
|
|
212
174
|
throw new RangeError('Invalid number of values for array');
|
|
213
175
|
}
|
|
214
|
-
|
|
215
176
|
model.context.uniform2f(location, v1, v2);
|
|
216
177
|
return true;
|
|
217
178
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
var location = publicAPI.findUniform(name);
|
|
221
|
-
|
|
179
|
+
publicAPI.setUniform2fv = (name, v) => {
|
|
180
|
+
const location = publicAPI.findUniform(name);
|
|
222
181
|
if (location === -1) {
|
|
223
|
-
model.error =
|
|
182
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
224
183
|
return false;
|
|
225
184
|
}
|
|
226
|
-
|
|
227
185
|
model.context.uniform2fv(location, v);
|
|
228
186
|
return true;
|
|
229
187
|
};
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
var location = publicAPI.findUniform(name);
|
|
233
|
-
|
|
188
|
+
publicAPI.setUniform2i = (name, v1, v2) => {
|
|
189
|
+
const location = publicAPI.findUniform(name);
|
|
234
190
|
if (location === -1) {
|
|
235
|
-
model.error =
|
|
191
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
236
192
|
return false;
|
|
237
193
|
}
|
|
238
|
-
|
|
239
194
|
if (v2 === undefined) {
|
|
240
195
|
throw new RangeError('Invalid number of values for array');
|
|
241
196
|
}
|
|
242
|
-
|
|
243
197
|
model.context.uniform2i(location, v1, v2);
|
|
244
198
|
return true;
|
|
245
199
|
};
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
var location = publicAPI.findUniform(name);
|
|
249
|
-
|
|
200
|
+
publicAPI.setUniform2iv = (name, v) => {
|
|
201
|
+
const location = publicAPI.findUniform(name);
|
|
250
202
|
if (location === -1) {
|
|
251
|
-
model.error =
|
|
203
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
252
204
|
return false;
|
|
253
205
|
}
|
|
254
|
-
|
|
255
206
|
model.context.uniform2iv(location, v);
|
|
256
207
|
return true;
|
|
257
208
|
};
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
var location = publicAPI.findUniform(name);
|
|
261
|
-
|
|
209
|
+
publicAPI.setUniform3f = (name, a1, a2, a3) => {
|
|
210
|
+
const location = publicAPI.findUniform(name);
|
|
262
211
|
if (location === -1) {
|
|
263
|
-
model.error =
|
|
212
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
264
213
|
return false;
|
|
265
214
|
}
|
|
266
|
-
|
|
267
215
|
if (a3 === undefined) {
|
|
268
216
|
throw new RangeError('Invalid number of values for array');
|
|
269
217
|
}
|
|
270
|
-
|
|
271
218
|
model.context.uniform3f(location, a1, a2, a3);
|
|
272
219
|
return true;
|
|
273
220
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
var location = publicAPI.findUniform(name);
|
|
277
|
-
|
|
221
|
+
publicAPI.setUniform3fArray = (name, a) => {
|
|
222
|
+
const location = publicAPI.findUniform(name);
|
|
278
223
|
if (location === -1) {
|
|
279
|
-
model.error =
|
|
224
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
280
225
|
return false;
|
|
281
226
|
}
|
|
282
|
-
|
|
283
227
|
if (!Array.isArray(a) || a.length !== 3) {
|
|
284
228
|
throw new RangeError('Invalid number of values for array');
|
|
285
229
|
}
|
|
286
|
-
|
|
287
230
|
model.context.uniform3f(location, a[0], a[1], a[2]);
|
|
288
231
|
return true;
|
|
289
232
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
var location = publicAPI.findUniform(name);
|
|
293
|
-
|
|
233
|
+
publicAPI.setUniform3fv = (name, v) => {
|
|
234
|
+
const location = publicAPI.findUniform(name);
|
|
294
235
|
if (location === -1) {
|
|
295
|
-
model.error =
|
|
236
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
296
237
|
return false;
|
|
297
238
|
}
|
|
298
|
-
|
|
299
239
|
model.context.uniform3fv(location, v);
|
|
300
240
|
return true;
|
|
301
241
|
};
|
|
302
|
-
|
|
303
242
|
publicAPI.setUniform3i = function (name) {
|
|
304
|
-
|
|
305
|
-
|
|
243
|
+
const location = publicAPI.findUniform(name);
|
|
306
244
|
if (location === -1) {
|
|
307
|
-
model.error =
|
|
245
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
308
246
|
return false;
|
|
309
247
|
}
|
|
310
|
-
|
|
311
248
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
312
249
|
args[_key - 1] = arguments[_key];
|
|
313
250
|
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
251
|
+
let array = args;
|
|
252
|
+
// allow an array passed as a single argument
|
|
317
253
|
if (array.length === 1 && Array.isArray(array[0])) {
|
|
318
254
|
array = array[0];
|
|
319
255
|
}
|
|
320
|
-
|
|
321
256
|
if (array.length !== 3) {
|
|
322
257
|
throw new RangeError('Invalid number of values for array');
|
|
323
258
|
}
|
|
324
|
-
|
|
325
259
|
model.context.uniform3i(location, array[0], array[1], array[2]);
|
|
326
260
|
return true;
|
|
327
261
|
};
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
var location = publicAPI.findUniform(name);
|
|
331
|
-
|
|
262
|
+
publicAPI.setUniform3iv = (name, v) => {
|
|
263
|
+
const location = publicAPI.findUniform(name);
|
|
332
264
|
if (location === -1) {
|
|
333
|
-
model.error =
|
|
265
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
334
266
|
return false;
|
|
335
267
|
}
|
|
336
|
-
|
|
337
268
|
model.context.uniform3iv(location, v);
|
|
338
269
|
return true;
|
|
339
270
|
};
|
|
340
|
-
|
|
341
271
|
publicAPI.setUniform4f = function (name) {
|
|
342
|
-
|
|
343
|
-
|
|
272
|
+
const location = publicAPI.findUniform(name);
|
|
344
273
|
if (location === -1) {
|
|
345
|
-
model.error =
|
|
274
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
346
275
|
return false;
|
|
347
276
|
}
|
|
348
|
-
|
|
349
277
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
350
278
|
args[_key2 - 1] = arguments[_key2];
|
|
351
279
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
280
|
+
let array = args;
|
|
281
|
+
// allow an array passed as a single argument
|
|
355
282
|
if (array.length === 1 && Array.isArray(array[0])) {
|
|
356
283
|
array = array[0];
|
|
357
284
|
}
|
|
358
|
-
|
|
359
285
|
if (array.length !== 4) {
|
|
360
286
|
throw new RangeError('Invalid number of values for array');
|
|
361
287
|
}
|
|
362
|
-
|
|
363
288
|
model.context.uniform4f(location, array[0], array[1], array[2], array[3]);
|
|
364
289
|
return true;
|
|
365
290
|
};
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
var location = publicAPI.findUniform(name);
|
|
369
|
-
|
|
291
|
+
publicAPI.setUniform4fv = (name, v) => {
|
|
292
|
+
const location = publicAPI.findUniform(name);
|
|
370
293
|
if (location === -1) {
|
|
371
|
-
model.error =
|
|
294
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
372
295
|
return false;
|
|
373
296
|
}
|
|
374
|
-
|
|
375
297
|
model.context.uniform4fv(location, v);
|
|
376
298
|
return true;
|
|
377
299
|
};
|
|
378
|
-
|
|
379
300
|
publicAPI.setUniform4i = function (name) {
|
|
380
|
-
|
|
381
|
-
|
|
301
|
+
const location = publicAPI.findUniform(name);
|
|
382
302
|
if (location === -1) {
|
|
383
|
-
model.error =
|
|
303
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
384
304
|
return false;
|
|
385
305
|
}
|
|
386
|
-
|
|
387
306
|
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
388
307
|
args[_key3 - 1] = arguments[_key3];
|
|
389
308
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
309
|
+
let array = args;
|
|
310
|
+
// allow an array passed as a single argument
|
|
393
311
|
if (array.length === 1 && Array.isArray(array[0])) {
|
|
394
312
|
array = array[0];
|
|
395
313
|
}
|
|
396
|
-
|
|
397
314
|
if (array.length !== 4) {
|
|
398
315
|
throw new RangeError('Invalid number of values for array');
|
|
399
316
|
}
|
|
400
|
-
|
|
401
317
|
model.context.uniform4i(location, array[0], array[1], array[2], array[3]);
|
|
402
318
|
return true;
|
|
403
319
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
var location = publicAPI.findUniform(name);
|
|
407
|
-
|
|
320
|
+
publicAPI.setUniform4iv = (name, v) => {
|
|
321
|
+
const location = publicAPI.findUniform(name);
|
|
408
322
|
if (location === -1) {
|
|
409
|
-
model.error =
|
|
323
|
+
model.error = `Could not set uniform ${name} . No such uniform.`;
|
|
410
324
|
return false;
|
|
411
325
|
}
|
|
412
|
-
|
|
413
326
|
model.context.uniform4iv(location, v);
|
|
414
327
|
return true;
|
|
415
328
|
};
|
|
416
|
-
|
|
417
|
-
publicAPI.findUniform = function (name) {
|
|
329
|
+
publicAPI.findUniform = name => {
|
|
418
330
|
if (!name || !model.linked) {
|
|
419
331
|
return -1;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
var loc = model.uniformLocs[name];
|
|
332
|
+
}
|
|
424
333
|
|
|
334
|
+
// see if we have cached the result
|
|
335
|
+
let loc = model.uniformLocs[name];
|
|
425
336
|
if (loc !== undefined) {
|
|
426
337
|
return loc;
|
|
427
338
|
}
|
|
428
|
-
|
|
429
339
|
loc = model.context.getUniformLocation(model.handle, name);
|
|
430
|
-
|
|
431
340
|
if (loc === null) {
|
|
432
|
-
model.error =
|
|
341
|
+
model.error = `Uniform ${name} not found in current shader program.`;
|
|
433
342
|
model.uniformLocs[name] = -1;
|
|
434
343
|
return -1;
|
|
435
344
|
}
|
|
436
|
-
|
|
437
345
|
model.uniformLocs[name] = loc;
|
|
438
346
|
return loc;
|
|
439
347
|
};
|
|
440
|
-
|
|
441
|
-
publicAPI.isUniformUsed = function (name) {
|
|
348
|
+
publicAPI.isUniformUsed = name => {
|
|
442
349
|
if (!name) {
|
|
443
350
|
return false;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
var loc = model.uniformLocs[name];
|
|
351
|
+
}
|
|
448
352
|
|
|
353
|
+
// see if we have cached the result
|
|
354
|
+
let loc = model.uniformLocs[name];
|
|
449
355
|
if (loc !== undefined) {
|
|
450
356
|
return loc !== null;
|
|
451
357
|
}
|
|
452
|
-
|
|
453
358
|
if (!model.linked) {
|
|
454
359
|
vtkErrorMacro('attempt to find uniform when the shader program is not linked');
|
|
455
360
|
return false;
|
|
456
361
|
}
|
|
457
|
-
|
|
458
362
|
loc = model.context.getUniformLocation(model.handle, name);
|
|
459
363
|
model.uniformLocs[name] = loc;
|
|
460
|
-
|
|
461
364
|
if (loc === null) {
|
|
462
365
|
return false;
|
|
463
366
|
}
|
|
464
|
-
|
|
465
367
|
return true;
|
|
466
368
|
};
|
|
467
|
-
|
|
468
|
-
publicAPI.isAttributeUsed = function (name) {
|
|
369
|
+
publicAPI.isAttributeUsed = name => {
|
|
469
370
|
if (!name) {
|
|
470
371
|
return false;
|
|
471
|
-
}
|
|
472
|
-
|
|
372
|
+
}
|
|
473
373
|
|
|
374
|
+
// see if we have cached the result
|
|
474
375
|
if (name in model.attributeLocs) {
|
|
475
376
|
return true;
|
|
476
377
|
}
|
|
477
|
-
|
|
478
378
|
if (!model.linked) {
|
|
479
379
|
vtkErrorMacro('attempt to find uniform when the shader program is not linked');
|
|
480
380
|
return false;
|
|
481
381
|
}
|
|
482
|
-
|
|
483
|
-
var loc = model.context.getAttribLocation(model.handle, name);
|
|
484
|
-
|
|
382
|
+
const loc = model.context.getAttribLocation(model.handle, name);
|
|
485
383
|
if (loc === -1) {
|
|
486
384
|
return false;
|
|
487
385
|
}
|
|
488
|
-
|
|
489
386
|
model.attributeLocs[name] = loc;
|
|
490
387
|
return true;
|
|
491
388
|
};
|
|
492
|
-
|
|
493
|
-
publicAPI.attachShader = function (shader) {
|
|
389
|
+
publicAPI.attachShader = shader => {
|
|
494
390
|
if (shader.getHandle() === 0) {
|
|
495
391
|
model.error = 'Shader object was not initialized, cannot attach it.';
|
|
496
392
|
return false;
|
|
497
393
|
}
|
|
498
|
-
|
|
499
394
|
if (shader.getShaderType() === 'Unknown') {
|
|
500
395
|
model.error = 'Shader object is of type Unknown and cannot be used.';
|
|
501
396
|
return false;
|
|
502
397
|
}
|
|
503
|
-
|
|
504
398
|
if (model.handle === 0) {
|
|
505
|
-
|
|
506
|
-
|
|
399
|
+
const thandle = model.context.createProgram();
|
|
507
400
|
if (thandle === 0) {
|
|
508
401
|
model.error = 'Could not create shader program.';
|
|
509
402
|
return false;
|
|
510
403
|
}
|
|
511
|
-
|
|
512
404
|
model.handle = thandle;
|
|
513
405
|
model.linked = false;
|
|
514
406
|
}
|
|
515
|
-
|
|
516
407
|
if (shader.getShaderType() === 'Vertex') {
|
|
517
408
|
if (model.vertexShaderHandle !== 0) {
|
|
518
409
|
model.comntext.detachShader(model.handle, model.vertexShaderHandle);
|
|
519
410
|
}
|
|
520
|
-
|
|
521
411
|
model.vertexShaderHandle = shader.getHandle();
|
|
522
412
|
}
|
|
523
|
-
|
|
524
413
|
if (shader.getShaderType() === 'Fragment') {
|
|
525
414
|
if (model.fragmentShaderHandle !== 0) {
|
|
526
415
|
model.context.detachShader(model.handle, model.fragmentShaderHandle);
|
|
527
416
|
}
|
|
528
|
-
|
|
529
417
|
model.fragmentShaderHandle = shader.getHandle();
|
|
530
418
|
}
|
|
531
|
-
|
|
532
419
|
model.context.attachShader(model.handle, shader.getHandle());
|
|
533
420
|
publicAPI.setLinked(false);
|
|
534
421
|
return true;
|
|
535
422
|
};
|
|
536
|
-
|
|
537
|
-
publicAPI.detachShader = function (shader) {
|
|
423
|
+
publicAPI.detachShader = shader => {
|
|
538
424
|
if (shader.getHandle() === 0) {
|
|
539
425
|
model.error = 'shader object was not initialized, cannot attach it.';
|
|
540
426
|
return false;
|
|
541
427
|
}
|
|
542
|
-
|
|
543
428
|
if (shader.getShaderType() === 'Unknown') {
|
|
544
429
|
model.error = 'Shader object is of type Unknown and cannot be used.';
|
|
545
430
|
return false;
|
|
546
431
|
}
|
|
547
|
-
|
|
548
432
|
if (model.handle === 0) {
|
|
549
433
|
model.error = 'This shader program has not been initialized yet.';
|
|
550
434
|
}
|
|
551
|
-
|
|
552
435
|
switch (shader.getShaderType()) {
|
|
553
436
|
case 'Vertex':
|
|
554
437
|
if (model.vertexShaderHandle !== shader.getHandle()) {
|
|
555
438
|
model.error = 'The supplied shader was not attached to this program.';
|
|
556
439
|
return false;
|
|
557
440
|
}
|
|
558
|
-
|
|
559
441
|
model.context.detachShader(model.handle, shader.getHandle());
|
|
560
442
|
model.vertexShaderHandle = 0;
|
|
561
443
|
model.linked = false;
|
|
562
444
|
return true;
|
|
563
|
-
|
|
564
445
|
case 'Fragment':
|
|
565
446
|
if (model.fragmentShaderHandle !== shader.getHandle()) {
|
|
566
447
|
model.error = 'The supplied shader was not attached to this program.';
|
|
567
448
|
return false;
|
|
568
449
|
}
|
|
569
|
-
|
|
570
450
|
model.context.detachShader(model.handle, shader.getHandle());
|
|
571
451
|
model.fragmentShaderHandle = 0;
|
|
572
452
|
model.linked = false;
|
|
573
453
|
return true;
|
|
574
|
-
|
|
575
454
|
default:
|
|
576
455
|
return false;
|
|
577
456
|
}
|
|
578
457
|
};
|
|
579
|
-
|
|
580
|
-
publicAPI.setContext = function (ctx) {
|
|
458
|
+
publicAPI.setContext = ctx => {
|
|
581
459
|
model.context = ctx;
|
|
582
460
|
model.vertexShader.setContext(ctx);
|
|
583
461
|
model.fragmentShader.setContext(ctx);
|
|
584
462
|
model.geometryShader.setContext(ctx);
|
|
585
463
|
};
|
|
586
|
-
|
|
587
|
-
publicAPI.setLastCameraMTime = function (mtime) {
|
|
464
|
+
publicAPI.setLastCameraMTime = mtime => {
|
|
588
465
|
model.lastCameraMTime = mtime;
|
|
589
|
-
};
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
// publicAPI.enableAttributeArray = (name) => {
|
|
590
469
|
// const location = publicAPI.findAttributeArray(name);
|
|
591
470
|
// if (location === -1) {
|
|
592
471
|
// model.error = `Could not enable attribute ${name} No such attribute.`;
|
|
@@ -595,6 +474,7 @@ function vtkShaderProgram(publicAPI, model) {
|
|
|
595
474
|
// model.context.enableVertexAttribArray(location);
|
|
596
475
|
// return true;
|
|
597
476
|
// };
|
|
477
|
+
|
|
598
478
|
// publicAPI.disableAttributeArray = (name) => {
|
|
599
479
|
// const location = publicAPI.findAttributeArray(name);
|
|
600
480
|
// if (location === -1) {
|
|
@@ -604,13 +484,13 @@ function vtkShaderProgram(publicAPI, model) {
|
|
|
604
484
|
// model.context.disableVertexAttribArray(location);
|
|
605
485
|
// return true;
|
|
606
486
|
// };
|
|
487
|
+
}
|
|
607
488
|
|
|
608
|
-
|
|
489
|
+
// ----------------------------------------------------------------------------
|
|
609
490
|
// Object factory
|
|
610
491
|
// ----------------------------------------------------------------------------
|
|
611
492
|
|
|
612
|
-
|
|
613
|
-
var DEFAULT_VALUES = {
|
|
493
|
+
const DEFAULT_VALUES = {
|
|
614
494
|
vertexShaderHandle: 0,
|
|
615
495
|
fragmentShaderHandle: 0,
|
|
616
496
|
geometryShaderHandle: 0,
|
|
@@ -628,12 +508,15 @@ var DEFAULT_VALUES = {
|
|
|
628
508
|
md5Hash: 0,
|
|
629
509
|
context: null,
|
|
630
510
|
lastCameraMTime: null
|
|
631
|
-
};
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
// ----------------------------------------------------------------------------
|
|
632
514
|
|
|
633
515
|
function extend(publicAPI, model) {
|
|
634
|
-
|
|
635
|
-
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
516
|
+
let initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
517
|
+
Object.assign(model, DEFAULT_VALUES, initialValues);
|
|
636
518
|
|
|
519
|
+
// Instantiate internal objects
|
|
637
520
|
model.attributesLocs = {};
|
|
638
521
|
model.uniformLocs = {};
|
|
639
522
|
model.vertexShader = vtkShader.newInstance();
|
|
@@ -641,22 +524,27 @@ function extend(publicAPI, model) {
|
|
|
641
524
|
model.fragmentShader = vtkShader.newInstance();
|
|
642
525
|
model.fragmentShader.setShaderType('Fragment');
|
|
643
526
|
model.geometryShader = vtkShader.newInstance();
|
|
644
|
-
model.geometryShader.setShaderType('Geometry');
|
|
527
|
+
model.geometryShader.setShaderType('Geometry');
|
|
645
528
|
|
|
529
|
+
// Build VTK API
|
|
646
530
|
macro.obj(publicAPI, model);
|
|
647
531
|
macro.get(publicAPI, model, ['lastCameraMTime']);
|
|
648
|
-
macro.setGet(publicAPI, model, ['error', 'handle', 'compiled', 'bound', 'md5Hash', 'vertexShader', 'fragmentShader', 'geometryShader', 'linked']);
|
|
532
|
+
macro.setGet(publicAPI, model, ['error', 'handle', 'compiled', 'bound', 'md5Hash', 'vertexShader', 'fragmentShader', 'geometryShader', 'linked']);
|
|
649
533
|
|
|
534
|
+
// Object methods
|
|
650
535
|
vtkShaderProgram(publicAPI, model);
|
|
651
|
-
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// ----------------------------------------------------------------------------
|
|
652
539
|
|
|
540
|
+
const newInstance = macro.newInstance(extend, 'vtkShaderProgram');
|
|
653
541
|
|
|
654
|
-
|
|
542
|
+
// ----------------------------------------------------------------------------
|
|
655
543
|
|
|
656
544
|
var vtkShaderProgram$1 = {
|
|
657
|
-
newInstance
|
|
658
|
-
extend
|
|
659
|
-
substitute
|
|
545
|
+
newInstance,
|
|
546
|
+
extend,
|
|
547
|
+
substitute
|
|
660
548
|
};
|
|
661
549
|
|
|
662
550
|
export { vtkShaderProgram$1 as default, substitute };
|