@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
package/Common/Core/Base64.d.ts
CHANGED
|
@@ -4,7 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Convert a Base64 string to an ArrayBuffer.
|
|
7
|
-
* @param {string} b64Str
|
|
7
|
+
* @param {string} b64Str
|
|
8
8
|
* @return An ArrayBuffer object.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export function toArrayBuffer(b64Str: string): ArrayBuffer;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Convert a Base64 string to an ArrayBuffer.
|
|
14
|
+
* @param {string} b64Str
|
|
15
|
+
* @return An ArrayBuffer object.
|
|
16
|
+
*/
|
|
17
|
+
export function fromArrayBuffer(ab: ArrayBuffer): string;
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
toArrayBuffer,
|
|
21
|
+
fromArrayBuffer,
|
|
22
|
+
};
|
package/Common/Core/Base64.js
CHANGED
|
@@ -152,8 +152,37 @@ function toArrayBuffer(b64Str) {
|
|
|
152
152
|
return arrayBuffer;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
function encodeTriplet(v1, v2, v3) {
|
|
156
|
+
var triplet = (v1 << 16) + (v2 << 8) + v3;
|
|
157
|
+
return BASE64_CODE[triplet >> 18] + BASE64_CODE[triplet >> 12 & 0x3f] + BASE64_CODE[triplet >> 6 & 0x3f] + BASE64_CODE[triplet & 0x3f];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function fromArrayBuffer(ab) {
|
|
161
|
+
var uint8 = new Uint8Array(ab);
|
|
162
|
+
var leftoverLength = ab.byteLength % 3;
|
|
163
|
+
var maxTripletIndex = ab.byteLength - leftoverLength;
|
|
164
|
+
var segments = Array(maxTripletIndex / 3);
|
|
165
|
+
|
|
166
|
+
for (var _i4 = 0; _i4 < segments.length; _i4++) {
|
|
167
|
+
var bufOffset = _i4 * 3;
|
|
168
|
+
segments[_i4] = encodeTriplet(uint8[bufOffset], uint8[bufOffset + 1], uint8[bufOffset + 2]);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (leftoverLength > 0) {
|
|
172
|
+
var segment = encodeTriplet(uint8[maxTripletIndex], uint8[maxTripletIndex + 1] || 0, uint8[maxTripletIndex + 2] || 0);
|
|
173
|
+
|
|
174
|
+
if (leftoverLength === 1) {
|
|
175
|
+
segments.push("".concat(segment.substr(0, 2), "=="));
|
|
176
|
+
} else if (leftoverLength === 2) {
|
|
177
|
+
segments.push("".concat(segment.substr(0, 3), "="));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return segments.join('');
|
|
182
|
+
}
|
|
155
183
|
var Base64 = {
|
|
156
|
-
toArrayBuffer: toArrayBuffer
|
|
184
|
+
toArrayBuffer: toArrayBuffer,
|
|
185
|
+
fromArrayBuffer: fromArrayBuffer
|
|
157
186
|
};
|
|
158
187
|
|
|
159
|
-
export { Base64 as default };
|
|
188
|
+
export { Base64 as default, fromArrayBuffer, toArrayBuffer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import
|
|
2
|
+
import seedrandom from 'seedrandom';
|
|
3
3
|
import macro from '../../../macros.js';
|
|
4
4
|
|
|
5
5
|
var vtkErrorMacro = macro.vtkErrorMacro,
|
|
@@ -688,7 +688,7 @@ function roundNumber(num) {
|
|
|
688
688
|
return +"".concat(Math.round("".concat(+arr[0], "e").concat(sig).concat(+arr[1] + digits)), "e-").concat(digits);
|
|
689
689
|
}
|
|
690
690
|
function roundVector(vector) {
|
|
691
|
-
var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
691
|
+
var out = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 0];
|
|
692
692
|
var digits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
693
693
|
out[0] = roundNumber(vector[0], digits);
|
|
694
694
|
out[1] = roundNumber(vector[1], digits);
|
|
@@ -1948,7 +1948,7 @@ function clampValue(value, minValue, maxValue) {
|
|
|
1948
1948
|
return value;
|
|
1949
1949
|
}
|
|
1950
1950
|
function clampVector(vector, minVector, maxVector) {
|
|
1951
|
-
var out = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
1951
|
+
var out = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [0, 0, 0];
|
|
1952
1952
|
out[0] = clampValue(vector[0], minVector[0], maxVector[0]);
|
|
1953
1953
|
out[1] = clampValue(vector[1], minVector[1], maxVector[1]);
|
|
1954
1954
|
out[2] = clampValue(vector[2], minVector[2], maxVector[2]);
|
package/Common/Core/Math.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mat3, vec2, vec3 } from "gl-matrix";
|
|
1
|
+
import { mat2, mat3, vec2, vec3, vec4 } from "gl-matrix";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
@@ -154,27 +154,27 @@ export function random(minValue: number, maxValue: number): number;
|
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
156
|
* Addition of two 3-vectors (float version).
|
|
157
|
-
* @param {
|
|
158
|
-
* @param {
|
|
159
|
-
* @param {
|
|
157
|
+
* @param {vec3} a
|
|
158
|
+
* @param {vec3} b
|
|
159
|
+
* @param {vec3} out
|
|
160
160
|
* @example
|
|
161
161
|
* ```js
|
|
162
162
|
* a[3] + b[3] => out[3]
|
|
163
163
|
* ```
|
|
164
164
|
*/
|
|
165
|
-
export function add(a:
|
|
165
|
+
export function add(a: vec3, b: vec3, out: vec3): vec3;
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
*
|
|
169
|
-
* @param {
|
|
170
|
-
* @param {
|
|
171
|
-
* @param {
|
|
169
|
+
* @param {vec3} a
|
|
170
|
+
* @param {vec3} b
|
|
171
|
+
* @param {vec3} out
|
|
172
172
|
* @example
|
|
173
173
|
* ```js
|
|
174
174
|
* a[3] - b[3] => out[3]
|
|
175
175
|
* ```
|
|
176
176
|
*/
|
|
177
|
-
export function subtract(a:
|
|
177
|
+
export function subtract(a: vec3, b: vec3, out: vec3): vec3;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
*
|
|
@@ -185,7 +185,7 @@ export function subtract(a: number[], b: number[], out: number[]): number[];
|
|
|
185
185
|
* vec[3] * scalar => vec[3]
|
|
186
186
|
* ```
|
|
187
187
|
*/
|
|
188
|
-
export function multiplyScalar(vec: vec3, scalar: number):
|
|
188
|
+
export function multiplyScalar(vec: vec3, scalar: number): vec3;
|
|
189
189
|
|
|
190
190
|
/**
|
|
191
191
|
*
|
|
@@ -196,62 +196,62 @@ export function multiplyScalar(vec: vec3, scalar: number): number[];
|
|
|
196
196
|
* vec[3] * scalar => vec[3]
|
|
197
197
|
* ```
|
|
198
198
|
*/
|
|
199
|
-
export function multiplyScalar2D(vec: vec2, scalar: number):
|
|
199
|
+
export function multiplyScalar2D(vec: vec2, scalar: number): vec2;
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
202
|
*
|
|
203
|
-
* @param {
|
|
204
|
-
* @param {
|
|
203
|
+
* @param {vec3} a
|
|
204
|
+
* @param {vec3} b
|
|
205
205
|
* @param {Number} scalar
|
|
206
|
-
* @param {
|
|
206
|
+
* @param {vec3} out
|
|
207
207
|
* @example
|
|
208
208
|
* ```js
|
|
209
209
|
* a[3] + b[3] * scalar => out[3]
|
|
210
210
|
* ```
|
|
211
211
|
*/
|
|
212
|
-
export function multiplyAccumulate(a:
|
|
212
|
+
export function multiplyAccumulate(a: vec3, b: vec3, scalar: number, out: vec3): vec3;
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
215
|
*
|
|
216
|
-
* @param {
|
|
217
|
-
* @param {
|
|
216
|
+
* @param {vec2} a
|
|
217
|
+
* @param {vec2} b
|
|
218
218
|
* @param {Number} scalar
|
|
219
|
-
* @param {
|
|
219
|
+
* @param {vec2} out
|
|
220
220
|
* @example
|
|
221
221
|
* ```js
|
|
222
222
|
* a[2] + b[2] * scalar => out[2]
|
|
223
223
|
* ```
|
|
224
224
|
*/
|
|
225
|
-
export function multiplyAccumulate2D(a:
|
|
225
|
+
export function multiplyAccumulate2D(a: vec2, b: vec2, scalar: number, out: vec2): vec2;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
*
|
|
229
|
-
* @param {
|
|
230
|
-
* @param {
|
|
229
|
+
* @param {vec3} x
|
|
230
|
+
* @param {vec3} y
|
|
231
231
|
* @example
|
|
232
232
|
* ```js
|
|
233
233
|
* a[2] + b[2] * scalar => out[2]
|
|
234
234
|
* ```
|
|
235
235
|
*/
|
|
236
|
-
export function dot(x:
|
|
236
|
+
export function dot(x: vec3, y: vec3): number;
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
*
|
|
240
|
-
* @param {
|
|
241
|
-
* @param {
|
|
240
|
+
* @param {vec3} x
|
|
241
|
+
* @param {vec3} y
|
|
242
242
|
* @param {mat3} out_3x3
|
|
243
243
|
*/
|
|
244
|
-
export function outer(x:
|
|
244
|
+
export function outer(x: vec3, y: vec3, out_3x3: mat3): void;
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
247
|
* Computes cross product of 3D vectors x and y.
|
|
248
248
|
* Returns out.
|
|
249
249
|
* It is safe to x or y as out.
|
|
250
|
-
* @param {
|
|
251
|
-
* @param {
|
|
252
|
-
* @param {
|
|
250
|
+
* @param {vec3} x
|
|
251
|
+
* @param {vec3} y
|
|
252
|
+
* @param {vec3} out
|
|
253
253
|
*/
|
|
254
|
-
export function cross(x:
|
|
254
|
+
export function cross(x: vec3, y: vec3, out: vec3): vec3;
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
257
|
*
|
|
@@ -262,48 +262,48 @@ export function norm(x: number[], n: number): number;
|
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
264
|
* Normalize in place. Returns norm.
|
|
265
|
-
* @param {
|
|
265
|
+
* @param {vec3} x
|
|
266
266
|
*/
|
|
267
|
-
export function normalize(x:
|
|
267
|
+
export function normalize(x: vec3): number;
|
|
268
268
|
|
|
269
269
|
/**
|
|
270
270
|
*
|
|
271
|
-
* @param {
|
|
272
|
-
* @param {
|
|
273
|
-
* @param {
|
|
271
|
+
* @param {vec3} x
|
|
272
|
+
* @param {vec3} y
|
|
273
|
+
* @param {vec3} z
|
|
274
274
|
* @param {Number} theta
|
|
275
275
|
*/
|
|
276
|
-
export function perpendiculars(x:
|
|
276
|
+
export function perpendiculars(x: vec3, y: vec3, z: vec3, theta: number): void;
|
|
277
277
|
|
|
278
278
|
/**
|
|
279
279
|
*
|
|
280
|
-
* @param {
|
|
281
|
-
* @param {
|
|
282
|
-
* @param {
|
|
280
|
+
* @param {vec3} a
|
|
281
|
+
* @param {vec3} b
|
|
282
|
+
* @param {vec3} projection
|
|
283
283
|
*/
|
|
284
|
-
export function projectVector(a:
|
|
284
|
+
export function projectVector(a: vec3, b: vec3, projection: vec3): boolean;
|
|
285
285
|
|
|
286
286
|
/**
|
|
287
287
|
*
|
|
288
|
-
* @param {
|
|
289
|
-
* @param {
|
|
288
|
+
* @param {vec2} x
|
|
289
|
+
* @param {vec2} y
|
|
290
290
|
*/
|
|
291
|
-
export function dot2D(x:
|
|
291
|
+
export function dot2D(x: vec2, y: vec2): number;
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
*
|
|
295
|
-
* @param {
|
|
296
|
-
* @param {
|
|
295
|
+
* @param {vec2} a
|
|
296
|
+
* @param {vec2} b
|
|
297
297
|
* @param projection
|
|
298
298
|
*/
|
|
299
|
-
export function projectVector2D(a:
|
|
299
|
+
export function projectVector2D(a: vec2, b: vec2, projection: vec2): boolean;
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
302
|
*
|
|
303
|
-
* @param {
|
|
304
|
-
* @param {
|
|
303
|
+
* @param {vec3} x
|
|
304
|
+
* @param {vec3} y
|
|
305
305
|
*/
|
|
306
|
-
export function distance2BetweenPoints(x:
|
|
306
|
+
export function distance2BetweenPoints(x: vec3, y: vec3): number;
|
|
307
307
|
|
|
308
308
|
/**
|
|
309
309
|
* Angle between 3D vectors
|
|
@@ -343,23 +343,23 @@ export function gaussianWeight(mean: number, variance: number, position: number)
|
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
345
|
*
|
|
346
|
-
* @param {
|
|
347
|
-
* @param {
|
|
348
|
-
* @param {
|
|
346
|
+
* @param {vec2} x
|
|
347
|
+
* @param {vec2} y
|
|
348
|
+
* @param {mat2} out_2x2
|
|
349
349
|
*/
|
|
350
|
-
export function outer2D(x:
|
|
350
|
+
export function outer2D(x: vec2, y: vec2, out_2x2: mat2): void;
|
|
351
351
|
|
|
352
352
|
/**
|
|
353
353
|
*
|
|
354
|
-
* @param {
|
|
354
|
+
* @param {vec2} x2D
|
|
355
355
|
*/
|
|
356
|
-
export function norm2D(x2D:
|
|
356
|
+
export function norm2D(x2D: vec2): number;
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
359
|
*
|
|
360
|
-
* @param {
|
|
360
|
+
* @param {vec2} x
|
|
361
361
|
*/
|
|
362
|
-
export function normalize2D(x:
|
|
362
|
+
export function normalize2D(x: vec2): number;
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
365
|
*
|
|
@@ -370,25 +370,25 @@ export function determinant2x2(args: number[]): number;
|
|
|
370
370
|
/**
|
|
371
371
|
*
|
|
372
372
|
* @param {mat3} mat_3x3
|
|
373
|
-
* @param {
|
|
373
|
+
* @param {vec3} index_3
|
|
374
374
|
*/
|
|
375
|
-
export function LUFactor3x3(mat_3x3: mat3, index_3:
|
|
375
|
+
export function LUFactor3x3(mat_3x3: mat3, index_3: vec3): void;
|
|
376
376
|
|
|
377
377
|
/**
|
|
378
378
|
*
|
|
379
379
|
* @param {mat3} mat_3x3
|
|
380
|
-
* @param {
|
|
381
|
-
* @param {
|
|
380
|
+
* @param {vec3} index_3
|
|
381
|
+
* @param {vec3} x_3
|
|
382
382
|
*/
|
|
383
|
-
export function LUSolve3x3(mat_3x3: mat3, index_3:
|
|
383
|
+
export function LUSolve3x3(mat_3x3: mat3, index_3: vec3, x_3: vec3): void;
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
386
|
*
|
|
387
387
|
* @param {mat3} mat_3x3
|
|
388
|
-
* @param {
|
|
389
|
-
* @param {
|
|
388
|
+
* @param {vec3} x_3
|
|
389
|
+
* @param {vec3} y_3
|
|
390
390
|
*/
|
|
391
|
-
export function linearSolve3x3(mat_3x3: mat3, x_3:
|
|
391
|
+
export function linearSolve3x3(mat_3x3: mat3, x_3: vec3, y_3: vec3): void;
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
394
|
*
|
|
@@ -421,16 +421,16 @@ export function multiplyMatrix(a: number[], b: number[], rowA: number, colA: num
|
|
|
421
421
|
/**
|
|
422
422
|
*
|
|
423
423
|
* @param {mat3} in_3x3
|
|
424
|
-
* @param {
|
|
424
|
+
* @param {mat3} outT_3x3
|
|
425
425
|
*/
|
|
426
|
-
export function transpose3x3(in_3x3: mat3, outT_3x3:
|
|
426
|
+
export function transpose3x3(in_3x3: mat3, outT_3x3: mat3): void;
|
|
427
427
|
|
|
428
428
|
/**
|
|
429
429
|
*
|
|
430
430
|
* @param {mat3} in_3x3
|
|
431
|
-
* @param {
|
|
431
|
+
* @param {mat3} outI_3x3
|
|
432
432
|
*/
|
|
433
|
-
export function invert3x3(in_3x3: mat3, outI_3x3:
|
|
433
|
+
export function invert3x3(in_3x3: mat3, outI_3x3: mat3): void;
|
|
434
434
|
|
|
435
435
|
/**
|
|
436
436
|
*
|
|
@@ -446,10 +446,10 @@ export function determinant3x3(mat_3x3: mat3): number;
|
|
|
446
446
|
|
|
447
447
|
/**
|
|
448
448
|
*
|
|
449
|
-
* @param {
|
|
449
|
+
* @param {vec4} quat_4
|
|
450
450
|
* @param {mat3} mat_3x3
|
|
451
451
|
*/
|
|
452
|
-
export function quaternionToMatrix3x3(quat_4:
|
|
452
|
+
export function quaternionToMatrix3x3(quat_4: vec4, mat_3x3: mat3): void;
|
|
453
453
|
|
|
454
454
|
/**
|
|
455
455
|
*
|
|
@@ -469,10 +469,10 @@ export function roundNumber(num: number, digits?: number): number;
|
|
|
469
469
|
/**
|
|
470
470
|
*
|
|
471
471
|
* @param {vec3} vector
|
|
472
|
-
* @param {
|
|
472
|
+
* @param {vec3} [out]
|
|
473
473
|
* @param {Number} [digits]
|
|
474
474
|
*/
|
|
475
|
-
export function roundVector(vector: vec3, out?:
|
|
475
|
+
export function roundVector(vector: vec3, out?: vec3, digits?: number): vec3;
|
|
476
476
|
|
|
477
477
|
/**
|
|
478
478
|
*
|
|
@@ -486,17 +486,17 @@ export function jacobiN(a: number[], n: number, w: number[], v: number[]): numbe
|
|
|
486
486
|
/**
|
|
487
487
|
*
|
|
488
488
|
* @param {mat3} mat_3x3
|
|
489
|
-
* @param {
|
|
489
|
+
* @param {vec4} quat_4
|
|
490
490
|
*/
|
|
491
|
-
export function matrix3x3ToQuaternion(mat_3x3: mat3, quat_4:
|
|
491
|
+
export function matrix3x3ToQuaternion(mat_3x3: mat3, quat_4: vec4): void;
|
|
492
492
|
|
|
493
493
|
/**
|
|
494
494
|
*
|
|
495
|
-
* @param {
|
|
496
|
-
* @param {
|
|
497
|
-
* @param {
|
|
495
|
+
* @param {vec4} quat_1
|
|
496
|
+
* @param {vec4} quat_2
|
|
497
|
+
* @param {vec4} quat_out
|
|
498
498
|
*/
|
|
499
|
-
export function multiplyQuaternion(quat_1:
|
|
499
|
+
export function multiplyQuaternion(quat_1: vec4, quat_2: vec4, quat_out: vec4): void;
|
|
500
500
|
|
|
501
501
|
/**
|
|
502
502
|
*
|
|
@@ -602,59 +602,59 @@ export function hex2float(hexStr: string, outFloatArray: number[]): number[];
|
|
|
602
602
|
|
|
603
603
|
/**
|
|
604
604
|
*
|
|
605
|
-
* @param {
|
|
606
|
-
* @param {
|
|
605
|
+
* @param {vec3} rgb An Array of the RGB color.
|
|
606
|
+
* @param {vec3} hsv An Array of the HSV color.
|
|
607
607
|
*/
|
|
608
|
-
export function rgb2hsv(rgb:
|
|
608
|
+
export function rgb2hsv(rgb: vec3, hsv: vec3): void;
|
|
609
609
|
|
|
610
610
|
/**
|
|
611
611
|
*
|
|
612
|
-
* @param {
|
|
613
|
-
* @param {
|
|
612
|
+
* @param {vec3} hsv An Array of the HSV color.
|
|
613
|
+
* @param {vec3} rgb An Array of the RGB color.
|
|
614
614
|
*/
|
|
615
|
-
export function hsv2rgb(hsv:
|
|
615
|
+
export function hsv2rgb(hsv: vec3, rgb: vec3): void;
|
|
616
616
|
|
|
617
617
|
/**
|
|
618
618
|
*
|
|
619
|
-
* @param {
|
|
620
|
-
* @param {
|
|
619
|
+
* @param {vec3} lab
|
|
620
|
+
* @param {vec3} xyz
|
|
621
621
|
*/
|
|
622
|
-
export function lab2xyz(lab:
|
|
622
|
+
export function lab2xyz(lab: vec3, xyz: vec3): void;
|
|
623
623
|
|
|
624
624
|
/**
|
|
625
625
|
*
|
|
626
|
-
* @param {
|
|
627
|
-
* @param {
|
|
626
|
+
* @param {vec3} xyz
|
|
627
|
+
* @param {vec3} lab
|
|
628
628
|
*/
|
|
629
|
-
export function xyz2lab(xyz:
|
|
629
|
+
export function xyz2lab(xyz: vec3, lab: vec3): void;
|
|
630
630
|
|
|
631
631
|
/**
|
|
632
632
|
*
|
|
633
|
-
* @param {
|
|
634
|
-
* @param {
|
|
633
|
+
* @param {vec3} xyz
|
|
634
|
+
* @param {vec3} rgb An Array of the RGB color.
|
|
635
635
|
*/
|
|
636
|
-
export function xyz2rgb(xyz:
|
|
636
|
+
export function xyz2rgb(xyz: vec3, rgb: vec3): void;
|
|
637
637
|
|
|
638
638
|
/**
|
|
639
639
|
*
|
|
640
|
-
* @param {
|
|
641
|
-
* @param {
|
|
640
|
+
* @param {vec3} rgb An Array of the RGB color.
|
|
641
|
+
* @param {vec3} xyz
|
|
642
642
|
*/
|
|
643
|
-
export function rgb2xyz(rgb:
|
|
643
|
+
export function rgb2xyz(rgb: vec3, xyz: vec3): void;
|
|
644
644
|
|
|
645
645
|
/**
|
|
646
646
|
*
|
|
647
|
-
* @param {
|
|
648
|
-
* @param {
|
|
647
|
+
* @param {vec3} rgb
|
|
648
|
+
* @param {vec3} lab
|
|
649
649
|
*/
|
|
650
|
-
export function rgb2lab(rgb:
|
|
650
|
+
export function rgb2lab(rgb: vec3, lab: vec3): void;
|
|
651
651
|
|
|
652
652
|
/**
|
|
653
653
|
*
|
|
654
|
-
* @param {
|
|
655
|
-
* @param {
|
|
654
|
+
* @param {vec3} lab
|
|
655
|
+
* @param {vec3} rgb An Array of the RGB color.
|
|
656
656
|
*/
|
|
657
|
-
export function lab2rgb(lab:
|
|
657
|
+
export function lab2rgb(lab: vec3, rgb: vec3): void;
|
|
658
658
|
|
|
659
659
|
/**
|
|
660
660
|
* Returns bounds.
|
|
@@ -664,17 +664,17 @@ export function uninitializeBounds(bounds: number[]): number[];
|
|
|
664
664
|
|
|
665
665
|
/**
|
|
666
666
|
*
|
|
667
|
-
* @param {
|
|
667
|
+
* @param {vec2} bounds
|
|
668
668
|
*/
|
|
669
|
-
export function areBoundsInitialized(bounds:
|
|
669
|
+
export function areBoundsInitialized(bounds: vec2): boolean;
|
|
670
670
|
|
|
671
671
|
/**
|
|
672
672
|
* Returns bounds.
|
|
673
|
-
* @param {
|
|
674
|
-
* @param {
|
|
673
|
+
* @param {vec3} point1
|
|
674
|
+
* @param {vec3} point2
|
|
675
675
|
* @param {Number[]} bounds Output array that hold bounds, optionally empty.
|
|
676
676
|
*/
|
|
677
|
-
export function computeBoundsFromPoints(point1:
|
|
677
|
+
export function computeBoundsFromPoints(point1: vec3, point2: vec3, bounds: number[]): number[];
|
|
678
678
|
|
|
679
679
|
/**
|
|
680
680
|
*
|
|
@@ -682,30 +682,30 @@ export function computeBoundsFromPoints(point1: number[], point2: number[], boun
|
|
|
682
682
|
* @param {Number} minValue
|
|
683
683
|
* @param {Number} maxValue
|
|
684
684
|
*/
|
|
685
|
-
export function clampValue(value: number, minValue: number, maxValue: number): number
|
|
685
|
+
export function clampValue(value: number, minValue: number, maxValue: number): number;
|
|
686
686
|
|
|
687
687
|
/**
|
|
688
688
|
*
|
|
689
|
-
* @param {
|
|
690
|
-
* @param {
|
|
691
|
-
* @param {
|
|
692
|
-
* @param {
|
|
689
|
+
* @param {vec3} vector
|
|
690
|
+
* @param {vec3} minVector
|
|
691
|
+
* @param {vec3} maxVector
|
|
692
|
+
* @param {vec3} out
|
|
693
693
|
*/
|
|
694
|
-
export function clampVector(vector:
|
|
694
|
+
export function clampVector(vector: vec3, minVector: vec3, maxVector: vec3, out: vec3): vec3;
|
|
695
695
|
|
|
696
696
|
/**
|
|
697
697
|
*
|
|
698
|
-
* @param {
|
|
699
|
-
* @param {
|
|
698
|
+
* @param {vec3} vector
|
|
699
|
+
* @param {vec3} out
|
|
700
700
|
*/
|
|
701
|
-
export function roundVector(vector:
|
|
701
|
+
export function roundVector(vector: vec3, out: vec3): vec3;
|
|
702
702
|
|
|
703
703
|
/**
|
|
704
704
|
*
|
|
705
705
|
* @param {Number} value
|
|
706
|
-
* @param {
|
|
706
|
+
* @param {vec2} range
|
|
707
707
|
*/
|
|
708
|
-
export function clampAndNormalizeValue(value: number, range:
|
|
708
|
+
export function clampAndNormalizeValue(value: number, range: vec2): number;
|
|
709
709
|
|
|
710
710
|
/**
|
|
711
711
|
*
|
|
@@ -728,26 +728,26 @@ export function extentIsWithinOtherExtent(extent1: number[], extent2: number[]):
|
|
|
728
728
|
*
|
|
729
729
|
* @param {Number[]} bounds1_6
|
|
730
730
|
* @param {Number[]} bounds2_6
|
|
731
|
-
* @param {
|
|
731
|
+
* @param {vec3} delta_3
|
|
732
732
|
*/
|
|
733
|
-
export function boundsIsWithinOtherBounds(bounds1_6: number[], bounds2_6: number[], delta_3:
|
|
733
|
+
export function boundsIsWithinOtherBounds(bounds1_6: number[], bounds2_6: number[], delta_3: vec3): number;
|
|
734
734
|
|
|
735
735
|
/**
|
|
736
736
|
*
|
|
737
|
-
* @param {
|
|
737
|
+
* @param {vec3} point_3
|
|
738
738
|
* @param {Number[]} bounds_6
|
|
739
|
-
* @param {
|
|
739
|
+
* @param {vec3} delta_3
|
|
740
740
|
*/
|
|
741
|
-
export function pointIsWithinBounds(point_3:
|
|
741
|
+
export function pointIsWithinBounds(point_3: vec3, bounds_6: number[], delta_3: vec3): number;
|
|
742
742
|
|
|
743
743
|
/**
|
|
744
744
|
*
|
|
745
|
-
* @param {
|
|
746
|
-
* @param {
|
|
747
|
-
* @param {
|
|
748
|
-
* @param {
|
|
745
|
+
* @param {vec3} p1
|
|
746
|
+
* @param {vec3} p2
|
|
747
|
+
* @param {vec3} p3
|
|
748
|
+
* @param {vec3} center
|
|
749
749
|
*/
|
|
750
|
-
export function solve3PointCircle(p1:
|
|
750
|
+
export function solve3PointCircle(p1: vec3, p2: vec3, p3: vec3, center: vec3): number;
|
|
751
751
|
|
|
752
752
|
/**
|
|
753
753
|
* Determines whether the passed value is a infinite number.
|
package/Common/Core/Math.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import '
|
|
2
|
+
import 'seedrandom';
|
|
3
3
|
import '../../macros.js';
|
|
4
4
|
export { ae as LUFactor3x3, af as LUSolve3x3, T as Pi, k as add, R as angleBetweenVectors, O as areBoundsInitialized, z as areEquals, a as areMatricesEqual, Y as arrayMax, X as arrayMin, C as arrayRange, a0 as beginCombination, $ as binomial, aJ as boundsIsWithinOtherBounds, U as ceil, Z as ceilLog2, aF as clampAndNormalizeValue, A as clampValue, e as clampVector, c as computeBoundsFromPoints, M as createUninitializedBounds, j as cross, q as default, y as degreesFromRadians, m as determinant2x2, x as determinant3x3, ar as diagonalize3x3, f as distance2BetweenPoints, d as dot, a8 as dot2D, aw as estimateMatrixCondition, aI as extentIsWithinOtherExtent, _ as factorial, aS as float2CssRGBA, aR as floatRGB2HexCode, aQ as floatToHex2, I as floor, a4 as gaussian, aa as gaussianAmplitude, ab as gaussianWeight, aH as getAdjustedScalarRange, D as getMajorAxisIndex, aG as getScalarTypeFittingRange, a3 as getSeed, aA as hex2float, h as hsv2rgb, al as identity3x3, aM as inf, ak as invert3x3, av as invertMatrix, aO as isFinite, E as isInf, aP as isNaN, i as isNan, P as isPowerOfTwo, ax as jacobi, o as jacobiN, H as lab2rgb, aB as lab2xyz, ag as linearSolve3x3, at as luFactorLinearSystem, au as luSolveLinearSystem, ao as matrix3x3ToQuaternion, W as max, V as min, ah as multiply3x3_mat3, N as multiply3x3_vect3, Q as multiplyAccumulate, a6 as multiplyAccumulate2D, ai as multiplyMatrix, ap as multiplyQuaternion, t as multiplyScalar, a5 as multiplyScalar2D, K as nearestPowerOfTwo, aN as negInf, a1 as nextCombination, n as norm, ad as norm2D, l as normalize, L as normalize2D, aq as orthogonalize3x3, a7 as outer, ac as outer2D, p as perpendiculars, aK as pointIsWithinBounds, B as projectVector, a9 as projectVector2D, am as quaternionToMatrix3x3, r as radiansFromDegrees, w as random, a2 as randomSeed, F as rgb2hsv, G as rgb2lab, aE as rgb2xyz, J as round, an as roundNumber, b as roundVector, S as signedAngleBetweenVectors, as as singularValueDecomposition3x3, aL as solve3PointCircle, ay as solveHomogeneousLeastSquares, az as solveLeastSquares, s as solveLinearSystem, g as subtract, aj as transpose3x3, u as uninitializeBounds, aC as xyz2lab, aD as xyz2rgb } from './Math/index.js';
|