@kitware/vtk.js 20.1.2 → 20.2.1
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.d.ts +14 -2
- package/Common/Core/Base64.js +31 -2
- package/Common/Core/Math/index.js +3 -3
- package/Common/Core/Math.d.ts +128 -128
- package/Common/Core/Math.js +1 -1
- package/Common/Core/MatrixBuilder.js +39 -41
- package/Common/DataModel/ImageData.js +12 -14
- package/Common/Transform/LandmarkTransform.js +6 -7
- package/Filters/General/PaintFilter/PaintFilter.worker.js +8 -8
- package/Filters/General/PaintFilter.js +11 -11
- package/Filters/Sources/PlaneSource.js +12 -13
- package/IO/Core/BinaryHelper.js +2 -4
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +2 -2
- package/IO/Core/ZipMultiDataSetReader.js +1 -1
- package/IO/Core/ZipMultiDataSetWriter.js +1 -1
- package/IO/Geometry/STLWriter.js +4 -4
- package/IO/Misc/SkyboxReader.js +1 -1
- package/IO/XML/XMLReader.js +3 -4
- package/IO/XML/XMLWriter.js +5 -6
- package/Imaging/Core/ImageReslice.js +18 -19
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +27 -28
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +8 -9
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +14 -15
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +12 -13
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +5 -6
- package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +8 -9
- package/Rendering/Core/Actor.js +3 -4
- package/Rendering/Core/Camera.js +81 -84
- package/Rendering/Core/CellPicker.js +2 -2
- package/Rendering/Core/CubeAxesActor.js +32 -33
- package/Rendering/Core/Follower.js +20 -21
- package/Rendering/Core/Glyph3DMapper.js +30 -32
- package/Rendering/Core/ImageMapper.js +2 -2
- package/Rendering/Core/ImageSlice.js +5 -6
- package/Rendering/Core/Picker.js +5 -6
- package/Rendering/Core/PixelSpaceCallbackMapper.js +3 -4
- package/Rendering/Core/Prop3D.js +24 -25
- package/Rendering/Core/Renderer.js +11 -12
- package/Rendering/Core/ScalarBarActor.js +32 -33
- package/Rendering/Core/Volume.js +3 -4
- package/Rendering/OpenGL/Actor.js +9 -10
- package/Rendering/OpenGL/Camera.js +8 -9
- package/Rendering/OpenGL/CellArrayBufferObject.js +6 -8
- package/Rendering/OpenGL/Glyph3DMapper.js +8 -9
- package/Rendering/OpenGL/ImageMapper.js +7 -7
- package/Rendering/OpenGL/ImageSlice.js +4 -4
- package/Rendering/OpenGL/PolyDataMapper.js +11 -13
- package/Rendering/OpenGL/RenderWindow.d.ts +37 -1
- package/Rendering/OpenGL/ShaderCache.js +1 -1
- package/Rendering/OpenGL/Skybox.js +4 -5
- package/Rendering/OpenGL/SphereMapper.js +2 -2
- package/Rendering/OpenGL/StickMapper.js +3 -4
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +1 -1
- package/Rendering/OpenGL/Volume.js +6 -7
- package/Rendering/OpenGL/VolumeMapper.js +47 -49
- package/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js +1 -1
- package/Rendering/WebGPU/Actor.js +8 -8
- package/Rendering/WebGPU/Camera.js +8 -8
- package/Rendering/WebGPU/ImageMapper.js +18 -19
- package/Rendering/WebGPU/ImageSlice.js +9 -9
- package/Rendering/WebGPU/PolyDataMapper.js +3 -4
- package/Rendering/WebGPU/Renderer.js +6 -7
- package/Rendering/WebGPU/Texture.js +10 -9
- package/Rendering/WebGPU/Volume.js +3 -3
- package/Rendering/WebGPU/VolumePassFSQ.js +10 -10
- package/ThirdParty/index.js +2 -2
- package/Widgets/Manipulators/TrackballManipulator.js +5 -6
- package/Widgets/Representations/ArrowHandleRepresentation.js +10 -12
- package/Widgets/Representations/CircleContextRepresentation.js +4 -5
- package/Widgets/Representations/RectangleContextRepresentation.js +3 -3
- package/Widgets/Widgets3D/EllipseWidget/behavior.js +5 -5
- package/Widgets/Widgets3D/ImageCroppingWidget/helpers.js +6 -8
- package/Widgets/Widgets3D/PaintWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/ResliceCursorWidget.js +6 -7
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +10 -10
- package/Widgets/Widgets3D/SplineWidget/behavior.js +5 -5
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +1 -1
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/package.json +2 -2
- package/vtk.js +2 -2
- package/_vendor/base64-js/index.js_commonjs-exports.js +0 -1
- package/_vendor/blueimp-md5/js/md5.js_commonjs-module.js +0 -3
- package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/implementation.browser.js_commonjs-module.js +0 -3
- package/_vendor/globalthis/implementation.browser.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/shim.js_commonjs-proxy.js +0 -2
- package/_vendor/jszip/dist/jszip.min.js_commonjs-module.js +0 -3
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/alea.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/alea.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/tychei.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/tychei.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xor128.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xor128.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/seedrandom.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/seedrandom.js_commonjs-proxy.js +0 -1
- package/_vendor/webworker-promise/lib/register.js_commonjs-module.js +0 -3
- package/_vendor/webworker-promise/lib/tiny-emitter.js_commonjs-proxy.js +0 -1
- package/_vendor/webworker-promise/src/tiny-emitter.js_commonjs-proxy.js +0 -1
- package/_vendor/xmlbuilder2/lib/xmlbuilder2.min.js_commonjs-module.js +0 -3
- package/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js +0 -6
- package/_virtual/commonjsHelpers.js +0 -22
- package/_virtual/polyfill-node.buffer.js +0 -1971
- package/_virtual/polyfill-node.global.js +0 -5
- package/_virtual/rollup_plugin_ignore_empty_module_placeholder.js +0 -8
- package/vendor/base64-js/index.js +0 -72
- package/vendor/blueimp-md5/js/md5.js +0 -402
- package/vendor/d3-array/src/array.js +0 -1
- package/vendor/d3-array/src/ascending.js +0 -5
- package/vendor/d3-array/src/bin.js +0 -1
- package/vendor/d3-array/src/bisect.js +0 -10
- package/vendor/d3-array/src/bisector.js +0 -46
- package/vendor/d3-array/src/constant.js +0 -1
- package/vendor/d3-array/src/count.js +0 -1
- package/vendor/d3-array/src/cross.js +0 -1
- package/vendor/d3-array/src/cumsum.js +0 -1
- package/vendor/d3-array/src/descending.js +0 -1
- package/vendor/d3-array/src/deviation.js +0 -1
- package/vendor/d3-array/src/difference.js +0 -1
- package/vendor/d3-array/src/disjoint.js +0 -1
- package/vendor/d3-array/src/every.js +0 -1
- package/vendor/d3-array/src/extent.js +0 -1
- package/vendor/d3-array/src/filter.js +0 -1
- package/vendor/d3-array/src/fsum.js +0 -1
- package/vendor/d3-array/src/greatest.js +0 -1
- package/vendor/d3-array/src/greatestIndex.js +0 -1
- package/vendor/d3-array/src/group.js +0 -1
- package/vendor/d3-array/src/groupSort.js +0 -1
- package/vendor/d3-array/src/identity.js +0 -1
- package/vendor/d3-array/src/index.js +0 -1
- package/vendor/d3-array/src/intersection.js +0 -1
- package/vendor/d3-array/src/least.js +0 -1
- package/vendor/d3-array/src/leastIndex.js +0 -1
- package/vendor/d3-array/src/map.js +0 -1
- package/vendor/d3-array/src/max.js +0 -1
- package/vendor/d3-array/src/maxIndex.js +0 -1
- package/vendor/d3-array/src/mean.js +0 -1
- package/vendor/d3-array/src/median.js +0 -1
- package/vendor/d3-array/src/merge.js +0 -1
- package/vendor/d3-array/src/min.js +0 -1
- package/vendor/d3-array/src/minIndex.js +0 -1
- package/vendor/d3-array/src/mode.js +0 -1
- package/vendor/d3-array/src/nice.js +0 -1
- package/vendor/d3-array/src/number.js +0 -5
- package/vendor/d3-array/src/pairs.js +0 -1
- package/vendor/d3-array/src/permute.js +0 -1
- package/vendor/d3-array/src/quantile.js +0 -1
- package/vendor/d3-array/src/quickselect.js +0 -1
- package/vendor/d3-array/src/range.js +0 -1
- package/vendor/d3-array/src/reduce.js +0 -1
- package/vendor/d3-array/src/reverse.js +0 -1
- package/vendor/d3-array/src/scan.js +0 -1
- package/vendor/d3-array/src/set.js +0 -1
- package/vendor/d3-array/src/shuffle.js +0 -1
- package/vendor/d3-array/src/some.js +0 -1
- package/vendor/d3-array/src/sort.js +0 -1
- package/vendor/d3-array/src/subset.js +0 -1
- package/vendor/d3-array/src/sum.js +0 -1
- package/vendor/d3-array/src/superset.js +0 -1
- package/vendor/d3-array/src/threshold/freedmanDiaconis.js +0 -1
- package/vendor/d3-array/src/threshold/scott.js +0 -1
- package/vendor/d3-array/src/threshold/sturges.js +0 -1
- package/vendor/d3-array/src/ticks.js +0 -56
- package/vendor/d3-array/src/transpose.js +0 -1
- package/vendor/d3-array/src/union.js +0 -1
- package/vendor/d3-array/src/variance.js +0 -1
- package/vendor/d3-array/src/zip.js +0 -1
- package/vendor/d3-color/src/color.js +0 -373
- package/vendor/d3-color/src/cubehelix.js +0 -1
- package/vendor/d3-color/src/define.js +0 -12
- package/vendor/d3-color/src/index.js +0 -1
- package/vendor/d3-color/src/lab.js +0 -1
- package/vendor/d3-color/src/math.js +0 -1
- package/vendor/d3-format/src/defaultLocale.js +0 -20
- package/vendor/d3-format/src/exponent.js +0 -7
- package/vendor/d3-format/src/formatDecimal.js +0 -22
- package/vendor/d3-format/src/formatGroup.js +0 -20
- package/vendor/d3-format/src/formatNumerals.js +0 -9
- package/vendor/d3-format/src/formatPrefixAuto.js +0 -18
- package/vendor/d3-format/src/formatRounded.js +0 -13
- package/vendor/d3-format/src/formatSpecifier.js +0 -49
- package/vendor/d3-format/src/formatTrim.js +0 -13
- package/vendor/d3-format/src/formatTypes.js +0 -21
- package/vendor/d3-format/src/identity.js +0 -5
- package/vendor/d3-format/src/index.js +0 -1
- package/vendor/d3-format/src/locale.js +0 -150
- package/vendor/d3-format/src/precisionFixed.js +0 -7
- package/vendor/d3-format/src/precisionPrefix.js +0 -7
- package/vendor/d3-format/src/precisionRound.js +0 -8
- package/vendor/d3-interpolate/src/array.js +0 -19
- package/vendor/d3-interpolate/src/basis.js +0 -1
- package/vendor/d3-interpolate/src/basisClosed.js +0 -1
- package/vendor/d3-interpolate/src/color.js +0 -26
- package/vendor/d3-interpolate/src/constant.js +0 -3
- package/vendor/d3-interpolate/src/cubehelix.js +0 -1
- package/vendor/d3-interpolate/src/date.js +0 -8
- package/vendor/d3-interpolate/src/discrete.js +0 -1
- package/vendor/d3-interpolate/src/hcl.js +0 -1
- package/vendor/d3-interpolate/src/hsl.js +0 -1
- package/vendor/d3-interpolate/src/hue.js +0 -1
- package/vendor/d3-interpolate/src/index.js +0 -1
- package/vendor/d3-interpolate/src/lab.js +0 -1
- package/vendor/d3-interpolate/src/number.js +0 -7
- package/vendor/d3-interpolate/src/numberArray.js +0 -16
- package/vendor/d3-interpolate/src/object.js +0 -25
- package/vendor/d3-interpolate/src/piecewise.js +0 -1
- package/vendor/d3-interpolate/src/quantize.js +0 -1
- package/vendor/d3-interpolate/src/rgb.js +0 -26
- package/vendor/d3-interpolate/src/round.js +0 -7
- package/vendor/d3-interpolate/src/string.js +0 -66
- package/vendor/d3-interpolate/src/transform/decompose.js +0 -1
- package/vendor/d3-interpolate/src/transform/index.js +0 -1
- package/vendor/d3-interpolate/src/transform/parse.js +0 -1
- package/vendor/d3-interpolate/src/value.js +0 -24
- package/vendor/d3-interpolate/src/zoom.js +0 -1
- package/vendor/d3-scale/src/band.js +0 -1
- package/vendor/d3-scale/src/constant.js +0 -7
- package/vendor/d3-scale/src/continuous.js +0 -129
- package/vendor/d3-scale/src/diverging.js +0 -1
- package/vendor/d3-scale/src/identity.js +0 -1
- package/vendor/d3-scale/src/index.js +0 -1
- package/vendor/d3-scale/src/init.js +0 -10
- package/vendor/d3-scale/src/linear.js +0 -72
- package/vendor/d3-scale/src/log.js +0 -1
- package/vendor/d3-scale/src/nice.js +0 -1
- package/vendor/d3-scale/src/number.js +0 -5
- package/vendor/d3-scale/src/ordinal.js +0 -1
- package/vendor/d3-scale/src/pow.js +0 -1
- package/vendor/d3-scale/src/quantile.js +0 -1
- package/vendor/d3-scale/src/quantize.js +0 -1
- package/vendor/d3-scale/src/radial.js +0 -1
- package/vendor/d3-scale/src/sequential.js +0 -1
- package/vendor/d3-scale/src/sequentialQuantile.js +0 -1
- package/vendor/d3-scale/src/symlog.js +0 -1
- package/vendor/d3-scale/src/threshold.js +0 -1
- package/vendor/d3-scale/src/tickFormat.js +0 -35
- package/vendor/d3-scale/src/time.js +0 -1
- package/vendor/d3-scale/src/utcTime.js +0 -1
- package/vendor/d3-time/src/day.js +0 -1
- package/vendor/d3-time/src/duration.js +0 -1
- package/vendor/d3-time/src/hour.js +0 -1
- package/vendor/d3-time/src/index.js +0 -1
- package/vendor/d3-time/src/interval.js +0 -1
- package/vendor/d3-time/src/millisecond.js +0 -1
- package/vendor/d3-time/src/minute.js +0 -1
- package/vendor/d3-time/src/month.js +0 -1
- package/vendor/d3-time/src/second.js +0 -1
- package/vendor/d3-time/src/ticks.js +0 -1
- package/vendor/d3-time/src/utcDay.js +0 -1
- package/vendor/d3-time/src/utcHour.js +0 -1
- package/vendor/d3-time/src/utcMinute.js +0 -1
- package/vendor/d3-time/src/utcMonth.js +0 -1
- package/vendor/d3-time/src/utcWeek.js +0 -1
- package/vendor/d3-time/src/utcYear.js +0 -1
- package/vendor/d3-time/src/week.js +0 -1
- package/vendor/d3-time/src/year.js +0 -1
- package/vendor/d3-time-format/src/defaultLocale.js +0 -1
- package/vendor/d3-time-format/src/index.js +0 -1
- package/vendor/d3-time-format/src/isoFormat.js +0 -1
- package/vendor/d3-time-format/src/isoParse.js +0 -1
- package/vendor/d3-time-format/src/locale.js +0 -1
- package/vendor/define-properties/index.js +0 -60
- package/vendor/gl-matrix/esm/common.js +0 -30
- package/vendor/gl-matrix/esm/index.js +0 -1
- package/vendor/gl-matrix/esm/mat2.js +0 -1
- package/vendor/gl-matrix/esm/mat2d.js +0 -1
- package/vendor/gl-matrix/esm/mat3.js +0 -817
- package/vendor/gl-matrix/esm/mat4.js +0 -1868
- package/vendor/gl-matrix/esm/quat.js +0 -330
- package/vendor/gl-matrix/esm/quat2.js +0 -1
- package/vendor/gl-matrix/esm/vec2.js +0 -1
- package/vendor/gl-matrix/esm/vec3.js +0 -842
- package/vendor/gl-matrix/esm/vec4.js +0 -153
- package/vendor/globalthis/implementation.browser.js +0 -11
- package/vendor/globalthis/index.js +0 -25
- package/vendor/globalthis/polyfill.js +0 -14
- package/vendor/globalthis/shim.js +0 -25
- package/vendor/internmap/src/index.js +0 -1
- package/vendor/jszip/dist/jszip.min.js +0 -11
- package/vendor/object-keys/implementation.js +0 -124
- package/vendor/object-keys/index.js +0 -35
- package/vendor/object-keys/isArguments.js +0 -17
- package/vendor/pako/dist/pako.esm.mjs.js +0 -6707
- package/vendor/seedrandom/index.js +0 -77
- package/vendor/seedrandom/lib/alea.js +0 -117
- package/vendor/seedrandom/lib/tychei.js +0 -105
- package/vendor/seedrandom/lib/xor128.js +0 -84
- package/vendor/seedrandom/lib/xor4096.js +0 -150
- package/vendor/seedrandom/lib/xorshift7.js +0 -101
- package/vendor/seedrandom/lib/xorwow.js +0 -89
- package/vendor/seedrandom/seedrandom.js +0 -256
- package/vendor/webworker-promise/lib/register.js +0 -158
- package/vendor/webworker-promise/lib/tiny-emitter.js +0 -89
- package/vendor/webworker-promise/src/index.js +0 -110
- package/vendor/webworker-promise/src/tiny-emitter.js +0 -51
- package/vendor/xmlbuilder2/lib/xmlbuilder2.min.js +0 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { newInstance as newInstance$1, obj, setGet, vtkWarningMacro as vtkWarningMacro$1, vtkErrorMacro as vtkErrorMacro$1 } from '../../macros.js';
|
|
3
|
+
import { mat4, mat3, vec3 } from 'gl-matrix';
|
|
3
4
|
import vtkDataArray from '../../Common/Core/DataArray.js';
|
|
4
5
|
import { VtkDataTypes } from '../../Common/Core/DataArray/Constants.js';
|
|
5
6
|
import vtkHelper from './Helper.js';
|
|
@@ -16,9 +17,6 @@ import { BlendMode } from '../Core/VolumeMapper/Constants.js';
|
|
|
16
17
|
import { v as vtkVolumeVS } from './glsl/vtkVolumeVS.glsl.js';
|
|
17
18
|
import { v as vtkVolumeFS } from './glsl/vtkVolumeFS.glsl.js';
|
|
18
19
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
19
|
-
import { i as identity, m as multiply, g as invert } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
20
|
-
import { i as identity$1, m as multiply$1 } from '../../vendor/gl-matrix/esm/mat3.js';
|
|
21
|
-
import { s as set, l as length, t as transformMat4, n as normalize, b as scale, o as divide, p as transformMat3, d as dot } from '../../vendor/gl-matrix/esm/vec3.js';
|
|
22
20
|
|
|
23
21
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
24
22
|
|
|
@@ -139,8 +137,8 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
139
137
|
var ext = model.currentInput.getExtent();
|
|
140
138
|
var spc = model.currentInput.getSpacing();
|
|
141
139
|
var vsize = new Float64Array(3);
|
|
142
|
-
set(vsize, (ext[1] - ext[0]) * spc[0], (ext[3] - ext[2]) * spc[1], (ext[5] - ext[4]) * spc[2]);
|
|
143
|
-
var maxSamples = length(vsize) / model.renderable.getSampleDistance();
|
|
140
|
+
vec3.set(vsize, (ext[1] - ext[0]) * spc[0], (ext[3] - ext[2]) * spc[1], (ext[5] - ext[4]) * spc[2]);
|
|
141
|
+
var maxSamples = vec3.length(vsize) / model.renderable.getSampleDistance();
|
|
144
142
|
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::MaximumSamplesValue', "".concat(Math.ceil(maxSamples))).result; // set light complexity
|
|
145
143
|
|
|
146
144
|
FSSource = vtkShaderProgram.substitute(FSSource, '//VTK::LightComplexity', "#define vtkLightComplexity ".concat(model.lastLightComplexity)).result; // if using gradient opacity define that
|
|
@@ -278,8 +276,8 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
278
276
|
var ext = model.currentInput.getExtent();
|
|
279
277
|
var spc = model.currentInput.getSpacing();
|
|
280
278
|
var vsize = new Float64Array(3);
|
|
281
|
-
set(vsize, (ext[1] - ext[0]) * spc[0], (ext[3] - ext[2]) * spc[1], (ext[5] - ext[4]) * spc[2]);
|
|
282
|
-
var maxSamples = length(vsize) / model.renderable.getSampleDistance();
|
|
279
|
+
vec3.set(vsize, (ext[1] - ext[0]) * spc[0], (ext[3] - ext[2]) * spc[1], (ext[5] - ext[4]) * spc[2]);
|
|
280
|
+
var maxSamples = vec3.length(vsize) / model.renderable.getSampleDistance();
|
|
283
281
|
var state = {
|
|
284
282
|
interpolationType: actor.getProperty().getInterpolationType(),
|
|
285
283
|
useLabelOutline: actor.getProperty().getUseLabelOutline(),
|
|
@@ -384,7 +382,7 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
384
382
|
// // E.g., WCPC == world to projection coordinate transformation
|
|
385
383
|
var keyMats = model.openGLCamera.getKeyMatrices(ren);
|
|
386
384
|
var actMats = model.openGLVolume.getKeyMatrices();
|
|
387
|
-
multiply(model.modelToView, keyMats.wcvc, actMats.mcwc);
|
|
385
|
+
mat4.multiply(model.modelToView, keyMats.wcvc, actMats.mcwc);
|
|
388
386
|
var program = cellBO.getProgram();
|
|
389
387
|
var cam = model.openGLCamera.getRenderable();
|
|
390
388
|
var crange = cam.getClippingRange();
|
|
@@ -403,22 +401,22 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
403
401
|
var dcymax = -1.0;
|
|
404
402
|
|
|
405
403
|
for (var i = 0; i < 8; ++i) {
|
|
406
|
-
set(pos, bounds[i % 2], bounds[2 + Math.floor(i / 2) % 2], bounds[4 + Math.floor(i / 4)]);
|
|
407
|
-
transformMat4(pos, pos, model.modelToView);
|
|
404
|
+
vec3.set(pos, bounds[i % 2], bounds[2 + Math.floor(i / 2) % 2], bounds[4 + Math.floor(i / 4)]);
|
|
405
|
+
vec3.transformMat4(pos, pos, model.modelToView);
|
|
408
406
|
|
|
409
407
|
if (!cam.getParallelProjection()) {
|
|
410
|
-
normalize(dir, pos); // now find the projection of this point onto a
|
|
408
|
+
vec3.normalize(dir, pos); // now find the projection of this point onto a
|
|
411
409
|
// nearZ distance plane. Since the camera is at 0,0,0
|
|
412
410
|
// in VC the ray is just t*pos and
|
|
413
411
|
// t is -nearZ/dir.z
|
|
414
412
|
// intersection becomes pos.x/pos.z
|
|
415
413
|
|
|
416
414
|
var t = -crange[0] / pos[2];
|
|
417
|
-
scale(pos, dir, t);
|
|
415
|
+
vec3.scale(pos, dir, t);
|
|
418
416
|
} // now convert to DC
|
|
419
417
|
|
|
420
418
|
|
|
421
|
-
transformMat4(pos, pos, keyMats.vcpc);
|
|
419
|
+
vec3.transformMat4(pos, pos, keyMats.vcpc);
|
|
422
420
|
dcxmin = Math.min(pos[0], dcxmin);
|
|
423
421
|
dcxmax = Math.max(pos[0], dcxmax);
|
|
424
422
|
dcymin = Math.min(pos[1], dcymin);
|
|
@@ -437,26 +435,26 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
437
435
|
var ext = model.currentInput.getExtent();
|
|
438
436
|
var spc = model.currentInput.getSpacing();
|
|
439
437
|
var vsize = new Float64Array(3);
|
|
440
|
-
set(vsize, (ext[1] - ext[0] + 1) * spc[0], (ext[3] - ext[2] + 1) * spc[1], (ext[5] - ext[4] + 1) * spc[2]);
|
|
438
|
+
vec3.set(vsize, (ext[1] - ext[0] + 1) * spc[0], (ext[3] - ext[2] + 1) * spc[1], (ext[5] - ext[4] + 1) * spc[2]);
|
|
441
439
|
program.setUniform3f('vSpacing', spc[0], spc[1], spc[2]);
|
|
442
|
-
set(pos, ext[0], ext[2], ext[4]);
|
|
440
|
+
vec3.set(pos, ext[0], ext[2], ext[4]);
|
|
443
441
|
model.currentInput.indexToWorldVec3(pos, pos);
|
|
444
|
-
transformMat4(pos, pos, model.modelToView);
|
|
442
|
+
vec3.transformMat4(pos, pos, model.modelToView);
|
|
445
443
|
program.setUniform3f('vOriginVC', pos[0], pos[1], pos[2]); // apply the image directions
|
|
446
444
|
|
|
447
445
|
var i2wmat4 = model.currentInput.getIndexToWorld();
|
|
448
|
-
multiply(model.idxToView, model.modelToView, i2wmat4);
|
|
449
|
-
multiply
|
|
450
|
-
multiply
|
|
451
|
-
var maxSamples = length(vsize) / model.renderable.getSampleDistance();
|
|
446
|
+
mat4.multiply(model.idxToView, model.modelToView, i2wmat4);
|
|
447
|
+
mat3.multiply(model.idxNormalMatrix, keyMats.normalMatrix, actMats.normalMatrix);
|
|
448
|
+
mat3.multiply(model.idxNormalMatrix, model.idxNormalMatrix, model.currentInput.getDirection());
|
|
449
|
+
var maxSamples = vec3.length(vsize) / model.renderable.getSampleDistance();
|
|
452
450
|
|
|
453
451
|
if (maxSamples > model.renderable.getMaximumSamplesPerRay()) {
|
|
454
452
|
vtkWarningMacro("The number of steps required ".concat(Math.ceil(maxSamples), " is larger than the\n specified maximum number of steps ").concat(model.renderable.getMaximumSamplesPerRay(), ".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));
|
|
455
453
|
}
|
|
456
454
|
|
|
457
455
|
var vctoijk = new Float64Array(3);
|
|
458
|
-
set(vctoijk, 1.0, 1.0, 1.0);
|
|
459
|
-
divide(vctoijk, vctoijk, vsize);
|
|
456
|
+
vec3.set(vctoijk, 1.0, 1.0, 1.0);
|
|
457
|
+
vec3.divide(vctoijk, vctoijk, vsize);
|
|
460
458
|
program.setUniform3f('vVCToIJK', vctoijk[0], vctoijk[1], vctoijk[2]);
|
|
461
459
|
program.setUniform3i('volumeDimensions', dims[0], dims[1], dims[2]);
|
|
462
460
|
|
|
@@ -478,39 +476,39 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
478
476
|
switch (_i) {
|
|
479
477
|
default:
|
|
480
478
|
case 0:
|
|
481
|
-
set(normal, 1.0, 0.0, 0.0);
|
|
482
|
-
set(pos2, ext[1], ext[3], ext[5]);
|
|
479
|
+
vec3.set(normal, 1.0, 0.0, 0.0);
|
|
480
|
+
vec3.set(pos2, ext[1], ext[3], ext[5]);
|
|
483
481
|
break;
|
|
484
482
|
|
|
485
483
|
case 1:
|
|
486
|
-
set(normal, -1.0, 0.0, 0.0);
|
|
487
|
-
set(pos2, ext[0], ext[2], ext[4]);
|
|
484
|
+
vec3.set(normal, -1.0, 0.0, 0.0);
|
|
485
|
+
vec3.set(pos2, ext[0], ext[2], ext[4]);
|
|
488
486
|
break;
|
|
489
487
|
|
|
490
488
|
case 2:
|
|
491
|
-
set(normal, 0.0, 1.0, 0.0);
|
|
492
|
-
set(pos2, ext[1], ext[3], ext[5]);
|
|
489
|
+
vec3.set(normal, 0.0, 1.0, 0.0);
|
|
490
|
+
vec3.set(pos2, ext[1], ext[3], ext[5]);
|
|
493
491
|
break;
|
|
494
492
|
|
|
495
493
|
case 3:
|
|
496
|
-
set(normal, 0.0, -1.0, 0.0);
|
|
497
|
-
set(pos2, ext[0], ext[2], ext[4]);
|
|
494
|
+
vec3.set(normal, 0.0, -1.0, 0.0);
|
|
495
|
+
vec3.set(pos2, ext[0], ext[2], ext[4]);
|
|
498
496
|
break;
|
|
499
497
|
|
|
500
498
|
case 4:
|
|
501
|
-
set(normal, 0.0, 0.0, 1.0);
|
|
502
|
-
set(pos2, ext[1], ext[3], ext[5]);
|
|
499
|
+
vec3.set(normal, 0.0, 0.0, 1.0);
|
|
500
|
+
vec3.set(pos2, ext[1], ext[3], ext[5]);
|
|
503
501
|
break;
|
|
504
502
|
|
|
505
503
|
case 5:
|
|
506
|
-
set(normal, 0.0, 0.0, -1.0);
|
|
507
|
-
set(pos2, ext[0], ext[2], ext[4]);
|
|
504
|
+
vec3.set(normal, 0.0, 0.0, -1.0);
|
|
505
|
+
vec3.set(pos2, ext[0], ext[2], ext[4]);
|
|
508
506
|
break;
|
|
509
507
|
}
|
|
510
508
|
|
|
511
|
-
transformMat3(normal, normal, model.idxNormalMatrix);
|
|
512
|
-
transformMat4(pos2, pos2, model.idxToView);
|
|
513
|
-
var dist = -1.0 * dot(pos2, normal); // we have the plane in view coordinates
|
|
509
|
+
vec3.transformMat3(normal, normal, model.idxNormalMatrix);
|
|
510
|
+
vec3.transformMat4(pos2, pos2, model.idxToView);
|
|
511
|
+
var dist = -1.0 * vec3.dot(pos2, normal); // we have the plane in view coordinates
|
|
514
512
|
// specify the planes in view coordinates
|
|
515
513
|
|
|
516
514
|
program.setUniform3f("vPlaneNormal".concat(_i), normal[0], normal[1], normal[2]);
|
|
@@ -521,7 +519,7 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
521
519
|
var worldToIndex = image.getWorldToIndex();
|
|
522
520
|
program.setUniformMatrix('vWCtoIDX', worldToIndex); // Get the projection coordinate to world coordinate transformation matrix.
|
|
523
521
|
|
|
524
|
-
invert(model.projectionToWorld, keyMats.wcpc);
|
|
522
|
+
mat4.invert(model.projectionToWorld, keyMats.wcpc);
|
|
525
523
|
program.setUniformMatrix('PCWCMatrix', model.projectionToWorld);
|
|
526
524
|
var size = publicAPI.getRenderTargetSize();
|
|
527
525
|
program.setUniformf('vpWidth', size[0]);
|
|
@@ -529,7 +527,7 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
529
527
|
}
|
|
530
528
|
}
|
|
531
529
|
|
|
532
|
-
invert(model.projectionToView, keyMats.vcpc);
|
|
530
|
+
mat4.invert(model.projectionToView, keyMats.vcpc);
|
|
533
531
|
program.setUniformMatrix('PCVCMatrix', model.projectionToView); // handle lighting values
|
|
534
532
|
|
|
535
533
|
switch (model.lastLightComplexity) {
|
|
@@ -559,8 +557,8 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
559
557
|
lightColor[2] = dColor[2] * intensity;
|
|
560
558
|
program.setUniform3fArray("lightColor".concat(lightNum), lightColor);
|
|
561
559
|
var ldir = light.getDirection();
|
|
562
|
-
set(normal, ldir[0], ldir[1], ldir[2]);
|
|
563
|
-
transformMat3(normal, normal, keyMats.normalMatrix);
|
|
560
|
+
vec3.set(normal, ldir[0], ldir[1], ldir[2]);
|
|
561
|
+
vec3.transformMat3(normal, normal, keyMats.normalMatrix);
|
|
564
562
|
program.setUniform3f("lightDirectionVC".concat(lightNum), normal[0], normal[1], normal[2]); // camera DOP is 0,0,-1.0 in VC
|
|
565
563
|
|
|
566
564
|
var halfAngle = [-0.5 * normal[0], -0.5 * normal[1], -0.5 * (normal[2] - 1.0)];
|
|
@@ -668,9 +666,9 @@ function vtkOpenGLVolumeMapper(publicAPI, model) {
|
|
|
668
666
|
for (var i = 0; i < clipPlaneSize; ++i) {
|
|
669
667
|
var clipPlaneNormal = clipPlanes[i].getNormal();
|
|
670
668
|
var clipPlanePos = clipPlanes[i].getOrigin();
|
|
671
|
-
transformMat3(clipPlaneNormal, clipPlaneNormal, keyMats.normalMatrix);
|
|
672
|
-
transformMat4(clipPlanePos, clipPlanePos, keyMats.wcvc);
|
|
673
|
-
var clipPlaneDist = -1.0 * dot(clipPlanePos, clipPlaneNormal);
|
|
669
|
+
vec3.transformMat3(clipPlaneNormal, clipPlaneNormal, keyMats.normalMatrix);
|
|
670
|
+
vec3.transformMat4(clipPlanePos, clipPlanePos, keyMats.wcvc);
|
|
671
|
+
var clipPlaneDist = -1.0 * vec3.dot(clipPlanePos, clipPlaneNormal);
|
|
674
672
|
clipPlaneNormals.push(clipPlaneNormal[0]);
|
|
675
673
|
clipPlaneNormals.push(clipPlaneNormal[1]);
|
|
676
674
|
clipPlaneNormals.push(clipPlaneNormal[2]);
|
|
@@ -1130,11 +1128,11 @@ function extend(publicAPI, model) {
|
|
|
1130
1128
|
model.jitterTexture.setWrapS(Wrap.REPEAT);
|
|
1131
1129
|
model.jitterTexture.setWrapT(Wrap.REPEAT);
|
|
1132
1130
|
model.framebuffer = vtkOpenGLFramebuffer.newInstance();
|
|
1133
|
-
model.idxToView = identity(new Float64Array(16));
|
|
1134
|
-
model.idxNormalMatrix = identity
|
|
1135
|
-
model.modelToView = identity(new Float64Array(16));
|
|
1136
|
-
model.projectionToView = identity(new Float64Array(16));
|
|
1137
|
-
model.projectionToWorld = identity(new Float64Array(16)); // Build VTK API
|
|
1131
|
+
model.idxToView = mat4.identity(new Float64Array(16));
|
|
1132
|
+
model.idxNormalMatrix = mat3.identity(new Float64Array(9));
|
|
1133
|
+
model.modelToView = mat4.identity(new Float64Array(16));
|
|
1134
|
+
model.projectionToView = mat4.identity(new Float64Array(16));
|
|
1135
|
+
model.projectionToWorld = mat4.identity(new Float64Array(16)); // Build VTK API
|
|
1138
1136
|
|
|
1139
1137
|
setGet(publicAPI, model, ['context']); // Object methods
|
|
1140
1138
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var vtkPolyDataFS = "//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.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// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::
|
|
1
|
+
var vtkPolyDataFS = "//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.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// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Light::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n";
|
|
2
2
|
|
|
3
3
|
export { vtkPolyDataFS as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mat4 } from 'gl-matrix';
|
|
1
2
|
import macro from '../../macros.js';
|
|
2
3
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
3
4
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
4
|
-
import { j as transpose, i as identity, d as copy, g as invert, t as translate } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
5
5
|
|
|
6
6
|
// vtkWebGPUActor methods
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
@@ -84,25 +84,25 @@ function vtkWebGPUActor(publicAPI, model) {
|
|
|
84
84
|
model.bufferShift[0] = mcwc[3] - center[0];
|
|
85
85
|
model.bufferShift[1] = mcwc[7] - center[1];
|
|
86
86
|
model.bufferShift[2] = mcwc[11] - center[2];
|
|
87
|
-
transpose(model.keyMatrices.bcwc, mcwc);
|
|
87
|
+
mat4.transpose(model.keyMatrices.bcwc, mcwc);
|
|
88
88
|
|
|
89
89
|
if (model.renderable.getIsIdentity()) {
|
|
90
|
-
identity(model.keyMatrices.normalMatrix);
|
|
90
|
+
mat4.identity(model.keyMatrices.normalMatrix);
|
|
91
91
|
} else {
|
|
92
92
|
// we use bcwc BEFORE the translate below (just to get transposed mcvc)
|
|
93
|
-
copy(model.keyMatrices.normalMatrix, model.keyMatrices.bcwc); // zero out translation
|
|
93
|
+
mat4.copy(model.keyMatrices.normalMatrix, model.keyMatrices.bcwc); // zero out translation
|
|
94
94
|
|
|
95
95
|
model.keyMatrices.normalMatrix[3] = 0.0;
|
|
96
96
|
model.keyMatrices.normalMatrix[7] = 0.0;
|
|
97
97
|
model.keyMatrices.normalMatrix[11] = 0.0;
|
|
98
|
-
invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
99
|
-
transpose(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
98
|
+
mat4.invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
99
|
+
mat4.transpose(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
100
100
|
} // only meed the buffer shift to get to world
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
translate(model.keyMatrices.bcwc, model.keyMatrices.bcwc, [-model.bufferShift[0], -model.bufferShift[1], -model.bufferShift[2]]); // to get to stabilized we also need the center
|
|
103
|
+
mat4.translate(model.keyMatrices.bcwc, model.keyMatrices.bcwc, [-model.bufferShift[0], -model.bufferShift[1], -model.bufferShift[2]]); // to get to stabilized we also need the center
|
|
104
104
|
|
|
105
|
-
translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
105
|
+
mat4.translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
106
106
|
model.keyMatricesTime.modified();
|
|
107
107
|
}
|
|
108
108
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mat4 } from 'gl-matrix';
|
|
1
2
|
import macro from '../../macros.js';
|
|
2
3
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
3
4
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
4
|
-
import { d as copy, g as invert, j as transpose, t as translate, m as multiply } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
5
5
|
|
|
6
6
|
// vtkWebGPUCamera methods
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
@@ -17,25 +17,25 @@ function vtkWebGPUCamera(publicAPI, model) {
|
|
|
17
17
|
|
|
18
18
|
if (Math.max(webGPURenderWindow.getMTime(), publicAPI.getMTime(), ren.getMTime(), model.renderable.getMTime(), webGPURenderer.getStabilizedTime()) > model.keyMatrixTime.getMTime()) {
|
|
19
19
|
var wcvc = model.renderable.getViewMatrix();
|
|
20
|
-
copy(model.keyMatrices.normalMatrix, wcvc); // zero out translation
|
|
20
|
+
mat4.copy(model.keyMatrices.normalMatrix, wcvc); // zero out translation
|
|
21
21
|
|
|
22
22
|
model.keyMatrices.normalMatrix[3] = 0.0;
|
|
23
23
|
model.keyMatrices.normalMatrix[7] = 0.0;
|
|
24
24
|
model.keyMatrices.normalMatrix[11] = 0.0;
|
|
25
|
-
invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
26
|
-
transpose(model.keyMatrices.wcvc, wcvc);
|
|
25
|
+
mat4.invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
26
|
+
mat4.transpose(model.keyMatrices.wcvc, wcvc);
|
|
27
27
|
var center = webGPURenderer.getStabilizedCenterByReference();
|
|
28
|
-
translate(model.keyMatrices.scvc, model.keyMatrices.wcvc, center);
|
|
28
|
+
mat4.translate(model.keyMatrices.scvc, model.keyMatrices.wcvc, center);
|
|
29
29
|
var aspectRatio = webGPURenderer.getAspectRatio();
|
|
30
30
|
var vcpc = model.renderable.getProjectionMatrix(aspectRatio, -1, 1);
|
|
31
|
-
transpose(model.keyMatrices.vcpc, vcpc); // adjust due to WebGPU using a different coordinate system in Z
|
|
31
|
+
mat4.transpose(model.keyMatrices.vcpc, vcpc); // adjust due to WebGPU using a different coordinate system in Z
|
|
32
32
|
|
|
33
33
|
model.keyMatrices.vcpc[2] = 0.5 * vcpc[8] + 0.5 * vcpc[12];
|
|
34
34
|
model.keyMatrices.vcpc[6] = 0.5 * vcpc[9] + 0.5 * vcpc[13];
|
|
35
35
|
model.keyMatrices.vcpc[10] = 0.5 * vcpc[10] + 0.5 * vcpc[14];
|
|
36
36
|
model.keyMatrices.vcpc[14] = 0.5 * vcpc[11] + 0.5 * vcpc[15];
|
|
37
|
-
multiply(model.keyMatrices.scpc, model.keyMatrices.vcpc, model.keyMatrices.scvc);
|
|
38
|
-
invert(model.keyMatrices.pcsc, model.keyMatrices.scpc);
|
|
37
|
+
mat4.multiply(model.keyMatrices.scpc, model.keyMatrices.vcpc, model.keyMatrices.scvc);
|
|
38
|
+
mat4.invert(model.keyMatrices.pcsc, model.keyMatrices.scpc);
|
|
39
39
|
model.keyMatrixTime.modified();
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mat4, vec4 } from 'gl-matrix';
|
|
1
2
|
import Constants from '../Core/ImageMapper/Constants.js';
|
|
2
3
|
import { newInstance as newInstance$1, obj } from '../../macros.js';
|
|
3
4
|
import vtkWebGPUShaderCache from './ShaderCache.js';
|
|
@@ -8,8 +9,6 @@ import vtkWebGPUSampler from './Sampler.js';
|
|
|
8
9
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
9
10
|
import { InterpolationType } from '../Core/ImageProperty/Constants.js';
|
|
10
11
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
11
|
-
import { i as identity, t as translate, j as transpose, g as invert, m as multiply, s as scale } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
12
|
-
import { t as transformMat4, s as subtract } from '../../vendor/gl-matrix/esm/vec4.js';
|
|
13
12
|
|
|
14
13
|
var SlicingMode = Constants.SlicingMode;
|
|
15
14
|
var imgFragTemplate = "\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Image::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n //VTK::Image::Sample\n\n // var computedColor: vec4<f32> = vec4<f32>(1.0,0.7, 0.5, 1.0);\n\n//VTK::RenderEncoder::Impl\n\n return output;\n}\n"; // ----------------------------------------------------------------------------
|
|
@@ -97,25 +96,25 @@ function vtkWebGPUImageMapper(publicAPI, model) {
|
|
|
97
96
|
// compute the SCTCMatrix
|
|
98
97
|
var image = volMapr.getInputData();
|
|
99
98
|
var center = model.WebGPURenderer.getStabilizedCenterByReference();
|
|
100
|
-
identity(tmpMat4);
|
|
101
|
-
translate(tmpMat4, tmpMat4, center); // tmpMat4 is now SC->World
|
|
99
|
+
mat4.identity(tmpMat4);
|
|
100
|
+
mat4.translate(tmpMat4, tmpMat4, center); // tmpMat4 is now SC->World
|
|
102
101
|
|
|
103
102
|
var mcwcmat = actor.getMatrix();
|
|
104
|
-
transpose(tmp2Mat4, mcwcmat);
|
|
105
|
-
invert(tmp2Mat4, tmp2Mat4); // tmp2Mat4 is now world to model
|
|
103
|
+
mat4.transpose(tmp2Mat4, mcwcmat);
|
|
104
|
+
mat4.invert(tmp2Mat4, tmp2Mat4); // tmp2Mat4 is now world to model
|
|
106
105
|
|
|
107
|
-
multiply(tmpMat4, tmp2Mat4, tmpMat4); // tmp4Mat is now SC->Model
|
|
106
|
+
mat4.multiply(tmpMat4, tmp2Mat4, tmpMat4); // tmp4Mat is now SC->Model
|
|
108
107
|
// the method on the data is world to index but the volume is in
|
|
109
108
|
// model coordinates so really in this context it is model to index
|
|
110
109
|
|
|
111
110
|
var modelToIndex = image.getWorldToIndex();
|
|
112
|
-
multiply(tmpMat4, modelToIndex, tmpMat4); // tmpMat4 is now SC -> Index, save this as we need it later
|
|
111
|
+
mat4.multiply(tmpMat4, modelToIndex, tmpMat4); // tmpMat4 is now SC -> Index, save this as we need it later
|
|
113
112
|
|
|
114
|
-
invert(tmp3Mat4, tmpMat4);
|
|
113
|
+
mat4.invert(tmp3Mat4, tmpMat4);
|
|
115
114
|
var dims = image.getDimensions();
|
|
116
|
-
identity(tmp2Mat4);
|
|
117
|
-
scale(tmp2Mat4, tmp2Mat4, [1.0 / dims[0], 1.0 / dims[1], 1.0 / dims[2]]);
|
|
118
|
-
multiply(tmpMat4, tmp2Mat4, tmpMat4); // tmpMat4 is now SC -> Tcoord
|
|
115
|
+
mat4.identity(tmp2Mat4);
|
|
116
|
+
mat4.scale(tmp2Mat4, tmp2Mat4, [1.0 / dims[0], 1.0 / dims[1], 1.0 / dims[2]]);
|
|
117
|
+
mat4.multiply(tmpMat4, tmp2Mat4, tmpMat4); // tmpMat4 is now SC -> Tcoord
|
|
119
118
|
|
|
120
119
|
model.UBO.setArray('SCTCMatrix', tmpMat4); // need to compute the plane here in world coordinates
|
|
121
120
|
// then pass that down in the UBO
|
|
@@ -151,22 +150,22 @@ function vtkWebGPUImageMapper(publicAPI, model) {
|
|
|
151
150
|
ptsArray1[axis1] = ext[axis1 * 2];
|
|
152
151
|
ptsArray1[axis2] = ext[axis2 * 2];
|
|
153
152
|
ptsArray1[3] = 1.0;
|
|
154
|
-
transformMat4(ptsArray1, ptsArray1, tmp3Mat4);
|
|
153
|
+
vec4.transformMat4(ptsArray1, ptsArray1, tmp3Mat4);
|
|
155
154
|
model.UBO.setArray('Origin', ptsArray1);
|
|
156
155
|
ptsArray2[axis0] = nSlice;
|
|
157
156
|
ptsArray2[axis1] = ext[axis1 * 2 + 1];
|
|
158
157
|
ptsArray2[axis2] = ext[axis2 * 2];
|
|
159
158
|
ptsArray2[3] = 1.0;
|
|
160
|
-
transformMat4(ptsArray2, ptsArray2, tmp3Mat4);
|
|
161
|
-
subtract(ptsArray2, ptsArray2, ptsArray1);
|
|
159
|
+
vec4.transformMat4(ptsArray2, ptsArray2, tmp3Mat4);
|
|
160
|
+
vec4.subtract(ptsArray2, ptsArray2, ptsArray1);
|
|
162
161
|
ptsArray2[3] = 1.0;
|
|
163
162
|
model.UBO.setArray('Axis1', ptsArray2);
|
|
164
163
|
ptsArray2[axis0] = nSlice;
|
|
165
164
|
ptsArray2[axis1] = ext[axis1 * 2];
|
|
166
165
|
ptsArray2[axis2] = ext[axis2 * 2 + 1];
|
|
167
166
|
ptsArray2[3] = 1.0;
|
|
168
|
-
transformMat4(ptsArray2, ptsArray2, tmp3Mat4);
|
|
169
|
-
subtract(ptsArray2, ptsArray2, ptsArray1);
|
|
167
|
+
vec4.transformMat4(ptsArray2, ptsArray2, tmp3Mat4);
|
|
168
|
+
vec4.subtract(ptsArray2, ptsArray2, ptsArray1);
|
|
170
169
|
ptsArray2[3] = 1.0;
|
|
171
170
|
model.UBO.setArray('Axis2', ptsArray2); // three levels of shift scale combined into one
|
|
172
171
|
// for performance in the fragment shader
|
|
@@ -407,8 +406,8 @@ function extend(publicAPI, model) {
|
|
|
407
406
|
obj(model.lutBuildTime, {
|
|
408
407
|
mtime: 0
|
|
409
408
|
});
|
|
410
|
-
model.imagemat = identity(new Float64Array(16));
|
|
411
|
-
model.imagematinv = identity(new Float64Array(16));
|
|
409
|
+
model.imagemat = mat4.identity(new Float64Array(16));
|
|
410
|
+
model.imagematinv = mat4.identity(new Float64Array(16));
|
|
412
411
|
model.VBOBuildTime = {};
|
|
413
412
|
obj(model.VBOBuildTime); // Object methods
|
|
414
413
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mat4 } from 'gl-matrix';
|
|
1
2
|
import { newInstance as newInstance$1, obj, get } from '../../macros.js';
|
|
2
3
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
3
4
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
4
|
-
import { i as identity, j as transpose, d as copy, g as invert, t as translate } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
5
5
|
|
|
6
6
|
// vtkWebGPUImageSlice methods
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
@@ -87,25 +87,25 @@ function vtkWebGPUImageSlice(publicAPI, model) {
|
|
|
87
87
|
model.bufferShift[0] = mcwc[3] - center[0];
|
|
88
88
|
model.bufferShift[1] = mcwc[7] - center[1];
|
|
89
89
|
model.bufferShift[2] = mcwc[11] - center[2];
|
|
90
|
-
transpose(model.keyMatrices.bcwc, mcwc);
|
|
90
|
+
mat4.transpose(model.keyMatrices.bcwc, mcwc);
|
|
91
91
|
|
|
92
92
|
if (model.renderable.getIsIdentity()) {
|
|
93
|
-
identity(model.keyMatrices.normalMatrix);
|
|
93
|
+
mat4.identity(model.keyMatrices.normalMatrix);
|
|
94
94
|
} else {
|
|
95
95
|
// we use bcwc BEFORE the translate below (just to get transposed mcvc)
|
|
96
|
-
copy(model.keyMatrices.normalMatrix, model.keyMatrices.bcwc); // zero out translation
|
|
96
|
+
mat4.copy(model.keyMatrices.normalMatrix, model.keyMatrices.bcwc); // zero out translation
|
|
97
97
|
|
|
98
98
|
model.keyMatrices.normalMatrix[3] = 0.0;
|
|
99
99
|
model.keyMatrices.normalMatrix[7] = 0.0;
|
|
100
100
|
model.keyMatrices.normalMatrix[11] = 0.0;
|
|
101
|
-
invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
102
|
-
transpose(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
101
|
+
mat4.invert(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
102
|
+
mat4.transpose(model.keyMatrices.normalMatrix, model.keyMatrices.normalMatrix);
|
|
103
103
|
} // only meed the buffer shift to get to world
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
translate(model.keyMatrices.bcwc, model.keyMatrices.bcwc, [-model.bufferShift[0], -model.bufferShift[1], -model.bufferShift[2]]); // to get to stabilized we also need the center
|
|
106
|
+
mat4.translate(model.keyMatrices.bcwc, model.keyMatrices.bcwc, [-model.bufferShift[0], -model.bufferShift[1], -model.bufferShift[2]]); // to get to stabilized we also need the center
|
|
107
107
|
|
|
108
|
-
translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
108
|
+
mat4.translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
109
109
|
model.keyMatricesTime.modified();
|
|
110
110
|
}
|
|
111
111
|
|
|
@@ -142,7 +142,7 @@ function extend(publicAPI, model) {
|
|
|
142
142
|
mtime: 0
|
|
143
143
|
});
|
|
144
144
|
model.keyMatrices = {
|
|
145
|
-
mcwc: identity(new Float64Array(16))
|
|
145
|
+
mcwc: mat4.identity(new Float64Array(16))
|
|
146
146
|
};
|
|
147
147
|
model.bufferShift = [0, 0, 0, 0];
|
|
148
148
|
get(publicAPI, model, ['propID', 'keyMatricesTime']); // Object methods
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mat3, mat4 } from 'gl-matrix';
|
|
1
2
|
import { newInstance as newInstance$1, get, setGet } from '../../macros.js';
|
|
2
3
|
import vtkMapper from '../Core/Mapper.js';
|
|
3
4
|
import vtkProperty from '../Core/Property.js';
|
|
@@ -8,8 +9,6 @@ import vtkWebGPUUniformBuffer from './UniformBuffer.js';
|
|
|
8
9
|
import vtkWebGPUMapperHelper from './MapperHelper.js';
|
|
9
10
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
10
11
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
11
|
-
import { i as identity } from '../../vendor/gl-matrix/esm/mat3.js';
|
|
12
|
-
import { i as identity$1 } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
13
12
|
|
|
14
13
|
var BufferUsage = vtkWebGPUBufferManager.BufferUsage,
|
|
15
14
|
PrimitiveTypes = vtkWebGPUBufferManager.PrimitiveTypes;
|
|
@@ -619,8 +618,8 @@ function extend(publicAPI, model) {
|
|
|
619
618
|
Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance
|
|
620
619
|
|
|
621
620
|
vtkViewNode.extend(publicAPI, model, initialValues);
|
|
622
|
-
model.tmpMat3 = identity(new Float64Array(9));
|
|
623
|
-
model.tmpMat4 = identity
|
|
621
|
+
model.tmpMat3 = mat3.identity(new Float64Array(9));
|
|
622
|
+
model.tmpMat4 = mat4.identity(new Float64Array(16));
|
|
624
623
|
model.fragmentShaderTemplate = model.fragmentShaderTemplate || vtkWebGPUPolyDataFS;
|
|
625
624
|
model.vertexShaderTemplate = model.vertexShaderTemplate || vtkWebGPUPolyDataVS;
|
|
626
625
|
model.UBO = vtkWebGPUUniformBuffer.newInstance();
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { mat4, vec3 } from 'gl-matrix';
|
|
1
2
|
import { newInstance as newInstance$1, obj, get, getArray, setGet, vtkDebugMacro as vtkDebugMacro$1 } from '../../macros.js';
|
|
2
3
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
3
4
|
import vtkWebGPUBindGroup from './BindGroup.js';
|
|
4
5
|
import vtkWebGPUFullScreenQuad from './FullScreenQuad.js';
|
|
5
6
|
import vtkWebGPUUniformBuffer from './UniformBuffer.js';
|
|
6
7
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
7
|
-
import { i as identity } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
8
|
-
import { b as scale, j as add, q as sub, r as len } from '../../vendor/gl-matrix/esm/vec3.js';
|
|
9
8
|
|
|
10
9
|
var vtkDebugMacro = vtkDebugMacro$1;
|
|
11
10
|
var clearFragTemplate = "\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var computedColor: vec4<f32> = mapperUBO.BackgroundColor;\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n"; // ----------------------------------------------------------------------------
|
|
@@ -66,10 +65,10 @@ function vtkWebGPURenderer(publicAPI, model) {
|
|
|
66
65
|
var dop = cam.getDirectionOfProjectionByReference();
|
|
67
66
|
var center = [];
|
|
68
67
|
var offset = [];
|
|
69
|
-
scale(offset, dop, 0.5 * (clipRange[0] + clipRange[1]));
|
|
70
|
-
add(center, pos, offset);
|
|
71
|
-
sub(offset, center, model.stabilizedCenter);
|
|
72
|
-
var length = len(offset);
|
|
68
|
+
vec3.scale(offset, dop, 0.5 * (clipRange[0] + clipRange[1]));
|
|
69
|
+
vec3.add(center, pos, offset);
|
|
70
|
+
vec3.sub(offset, center, model.stabilizedCenter);
|
|
71
|
+
var length = vec3.len(offset);
|
|
73
72
|
|
|
74
73
|
if (length / (clipRange[1] - clipRange[0]) > model.recenterThreshold) {
|
|
75
74
|
model.stabilizedCenter = center;
|
|
@@ -342,7 +341,7 @@ function extend(publicAPI, model) {
|
|
|
342
341
|
model.bindGroup = vtkWebGPUBindGroup.newInstance();
|
|
343
342
|
model.bindGroup.setName('rendererBG');
|
|
344
343
|
model.bindGroup.setBindables([model.UBO]);
|
|
345
|
-
model.tmpMat4 = identity(new Float64Array(16));
|
|
344
|
+
model.tmpMat4 = mat4.identity(new Float64Array(16));
|
|
346
345
|
model.stabilizedTime = {};
|
|
347
346
|
obj(model.stabilizedTime, {
|
|
348
347
|
mtime: 0
|
|
@@ -80,29 +80,30 @@ function vtkWebGPUTexture(publicAPI, model) {
|
|
|
80
80
|
// the data here before passing to the buffer. e.g. if it is unorm8x4 then
|
|
81
81
|
// we need to have width be a multiple of 64
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var inWidthInBytes = req.nativeArray.length / (model.height * model.depth) * req.nativeArray.BYTES_PER_ELEMENT; // is this a half float texture?
|
|
84
84
|
|
|
85
85
|
var halfFloat = tDetails.elementSize === 2 && tDetails.sampleType === 'float'; // if we need to copy the data
|
|
86
86
|
|
|
87
|
-
if (halfFloat ||
|
|
87
|
+
if (halfFloat || inWidthInBytes % 256) {
|
|
88
88
|
var inArray = req.nativeArray;
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var
|
|
92
|
-
var
|
|
89
|
+
var inWidth = inWidthInBytes / inArray.BYTES_PER_ELEMENT;
|
|
90
|
+
var outBytesPerElement = tDetails.elementSize;
|
|
91
|
+
var outWidthInBytes = 256 * Math.floor((inWidth * outBytesPerElement + 255) / 256);
|
|
92
|
+
var outWidth = outWidthInBytes / outBytesPerElement;
|
|
93
|
+
var outArray = macro.newTypedArray(halfFloat ? 'Uint16Array' : inArray.constructor.name, outWidth * model.height * model.depth);
|
|
93
94
|
|
|
94
95
|
for (var v = 0; v < model.height * model.depth; v++) {
|
|
95
96
|
if (halfFloat) {
|
|
96
97
|
for (var i = 0; i < inWidth; i++) {
|
|
97
|
-
outArray[v *
|
|
98
|
+
outArray[v * outWidth + i] = HalfFloat.toHalf(inArray[v * inWidth + i]);
|
|
98
99
|
}
|
|
99
100
|
} else {
|
|
100
|
-
outArray.set(inArray.subarray(v * inWidth, (v + 1) * inWidth), v *
|
|
101
|
+
outArray.set(inArray.subarray(v * inWidth, (v + 1) * inWidth), v * outWidth);
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
buffRequest.nativeArray = outArray;
|
|
105
|
-
bufferBytesPerRow =
|
|
106
|
+
bufferBytesPerRow = outWidthInBytes;
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
var buff = model.device.getBufferManager().getBuffer(buffRequest);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { mat4 } from 'gl-matrix';
|
|
1
2
|
import macro from '../../macros.js';
|
|
2
3
|
import vtkViewNode from '../SceneGraph/ViewNode.js';
|
|
3
4
|
import { registerOverride } from './ViewNodeFactory.js';
|
|
4
|
-
import { j as transpose, t as translate } from '../../vendor/gl-matrix/esm/mat4.js';
|
|
5
5
|
|
|
6
6
|
// vtkWebGPUVolume methods
|
|
7
7
|
// ----------------------------------------------------------------------------
|
|
@@ -98,9 +98,9 @@ function vtkWebGPUVolume(publicAPI, model) {
|
|
|
98
98
|
var mcwc = model.renderable.getMatrix(); // compute the net shift
|
|
99
99
|
|
|
100
100
|
var center = wgpuRen.getStabilizedCenterByReference();
|
|
101
|
-
transpose(model.keyMatrices.bcwc, mcwc); // to get to stabilized we also need the center
|
|
101
|
+
mat4.transpose(model.keyMatrices.bcwc, mcwc); // to get to stabilized we also need the center
|
|
102
102
|
|
|
103
|
-
translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
103
|
+
mat4.translate(model.keyMatrices.bcsc, model.keyMatrices.bcwc, [-center[0], -center[1], -center[2]]);
|
|
104
104
|
model.keyMatricesTime.modified();
|
|
105
105
|
}
|
|
106
106
|
|