@kitware/vtk.js 21.1.5 → 21.3.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/Transform/LandmarkTransform.d.ts +1 -1
- package/Filters/General/ImageCropFilter.js +3 -4
- package/Filters/Sources/Arrow2DSource.d.ts +14 -13
- package/Filters/Sources/ArrowSource.d.ts +9 -8
- package/Filters/Sources/CircleSource.d.ts +15 -14
- package/Filters/Sources/ConeSource.d.ts +18 -17
- package/Filters/Sources/CubeSource.d.ts +19 -19
- package/Filters/Sources/Cursor3D.d.ts +19 -16
- package/Filters/Sources/CylinderSource.d.ts +15 -14
- package/Filters/Sources/LineSource.d.ts +1 -1
- package/Filters/Sources/PlaneSource.d.ts +29 -28
- package/Filters/Sources/PointSource.d.ts +9 -8
- package/Filters/Sources/SphereSource.d.ts +9 -8
- package/IO/Geometry/STLReader.js +2 -2
- package/Rendering/Core/AbstractMapper.js +1 -0
- package/Rendering/Core/Actor2D.js +1 -3
- package/Rendering/Core/Light.d.ts +277 -234
- package/Rendering/Core/Mapper2D.d.ts +402 -0
- package/Rendering/Core/Mapper2D.js +213 -0
- package/Rendering/Core/Property.d.ts +43 -43
- package/Rendering/Core/Property2D/Constants.js +9 -0
- package/Rendering/Core/Property2D.d.ts +21 -5
- package/Rendering/Core/Property2D.js +30 -2
- package/Rendering/Core/RenderWindowInteractor.js +7 -7
- package/Rendering/Core/Volume.d.ts +9 -0
- package/Rendering/Core.js +2 -0
- package/Rendering/OpenGL/Actor2D.js +74 -30
- package/Rendering/OpenGL/ForwardPass.js +11 -0
- package/Rendering/OpenGL/ImageMapper.js +1 -1
- package/Rendering/OpenGL/PolyDataMapper.js +8 -19
- package/Rendering/OpenGL/PolyDataMapper2D.js +667 -0
- package/Rendering/OpenGL/Profiles/All.js +1 -0
- package/Rendering/OpenGL/Profiles/Geometry.js +1 -0
- package/Rendering/OpenGL/RenderWindow.js +190 -106
- package/Rendering/OpenGL/ShaderProgram.js +0 -12
- package/Rendering/OpenGL/glsl/vtkPolyData2DFS.glsl.js +3 -0
- package/Rendering/OpenGL/glsl/vtkPolyData2DVS.glsl.js +3 -0
- package/Rendering/OpenGL.js +2 -0
- package/Rendering/Profiles/All.js +1 -0
- package/Rendering/Profiles/Geometry.js +1 -0
- package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createInlineWorkerFactory.js +17 -0
- package/_virtual/rollup-plugin-web-worker-loader__helper__funcToSource.js +18 -0
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +698 -2
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +274 -2
- package/interfaces.d.ts +66 -24
- package/package.json +1 -1
- package/types.d.ts +4 -1
- package/_virtual/rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js +0 -31
|
@@ -467,16 +467,10 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
467
467
|
|
|
468
468
|
if (model.renderable.getNumberOfClippingPlanes()) {
|
|
469
469
|
var numClipPlanes = model.renderable.getNumberOfClippingPlanes();
|
|
470
|
-
|
|
471
|
-
if (numClipPlanes
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
VSSource = vtkShaderProgram.substitute(VSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', 'uniform vec4 clipPlanes[6];', 'varying float clipDistancesVSOutput[6];']).result;
|
|
477
|
-
VSSource = vtkShaderProgram.substitute(VSSource, '//VTK::Clip::Impl', ['for (int planeNum = 0; planeNum < 6; planeNum++)', ' {', ' if (planeNum >= numClipPlanes)', ' {', ' break;', ' }', ' clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);', ' }']).result;
|
|
478
|
-
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', 'varying float clipDistancesVSOutput[6];']).result;
|
|
479
|
-
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::Clip::Impl', ['for (int planeNum = 0; planeNum < 6; planeNum++)', ' {', ' if (planeNum >= numClipPlanes)', ' {', ' break;', ' }', ' if (clipDistancesVSOutput[planeNum] < 0.0) discard;', ' }']).result;
|
|
470
|
+
VSSource = vtkShaderProgram.substitute(VSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', "uniform vec4 clipPlanes[".concat(numClipPlanes, "];"), "varying float clipDistancesVSOutput[".concat(numClipPlanes, "];")]).result;
|
|
471
|
+
VSSource = vtkShaderProgram.substitute(VSSource, '//VTK::Clip::Impl', ["for (int planeNum = 0; planeNum < ".concat(numClipPlanes, "; planeNum++)"), ' {', ' if (planeNum >= numClipPlanes)', ' {', ' break;', ' }', ' clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);', ' }']).result;
|
|
472
|
+
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::Clip::Dec', ['uniform int numClipPlanes;', "varying float clipDistancesVSOutput[".concat(numClipPlanes, "];")]).result;
|
|
473
|
+
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::Clip::Impl', ["for (int planeNum = 0; planeNum < ".concat(numClipPlanes, "; planeNum++)"), ' {', ' if (planeNum >= numClipPlanes)', ' {', ' break;', ' }', ' if (clipDistancesVSOutput[planeNum] < 0.0) discard;', ' }']).result;
|
|
480
474
|
}
|
|
481
475
|
|
|
482
476
|
shaders.Vertex = VSSource;
|
|
@@ -715,12 +709,6 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
715
709
|
if (model.renderable.getNumberOfClippingPlanes()) {
|
|
716
710
|
// add all the clipping planes
|
|
717
711
|
var numClipPlanes = model.renderable.getNumberOfClippingPlanes();
|
|
718
|
-
|
|
719
|
-
if (numClipPlanes > 6) {
|
|
720
|
-
vtkErrorMacro$1('OpenGL has a limit of 6 clipping planes');
|
|
721
|
-
numClipPlanes = 6;
|
|
722
|
-
}
|
|
723
|
-
|
|
724
712
|
var planeEquations = [];
|
|
725
713
|
|
|
726
714
|
for (var i = 0; i < numClipPlanes; i++) {
|
|
@@ -733,7 +721,7 @@ function vtkOpenGLPolyDataMapper(publicAPI, model) {
|
|
|
733
721
|
}
|
|
734
722
|
|
|
735
723
|
cellBO.getProgram().setUniformi('numClipPlanes', numClipPlanes);
|
|
736
|
-
cellBO.getProgram().setUniform4fv('clipPlanes',
|
|
724
|
+
cellBO.getProgram().setUniform4fv('clipPlanes', planeEquations);
|
|
737
725
|
}
|
|
738
726
|
|
|
739
727
|
if (model.internalColorTexture && cellBO.getProgram().isUniformUsed('texture1')) {
|
|
@@ -1281,9 +1269,10 @@ var newInstance = newInstance$1(extend, 'vtkOpenGLPolyDataMapper'); // ---------
|
|
|
1281
1269
|
|
|
1282
1270
|
var vtkOpenGLPolyDataMapper$1 = {
|
|
1283
1271
|
newInstance: newInstance,
|
|
1284
|
-
extend: extend
|
|
1272
|
+
extend: extend,
|
|
1273
|
+
primTypes: primTypes
|
|
1285
1274
|
}; // Register ourself to OpenGL backend if imported
|
|
1286
1275
|
|
|
1287
1276
|
registerOverride('vtkMapper', newInstance);
|
|
1288
1277
|
|
|
1289
|
-
export { vtkOpenGLPolyDataMapper$1 as default, extend, newInstance };
|
|
1278
|
+
export { vtkOpenGLPolyDataMapper$1 as default, extend, newInstance, primTypes };
|