@vertexvis/geometry 1.0.1 → 1.0.2-canary.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/dist/bundle.cjs +94 -96
- package/dist/bundle.cjs.map +1 -1
- package/dist/bundle.js +94 -94
- package/dist/bundle.js.map +1 -1
- package/dist/cdn/bundle.js +94 -94
- package/dist/cdn/bundle.js.map +1 -1
- package/dist/cdn/bundle.min.js +1 -1
- package/dist/cdn/bundle.min.js.map +1 -1
- package/package.json +4 -4
package/dist/bundle.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var tslib = require('tslib');
|
|
6
4
|
|
|
7
5
|
/**
|
|
@@ -176,21 +174,21 @@ function fromJson$5(json) {
|
|
|
176
174
|
|
|
177
175
|
var point = /*#__PURE__*/Object.freeze({
|
|
178
176
|
__proto__: null,
|
|
177
|
+
add: add$1,
|
|
179
178
|
create: create$d,
|
|
180
|
-
polar: polar,
|
|
181
179
|
distance: distance$2,
|
|
182
|
-
|
|
183
|
-
add: add$1,
|
|
180
|
+
fromJson: fromJson$5,
|
|
184
181
|
isEqual: isEqual$3,
|
|
185
182
|
lerp: lerp$1,
|
|
186
|
-
negate: negate$1,
|
|
187
|
-
scale: scale$5,
|
|
188
|
-
scaleProportional: scaleProportional,
|
|
189
183
|
magnitude: magnitude$2,
|
|
190
|
-
|
|
184
|
+
negate: negate$1,
|
|
191
185
|
normalDirectionVector: normalDirectionVector,
|
|
186
|
+
normalizeVector: normalizeVector,
|
|
192
187
|
orthogonalVector: orthogonalVector,
|
|
193
|
-
|
|
188
|
+
polar: polar,
|
|
189
|
+
scale: scale$5,
|
|
190
|
+
scaleProportional: scaleProportional,
|
|
191
|
+
subtract: subtract$1
|
|
194
192
|
});
|
|
195
193
|
|
|
196
194
|
/**
|
|
@@ -778,30 +776,30 @@ function isType$2(obj) {
|
|
|
778
776
|
|
|
779
777
|
var matrix4 = /*#__PURE__*/Object.freeze({
|
|
780
778
|
__proto__: null,
|
|
781
|
-
fromValues: fromValues,
|
|
782
779
|
fromObject: fromObject,
|
|
780
|
+
fromValues: fromValues,
|
|
781
|
+
invert: invert,
|
|
782
|
+
isIdentity: isIdentity,
|
|
783
|
+
isType: isType$2,
|
|
784
|
+
lookAt: lookAt,
|
|
785
|
+
makeBasis: makeBasis,
|
|
786
|
+
makeFrustum: makeFrustum,
|
|
783
787
|
makeIdentity: makeIdentity,
|
|
784
|
-
|
|
785
|
-
|
|
788
|
+
makeLookAt: makeLookAt,
|
|
789
|
+
makeLookAtView: makeLookAtView,
|
|
790
|
+
makeOrthographic: makeOrthographic,
|
|
791
|
+
makePerspective: makePerspective,
|
|
786
792
|
makeRotation: makeRotation,
|
|
793
|
+
makeRotationAxis: makeRotationAxis,
|
|
787
794
|
makeScale: makeScale,
|
|
788
795
|
makeTRS: makeTRS,
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
makeFrustum: makeFrustum,
|
|
792
|
-
makePerspective: makePerspective,
|
|
793
|
-
makeOrthographic: makeOrthographic,
|
|
794
|
-
makeLookAtView: makeLookAtView,
|
|
795
|
-
makeLookAt: makeLookAt,
|
|
796
|
-
invert: invert,
|
|
797
|
-
lookAt: lookAt,
|
|
796
|
+
makeTranslation: makeTranslation,
|
|
797
|
+
makeZero: makeZero,
|
|
798
798
|
multiply: multiply$2,
|
|
799
|
-
transpose: transpose,
|
|
800
|
-
scale: scale$4,
|
|
801
799
|
position: position,
|
|
802
|
-
|
|
800
|
+
scale: scale$4,
|
|
803
801
|
toObject: toObject,
|
|
804
|
-
|
|
802
|
+
transpose: transpose
|
|
805
803
|
});
|
|
806
804
|
|
|
807
805
|
/**
|
|
@@ -959,8 +957,8 @@ var euler = /*#__PURE__*/Object.freeze({
|
|
|
959
957
|
__proto__: null,
|
|
960
958
|
create: create$c,
|
|
961
959
|
fromDegrees: fromDegrees,
|
|
962
|
-
fromRotationMatrix: fromRotationMatrix,
|
|
963
960
|
fromJson: fromJson$4,
|
|
961
|
+
fromRotationMatrix: fromRotationMatrix,
|
|
964
962
|
isType: isType$1
|
|
965
963
|
});
|
|
966
964
|
|
|
@@ -1161,15 +1159,15 @@ function isType(obj) {
|
|
|
1161
1159
|
var quaternion = /*#__PURE__*/Object.freeze({
|
|
1162
1160
|
__proto__: null,
|
|
1163
1161
|
create: create$b,
|
|
1164
|
-
fromJson: fromJson$3,
|
|
1165
|
-
normalize: normalize$1,
|
|
1166
|
-
magnitude: magnitude$1,
|
|
1167
|
-
scale: scale$3,
|
|
1168
1162
|
fromAxisAngle: fromAxisAngle,
|
|
1169
|
-
fromMatrixRotation: fromMatrixRotation,
|
|
1170
1163
|
fromEuler: fromEuler,
|
|
1164
|
+
fromJson: fromJson$3,
|
|
1165
|
+
fromMatrixRotation: fromMatrixRotation,
|
|
1166
|
+
isType: isType,
|
|
1167
|
+
magnitude: magnitude$1,
|
|
1171
1168
|
multiply: multiply$1,
|
|
1172
|
-
|
|
1169
|
+
normalize: normalize$1,
|
|
1170
|
+
scale: scale$3
|
|
1173
1171
|
});
|
|
1174
1172
|
|
|
1175
1173
|
function create$a() {
|
|
@@ -1553,42 +1551,42 @@ function transformNdcToWorldSpace(ndc, worldMatrix, projectionMatrixInverse) {
|
|
|
1553
1551
|
|
|
1554
1552
|
var vector3 = /*#__PURE__*/Object.freeze({
|
|
1555
1553
|
__proto__: null,
|
|
1554
|
+
add: add,
|
|
1555
|
+
angleTo: angleTo,
|
|
1556
|
+
back: back,
|
|
1556
1557
|
create: create$a,
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
right: right,
|
|
1564
|
-
up: up,
|
|
1558
|
+
cross: cross,
|
|
1559
|
+
distance: distance$1,
|
|
1560
|
+
distanceSquared: distanceSquared$1,
|
|
1561
|
+
dot: dot$1,
|
|
1562
|
+
down: down,
|
|
1563
|
+
eulerTo: eulerTo,
|
|
1565
1564
|
forward: forward,
|
|
1565
|
+
fromArray: fromArray,
|
|
1566
|
+
fromJson: fromJson$2,
|
|
1567
|
+
fromMatrixPosition: fromMatrixPosition,
|
|
1568
|
+
fromMatrixScale: fromMatrixScale,
|
|
1569
|
+
isEqual: isEqual$2,
|
|
1570
|
+
isValid: isValid$1,
|
|
1566
1571
|
left: left,
|
|
1567
|
-
|
|
1568
|
-
back: back,
|
|
1569
|
-
origin: origin,
|
|
1570
|
-
normalize: normalize,
|
|
1572
|
+
lerp: lerp,
|
|
1571
1573
|
magnitude: magnitude,
|
|
1572
1574
|
magnitudeSquared: magnitudeSquared,
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
subtract: subtract,
|
|
1575
|
+
max: max,
|
|
1576
|
+
min: min,
|
|
1576
1577
|
multiply: multiply,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
eulerTo: eulerTo,
|
|
1578
|
+
negate: negate,
|
|
1579
|
+
normalize: normalize,
|
|
1580
|
+
origin: origin,
|
|
1581
1581
|
project: project,
|
|
1582
|
+
right: right,
|
|
1582
1583
|
rotateAboutAxis: rotateAboutAxis,
|
|
1584
|
+
scale: scale$2,
|
|
1585
|
+
subtract: subtract,
|
|
1586
|
+
toArray: toArray,
|
|
1583
1587
|
transformMatrix: transformMatrix$1,
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
isEqual: isEqual$2,
|
|
1587
|
-
max: max,
|
|
1588
|
-
min: min,
|
|
1589
|
-
negate: negate,
|
|
1590
|
-
lerp: lerp,
|
|
1591
|
-
transformNdcToWorldSpace: transformNdcToWorldSpace
|
|
1588
|
+
transformNdcToWorldSpace: transformNdcToWorldSpace,
|
|
1589
|
+
up: up
|
|
1592
1590
|
});
|
|
1593
1591
|
|
|
1594
1592
|
/**
|
|
@@ -1653,14 +1651,14 @@ function isValid(boundingBox) {
|
|
|
1653
1651
|
|
|
1654
1652
|
var boundingBox = /*#__PURE__*/Object.freeze({
|
|
1655
1653
|
__proto__: null,
|
|
1656
|
-
create: create$9,
|
|
1657
|
-
fromVectors: fromVectors,
|
|
1658
1654
|
center: center$3,
|
|
1655
|
+
create: create$9,
|
|
1659
1656
|
diagonal: diagonal,
|
|
1660
1657
|
epsilon: epsilon,
|
|
1661
|
-
|
|
1658
|
+
fromVectors: fromVectors,
|
|
1659
|
+
isValid: isValid,
|
|
1662
1660
|
lengths: lengths,
|
|
1663
|
-
|
|
1661
|
+
union: union
|
|
1664
1662
|
});
|
|
1665
1663
|
|
|
1666
1664
|
/**
|
|
@@ -1874,26 +1872,26 @@ function fromJson$1(json) {
|
|
|
1874
1872
|
|
|
1875
1873
|
var rectangle = /*#__PURE__*/Object.freeze({
|
|
1876
1874
|
__proto__: null,
|
|
1875
|
+
area: area$1,
|
|
1876
|
+
bottomRight: bottomRight,
|
|
1877
|
+
center: center$2,
|
|
1878
|
+
containFit: containFit$1,
|
|
1879
|
+
containsPoints: containsPoints,
|
|
1877
1880
|
create: create$7,
|
|
1881
|
+
cropFit: cropFit$1,
|
|
1878
1882
|
fromDimensions: fromDimensions,
|
|
1883
|
+
fromJson: fromJson$1,
|
|
1879
1884
|
fromPointAndDimensions: fromPointAndDimensions,
|
|
1880
1885
|
fromPoints: fromPoints,
|
|
1881
|
-
containFit: containFit$1,
|
|
1882
|
-
cropFit: cropFit$1,
|
|
1883
|
-
scaleFit: scaleFit$1,
|
|
1884
|
-
scale: scale$1,
|
|
1885
1886
|
isEqual: isEqual$1,
|
|
1886
|
-
offset: offset,
|
|
1887
|
-
area: area$1,
|
|
1888
|
-
center: center$2,
|
|
1889
|
-
topLeft: topLeft,
|
|
1890
|
-
bottomRight: bottomRight,
|
|
1891
|
-
isPortrait: isPortrait,
|
|
1892
1887
|
isLandscape: isLandscape,
|
|
1888
|
+
isPortrait: isPortrait,
|
|
1893
1889
|
isSquare: isSquare,
|
|
1890
|
+
offset: offset,
|
|
1894
1891
|
pad: pad,
|
|
1895
|
-
|
|
1896
|
-
|
|
1892
|
+
scale: scale$1,
|
|
1893
|
+
scaleFit: scaleFit$1,
|
|
1894
|
+
topLeft: topLeft
|
|
1897
1895
|
});
|
|
1898
1896
|
|
|
1899
1897
|
/**
|
|
@@ -2037,22 +2035,22 @@ function toRectangle(dimensions, position) {
|
|
|
2037
2035
|
|
|
2038
2036
|
var dimensions = /*#__PURE__*/Object.freeze({
|
|
2039
2037
|
__proto__: null,
|
|
2038
|
+
area: area,
|
|
2039
|
+
aspectRatio: aspectRatio,
|
|
2040
|
+
center: center$1,
|
|
2041
|
+
containFit: containFit,
|
|
2040
2042
|
create: create$6,
|
|
2041
|
-
|
|
2043
|
+
cropFit: cropFit,
|
|
2044
|
+
fitToRatio: fitToRatio,
|
|
2045
|
+
floor: floor,
|
|
2042
2046
|
isEqual: isEqual,
|
|
2043
|
-
scale: scale,
|
|
2044
2047
|
proportionalScale: proportionalScale,
|
|
2045
|
-
trim: trim,
|
|
2046
|
-
containFit: containFit,
|
|
2047
|
-
cropFit: cropFit,
|
|
2048
|
-
scaleFit: scaleFit,
|
|
2049
2048
|
round: round,
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
toRectangle: toRectangle
|
|
2049
|
+
scale: scale,
|
|
2050
|
+
scaleFit: scaleFit,
|
|
2051
|
+
square: square,
|
|
2052
|
+
toRectangle: toRectangle,
|
|
2053
|
+
trim: trim
|
|
2056
2054
|
});
|
|
2057
2055
|
|
|
2058
2056
|
/**
|
|
@@ -2110,12 +2108,12 @@ function direction(line) {
|
|
|
2110
2108
|
|
|
2111
2109
|
var line3 = /*#__PURE__*/Object.freeze({
|
|
2112
2110
|
__proto__: null,
|
|
2113
|
-
create: create$5,
|
|
2114
2111
|
center: center,
|
|
2115
|
-
|
|
2112
|
+
create: create$5,
|
|
2113
|
+
direction: direction,
|
|
2116
2114
|
distance: distance,
|
|
2117
2115
|
distanceSquared: distanceSquared,
|
|
2118
|
-
|
|
2116
|
+
transformMatrix: transformMatrix
|
|
2119
2117
|
});
|
|
2120
2118
|
|
|
2121
2119
|
/**
|
|
@@ -2184,11 +2182,11 @@ var matrix = /*#__PURE__*/Object.freeze({
|
|
|
2184
2182
|
__proto__: null,
|
|
2185
2183
|
create: create$4,
|
|
2186
2184
|
identity: identity,
|
|
2187
|
-
translation: translation,
|
|
2188
|
-
rotation: rotation,
|
|
2189
2185
|
rotate: rotate,
|
|
2186
|
+
rotation: rotation,
|
|
2187
|
+
transformPoint: transformPoint,
|
|
2190
2188
|
translate: translate,
|
|
2191
|
-
|
|
2189
|
+
translation: translation
|
|
2192
2190
|
});
|
|
2193
2191
|
|
|
2194
2192
|
function create$3() {
|
|
@@ -2313,8 +2311,8 @@ function projectPoint(plane, point) {
|
|
|
2313
2311
|
var plane = /*#__PURE__*/Object.freeze({
|
|
2314
2312
|
__proto__: null,
|
|
2315
2313
|
create: create$2,
|
|
2316
|
-
fromNormalAndCoplanarPoint: fromNormalAndCoplanarPoint,
|
|
2317
2314
|
distanceToPoint: distanceToPoint,
|
|
2315
|
+
fromNormalAndCoplanarPoint: fromNormalAndCoplanarPoint,
|
|
2318
2316
|
intersectLine: intersectLine,
|
|
2319
2317
|
projectPoint: projectPoint
|
|
2320
2318
|
});
|
|
@@ -2381,8 +2379,8 @@ function intersectPlane(ray, plane) {
|
|
|
2381
2379
|
|
|
2382
2380
|
var ray = /*#__PURE__*/Object.freeze({
|
|
2383
2381
|
__proto__: null,
|
|
2384
|
-
create: create$1,
|
|
2385
2382
|
at: at,
|
|
2383
|
+
create: create$1,
|
|
2386
2384
|
distanceToPlane: distanceToPlane,
|
|
2387
2385
|
intersectPlane: intersectPlane
|
|
2388
2386
|
});
|