@kitware/vtk.js 26.6.1 → 26.7.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var vtkSphereMapperVS = "//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkSphereMapperVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// this shader implements imposters in OpenGL for Spheres\n\nattribute vec4 vertexMC;\nattribute vec2 offsetMC;\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\nuniform mat3 normalMatrix; // transform model coordinate directions to view coordinates\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\nvarying vec4 vertexVCVSOutput;\nvarying float radiusVCVSOutput;\nvarying vec3 centerVCVSOutput;\n\nuniform int cameraParallel;\nuniform float scaleFactor;\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n // compute the projected vertex position\n vec2 scaledOffsetMC = scaleFactor * offsetMC;\n vertexVCVSOutput = MCVCMatrix * vertexMC;\n centerVCVSOutput = vertexVCVSOutput.xyz;\n radiusVCVSOutput = length(scaledOffsetMC)*0.5;\n\n // make the triangle face the camera\n if (cameraParallel == 0)\n {\n vec3 dir = normalize(-vertexVCVSOutput.xyz);\n vec3 base2 = normalize(cross(dir,vec3(1.0,0.0,0.0)));\n vec3 base1 = cross(base2,dir);\n vertexVCVSOutput.xyz = vertexVCVSOutput.xyz + scaledOffsetMC.x*base1 + scaledOffsetMC.y*base2;\n }\n else\n {\n // add in the offset\n vertexVCVSOutput.xy = vertexVCVSOutput.xy + scaledOffsetMC;\n }\n\n gl_Position = VCPCMatrix * vertexVCVSOutput;\n}\n";
|
|
1
|
+
var vtkSphereMapperVS = "//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkSphereMapperVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// this shader implements imposters in OpenGL for Spheres\n\nattribute vec4 vertexMC;\nattribute vec2 offsetMC;\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n//VTK::Picking::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\nuniform mat3 normalMatrix; // transform model coordinate directions to view coordinates\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\nvarying vec4 vertexVCVSOutput;\nvarying float radiusVCVSOutput;\nvarying vec3 centerVCVSOutput;\n\nuniform int cameraParallel;\nuniform float scaleFactor;\n\nvoid main()\n{\n //VTK::Picking::Impl\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n // compute the projected vertex position\n vec2 scaledOffsetMC = scaleFactor * offsetMC;\n vertexVCVSOutput = MCVCMatrix * vertexMC;\n centerVCVSOutput = vertexVCVSOutput.xyz;\n radiusVCVSOutput = length(scaledOffsetMC)*0.5;\n\n // make the triangle face the camera\n if (cameraParallel == 0)\n {\n vec3 dir = normalize(-vertexVCVSOutput.xyz);\n vec3 base2 = normalize(cross(dir,vec3(1.0,0.0,0.0)));\n vec3 base1 = cross(base2,dir);\n vertexVCVSOutput.xyz = vertexVCVSOutput.xyz + scaledOffsetMC.x*base1 + scaledOffsetMC.y*base2;\n }\n else\n {\n // add in the offset\n vertexVCVSOutput.xy = vertexVCVSOutput.xy + scaledOffsetMC;\n }\n\n gl_Position = VCPCMatrix * vertexVCVSOutput;\n}\n";
|
|
2
2
|
|
|
3
3
|
export { vtkSphereMapperVS as v };
|
|
@@ -256,27 +256,27 @@ function vtkGlyphRepresentation(publicAPI, model) {
|
|
|
256
256
|
|
|
257
257
|
|
|
258
258
|
function defaultValues(publicAPI, model, initialValues) {
|
|
259
|
-
var _initialValues$
|
|
259
|
+
var _initialValues$_pipel, _initialValues$_pipel2, _initialValues$_pipel3, _initialValues$_pipel4, _initialValues$_pipel5, _initialValues$_pipel6, _initialValues$_pipel7, _initialValues$_pipel8, _initialValues$applyM, _initialValues$applyM2, _initialValues$applyM3, _initialValues$applyM4, _initialValues$applyM5, _initialValues$applyM6, _initialValues$applyM7, _initialValues$applyM8, _initialValues$applyM9, _initialValues$applyM10, _initialValues$applyM11, _initialValues$applyM12, _initialValues$applyM13, _initialValues$applyM14, _initialValues$applyM15, _initialValues$applyM16, _initialValues$applyM17, _initialValues$applyM18, _initialValues$applyM19, _initialValues$applyM20;
|
|
260
260
|
|
|
261
261
|
return _objectSpread(_objectSpread({
|
|
262
262
|
defaultScale: 1
|
|
263
263
|
}, initialValues), {}, {
|
|
264
264
|
_pipeline: _objectSpread({
|
|
265
|
-
source: (_initialValues$
|
|
266
|
-
glyph: (_initialValues$
|
|
265
|
+
source: (_initialValues$_pipel = (_initialValues$_pipel2 = initialValues._pipeline) === null || _initialValues$_pipel2 === void 0 ? void 0 : _initialValues$_pipel2.source) !== null && _initialValues$_pipel !== void 0 ? _initialValues$_pipel : publicAPI,
|
|
266
|
+
glyph: (_initialValues$_pipel3 = (_initialValues$_pipel4 = initialValues._pipeline) === null || _initialValues$_pipel4 === void 0 ? void 0 : _initialValues$_pipel4.glyph) !== null && _initialValues$_pipel3 !== void 0 ? _initialValues$_pipel3 : // in case glyph was provided
|
|
267
267
|
vtkSphereSource.newInstance({
|
|
268
268
|
phiResolution: 8,
|
|
269
269
|
thetaResolution: 8
|
|
270
270
|
}),
|
|
271
|
-
mapper: (_initialValues$
|
|
271
|
+
mapper: (_initialValues$_pipel5 = (_initialValues$_pipel6 = initialValues._pipeline) === null || _initialValues$_pipel6 === void 0 ? void 0 : _initialValues$_pipel6.mapper) !== null && _initialValues$_pipel5 !== void 0 ? _initialValues$_pipel5 : // in case mapper was provided
|
|
272
272
|
vtkGlyph3DMapper.newInstance({
|
|
273
273
|
scalarMode: ScalarMode.USE_POINT_FIELD_DATA
|
|
274
274
|
}),
|
|
275
|
-
actor: (_initialValues$
|
|
275
|
+
actor: (_initialValues$_pipel7 = (_initialValues$_pipel8 = initialValues._pipeline) === null || _initialValues$_pipel8 === void 0 ? void 0 : _initialValues$_pipel8.actor) !== null && _initialValues$_pipel7 !== void 0 ? _initialValues$_pipel7 : // in case actor was provided
|
|
276
276
|
vtkActor.newInstance({
|
|
277
277
|
parentProp: publicAPI
|
|
278
278
|
})
|
|
279
|
-
}, initialValues.
|
|
279
|
+
}, initialValues._pipeline),
|
|
280
280
|
applyMixin: _objectSpread({
|
|
281
281
|
origin: (_initialValues$applyM = (_initialValues$applyM2 = initialValues.applyMixin) === null || _initialValues$applyM2 === void 0 ? void 0 : _initialValues$applyM2.origin) !== null && _initialValues$applyM !== void 0 ? _initialValues$applyM : origin(),
|
|
282
282
|
noPosition: (_initialValues$applyM3 = (_initialValues$applyM4 = initialValues.applyMixin) === null || _initialValues$applyM4 === void 0 ? void 0 : _initialValues$applyM4.noPosition) !== null && _initialValues$applyM3 !== void 0 ? _initialValues$applyM3 : noPosition(),
|