x_ite 14.2.0 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/assets/components/AnnotationComponent.js +2 -2
- package/dist/assets/components/AnnotationComponent.min.js +2 -2
- package/dist/assets/components/CADGeometryComponent.js +2 -2
- package/dist/assets/components/CADGeometryComponent.min.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.js +2 -2
- package/dist/assets/components/CubeMapTexturingComponent.min.js +2 -2
- package/dist/assets/components/DISComponent.js +2 -2
- package/dist/assets/components/DISComponent.min.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.js +2 -2
- package/dist/assets/components/EventUtilitiesComponent.min.js +2 -2
- package/dist/assets/components/Geometry2DComponent.js +2 -2
- package/dist/assets/components/Geometry2DComponent.min.js +2 -2
- package/dist/assets/components/Geometry3DComponent.js +2 -2
- package/dist/assets/components/Geometry3DComponent.min.js +2 -2
- package/dist/assets/components/GeospatialComponent.js +2 -2
- package/dist/assets/components/GeospatialComponent.min.js +2 -2
- package/dist/assets/components/HAnimComponent.js +2 -2
- package/dist/assets/components/HAnimComponent.min.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.js +2 -2
- package/dist/assets/components/KeyDeviceSensorComponent.min.js +2 -2
- package/dist/assets/components/LayoutComponent.js +61 -45
- package/dist/assets/components/LayoutComponent.min.js +2 -2
- package/dist/assets/components/NURBSComponent.js +2 -2
- package/dist/assets/components/NURBSComponent.min.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.js +2 -2
- package/dist/assets/components/ParticleSystemsComponent.min.js +2 -2
- package/dist/assets/components/PickingComponent.js +2 -2
- package/dist/assets/components/PickingComponent.min.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.js +2 -2
- package/dist/assets/components/RigidBodyPhysicsComponent.min.js +2 -2
- package/dist/assets/components/ScriptingComponent.js +4 -4
- package/dist/assets/components/ScriptingComponent.min.js +2 -2
- package/dist/assets/components/TextComponent.js +164 -84
- package/dist/assets/components/TextComponent.min.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.js +2 -2
- package/dist/assets/components/TextureProjectionComponent.min.js +2 -2
- package/dist/assets/components/Texturing3DComponent.js +12 -12
- package/dist/assets/components/Texturing3DComponent.min.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.js +2 -2
- package/dist/assets/components/VolumeRenderingComponent.min.js +2 -2
- package/dist/assets/components/WebXRComponent.js +2 -2
- package/dist/assets/components/WebXRComponent.min.js +2 -2
- package/dist/assets/components/X_ITEComponent.js +2 -2
- package/dist/assets/components/X_ITEComponent.min.js +2 -2
- package/dist/example.html +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.d.ts +59 -58
- package/dist/x_ite.js +1114 -1325
- package/dist/x_ite.min.js +2 -2
- package/dist/x_ite.min.mjs +2 -2
- package/dist/x_ite.mjs +1112 -1324
- package/dist/x_ite.zip +0 -0
- package/package.json +3 -3
package/dist/x_ite.mjs
CHANGED
|
@@ -1,40 +1,7 @@
|
|
|
1
|
-
/* X_ITE
|
|
1
|
+
/* X_ITE v15.0.0 */
|
|
2
2
|
var __webpack_modules__ = ({
|
|
3
3
|
|
|
4
|
-
/***/
|
|
5
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
|
-
|
|
7
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9
|
-
/* harmony export */ });
|
|
10
|
-
const Namespace = { };
|
|
11
|
-
|
|
12
|
-
Object .defineProperty (Namespace, "add",
|
|
13
|
-
{
|
|
14
|
-
value (name, module)
|
|
15
|
-
{
|
|
16
|
-
if (Namespace .hasOwnProperty (name))
|
|
17
|
-
{
|
|
18
|
-
console .error (new Error (`Namespace: "${name}" already exists.`));
|
|
19
|
-
return module;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const X3D = window [Symbol .for ("X_ITE.X3D-14.2.0")];
|
|
23
|
-
|
|
24
|
-
if (X3D)
|
|
25
|
-
X3D [name] = module;
|
|
26
|
-
|
|
27
|
-
// For x_ite.js:
|
|
28
|
-
return Namespace [name] = module;
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Namespace .add ("Namespace", Namespace));
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/***/ },
|
|
36
|
-
|
|
37
|
-
/***/ 868
|
|
4
|
+
/***/ 399
|
|
38
5
|
(module, exports) {
|
|
39
6
|
|
|
40
7
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
@@ -1039,7 +1006,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
1039
1006
|
|
|
1040
1007
|
/***/ },
|
|
1041
1008
|
|
|
1042
|
-
/***/
|
|
1009
|
+
/***/ 581
|
|
1043
1010
|
(module) {
|
|
1044
1011
|
|
|
1045
1012
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -2035,7 +2002,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
2035
2002
|
|
|
2036
2003
|
/***/ },
|
|
2037
2004
|
|
|
2038
|
-
/***/
|
|
2005
|
+
/***/ 878
|
|
2039
2006
|
(module, exports, __webpack_require__) {
|
|
2040
2007
|
|
|
2041
2008
|
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -2049,7 +2016,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2049
2016
|
if ( true ) {
|
|
2050
2017
|
|
|
2051
2018
|
// AMD. Register as an anonymous module.
|
|
2052
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(
|
|
2019
|
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(227) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
|
|
2053
2020
|
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
|
|
2054
2021
|
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
|
|
2055
2022
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
@@ -2280,7 +2247,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
2280
2247
|
|
|
2281
2248
|
/***/ },
|
|
2282
2249
|
|
|
2283
|
-
/***/
|
|
2250
|
+
/***/ 525
|
|
2284
2251
|
(module) {
|
|
2285
2252
|
|
|
2286
2253
|
/**
|
|
@@ -7059,7 +7026,7 @@ if (true) {
|
|
|
7059
7026
|
|
|
7060
7027
|
/***/ },
|
|
7061
7028
|
|
|
7062
|
-
/***/
|
|
7029
|
+
/***/ 260
|
|
7063
7030
|
(__unused_webpack_module, exports) {
|
|
7064
7031
|
|
|
7065
7032
|
|
|
@@ -10304,19 +10271,52 @@ if (true) {
|
|
|
10304
10271
|
|
|
10305
10272
|
/***/ },
|
|
10306
10273
|
|
|
10307
|
-
/***/
|
|
10274
|
+
/***/ 642
|
|
10275
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
10276
|
+
|
|
10277
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10278
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10279
|
+
/* harmony export */ });
|
|
10280
|
+
const Namespace = { };
|
|
10281
|
+
|
|
10282
|
+
Object .defineProperty (Namespace, "add",
|
|
10283
|
+
{
|
|
10284
|
+
value (name, module)
|
|
10285
|
+
{
|
|
10286
|
+
if (Namespace .hasOwnProperty (name))
|
|
10287
|
+
{
|
|
10288
|
+
console .error (new Error (`Namespace: "${name}" already exists.`));
|
|
10289
|
+
return module;
|
|
10290
|
+
}
|
|
10291
|
+
|
|
10292
|
+
const X3D = window [Symbol .for ("X_ITE.X3D-15.0.0")];
|
|
10293
|
+
|
|
10294
|
+
if (X3D)
|
|
10295
|
+
X3D [name] = module;
|
|
10296
|
+
|
|
10297
|
+
// For x_ite.js:
|
|
10298
|
+
return Namespace [name] = module;
|
|
10299
|
+
},
|
|
10300
|
+
});
|
|
10301
|
+
|
|
10302
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Namespace .add ("Namespace", Namespace));
|
|
10303
|
+
|
|
10304
|
+
|
|
10305
|
+
/***/ },
|
|
10306
|
+
|
|
10307
|
+
/***/ 227
|
|
10308
10308
|
(module, __unused_webpack_exports, __webpack_require__) {
|
|
10309
10309
|
|
|
10310
10310
|
|
|
10311
10311
|
|
|
10312
10312
|
// Bundlers are able to synchronously require an ESM module from a CommonJS one.
|
|
10313
|
-
const { jQuery } = __webpack_require__(
|
|
10313
|
+
const { jQuery } = __webpack_require__( 965 );
|
|
10314
10314
|
module.exports = jQuery;
|
|
10315
10315
|
|
|
10316
10316
|
|
|
10317
10317
|
/***/ },
|
|
10318
10318
|
|
|
10319
|
-
/***/
|
|
10319
|
+
/***/ 965
|
|
10320
10320
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
10321
10321
|
|
|
10322
10322
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -10324,7 +10324,7 @@ module.exports = jQuery;
|
|
|
10324
10324
|
/* harmony export */ jQuery: () => (/* binding */ jQuery)
|
|
10325
10325
|
/* harmony export */ });
|
|
10326
10326
|
/* unused harmony export $ */
|
|
10327
|
-
/* harmony import */ var _src_x_ite_Namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
10327
|
+
/* harmony import */ var _src_x_ite_Namespace_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(642);
|
|
10328
10328
|
/*!
|
|
10329
10329
|
* jQuery JavaScript Library v4.0.0+slim
|
|
10330
10330
|
* https://jquery.com/
|
|
@@ -17238,7 +17238,7 @@ const __default__ = jQuery;
|
|
|
17238
17238
|
/************************************************************************/
|
|
17239
17239
|
|
|
17240
17240
|
// EXTERNAL MODULE: ./src/x_ite/Namespace.js
|
|
17241
|
-
var Namespace = __webpack_require__(
|
|
17241
|
+
var Namespace = __webpack_require__(642);
|
|
17242
17242
|
;// ./src/x_ite/Base/X3DConstants.js
|
|
17243
17243
|
const X3DConstants =
|
|
17244
17244
|
{
|
|
@@ -18444,7 +18444,7 @@ const Features_default_ = Features;
|
|
|
18444
18444
|
|
|
18445
18445
|
/* harmony default export */ const x_ite_Features = (Namespace/* default */.A .add ("Features", Features_default_));
|
|
18446
18446
|
;// ./src/x_ite/Base/X3DObject.js
|
|
18447
|
-
/* provided dependency */ var $ = __webpack_require__(
|
|
18447
|
+
/* provided dependency */ var $ = __webpack_require__(965)["A"];
|
|
18448
18448
|
|
|
18449
18449
|
|
|
18450
18450
|
|
|
@@ -19070,58 +19070,67 @@ const
|
|
|
19070
19070
|
|
|
19071
19071
|
const handler =
|
|
19072
19072
|
{
|
|
19073
|
-
get (target, key)
|
|
19073
|
+
get (target, key, receiver)
|
|
19074
19074
|
{
|
|
19075
|
-
const value = target [key];
|
|
19076
|
-
|
|
19077
|
-
if (value !== undefined)
|
|
19078
|
-
return value;
|
|
19079
|
-
|
|
19080
19075
|
if (typeof key === "string")
|
|
19081
19076
|
{
|
|
19082
19077
|
const index = +key;
|
|
19083
19078
|
|
|
19084
19079
|
if (Number .isInteger (index))
|
|
19085
19080
|
return target [_array] [index];
|
|
19086
|
-
|
|
19087
|
-
return;
|
|
19088
19081
|
}
|
|
19082
|
+
|
|
19083
|
+
return Reflect .get (target, key, receiver);
|
|
19089
19084
|
},
|
|
19090
|
-
set (target, key, value)
|
|
19085
|
+
set (target, key, value, receiver)
|
|
19091
19086
|
{
|
|
19092
|
-
if (
|
|
19093
|
-
|
|
19087
|
+
if (typeof key === "string")
|
|
19088
|
+
{
|
|
19089
|
+
const index = +key;
|
|
19094
19090
|
|
|
19095
|
-
|
|
19096
|
-
|
|
19091
|
+
if (Number .isInteger (index))
|
|
19092
|
+
return false;
|
|
19093
|
+
}
|
|
19094
|
+
|
|
19095
|
+
return Reflect .set (target, key, value, receiver);
|
|
19097
19096
|
},
|
|
19098
19097
|
has (target, key)
|
|
19099
19098
|
{
|
|
19100
|
-
if (
|
|
19101
|
-
|
|
19099
|
+
if (typeof key === "string")
|
|
19100
|
+
{
|
|
19101
|
+
const index = +key;
|
|
19102
19102
|
|
|
19103
|
-
|
|
19103
|
+
if (Number .isInteger (index))
|
|
19104
|
+
return index < target [_array] .length;
|
|
19105
|
+
}
|
|
19106
|
+
|
|
19107
|
+
return Reflect .has (target, key);
|
|
19104
19108
|
},
|
|
19105
19109
|
ownKeys (target)
|
|
19106
19110
|
{
|
|
19107
|
-
return Object .keys (target [_array]);
|
|
19111
|
+
return Object .keys (target [_array]) .concat (Reflect .ownKeys (target));
|
|
19108
19112
|
},
|
|
19109
19113
|
getOwnPropertyDescriptor (target, key)
|
|
19110
19114
|
{
|
|
19111
|
-
if (typeof key
|
|
19112
|
-
return;
|
|
19113
|
-
|
|
19114
|
-
const index = +key;
|
|
19115
|
-
|
|
19116
|
-
if (Number .isInteger (index) && index < target [_array] .length)
|
|
19115
|
+
if (typeof key === "string")
|
|
19117
19116
|
{
|
|
19118
|
-
const
|
|
19117
|
+
const index = +key;
|
|
19118
|
+
|
|
19119
|
+
if (Number .isInteger (index))
|
|
19120
|
+
{
|
|
19121
|
+
if (index < target [_array] .length)
|
|
19122
|
+
{
|
|
19123
|
+
const propertyDescriptor = Object .getOwnPropertyDescriptor (target [_array], key);
|
|
19119
19124
|
|
|
19120
|
-
|
|
19121
|
-
|
|
19125
|
+
if (propertyDescriptor)
|
|
19126
|
+
propertyDescriptor .writable = false;
|
|
19122
19127
|
|
|
19123
|
-
|
|
19128
|
+
return propertyDescriptor;
|
|
19129
|
+
}
|
|
19130
|
+
}
|
|
19124
19131
|
}
|
|
19132
|
+
|
|
19133
|
+
return Reflect .getOwnPropertyDescriptor (target, key);
|
|
19125
19134
|
},
|
|
19126
19135
|
};
|
|
19127
19136
|
|
|
@@ -19809,11 +19818,12 @@ for (const key of Object .keys (X3DField .prototype))
|
|
|
19809
19818
|
|
|
19810
19819
|
Object .defineProperties (X3DField,
|
|
19811
19820
|
{
|
|
19812
|
-
|
|
19821
|
+
addStaticProperties:
|
|
19813
19822
|
{
|
|
19814
|
-
value (typeName)
|
|
19823
|
+
value (constructor, typeName)
|
|
19815
19824
|
{
|
|
19816
|
-
|
|
19825
|
+
Object .defineProperties (constructor,
|
|
19826
|
+
{
|
|
19817
19827
|
type:
|
|
19818
19828
|
{
|
|
19819
19829
|
value: Base_X3DConstants [typeName],
|
|
@@ -19824,6 +19834,17 @@ Object .defineProperties (X3DField,
|
|
|
19824
19834
|
value: typeName,
|
|
19825
19835
|
enumerable: true,
|
|
19826
19836
|
},
|
|
19837
|
+
fromValue:
|
|
19838
|
+
{
|
|
19839
|
+
value (value)
|
|
19840
|
+
{
|
|
19841
|
+
const field = Object .create (this .prototype);
|
|
19842
|
+
|
|
19843
|
+
X3DField .call (field, value);
|
|
19844
|
+
|
|
19845
|
+
return field;
|
|
19846
|
+
},
|
|
19847
|
+
},
|
|
19827
19848
|
fromString:
|
|
19828
19849
|
{
|
|
19829
19850
|
value (value, scene)
|
|
@@ -19868,7 +19889,7 @@ Object .defineProperties (X3DField,
|
|
|
19868
19889
|
return field;
|
|
19869
19890
|
},
|
|
19870
19891
|
},
|
|
19871
|
-
};
|
|
19892
|
+
});
|
|
19872
19893
|
},
|
|
19873
19894
|
},
|
|
19874
19895
|
})
|
|
@@ -19907,10 +19928,9 @@ const FieldArray_default_ = FieldArray;
|
|
|
19907
19928
|
;// ./src/x_ite/Fields/SFScalar.js
|
|
19908
19929
|
|
|
19909
19930
|
|
|
19910
|
-
|
|
19911
19931
|
function SFBoolTemplate (TypeName)
|
|
19912
19932
|
{
|
|
19913
|
-
function SFBool (value)
|
|
19933
|
+
function SFBool (value = false)
|
|
19914
19934
|
{
|
|
19915
19935
|
Base_X3DField .call (this, !! value);
|
|
19916
19936
|
}
|
|
@@ -19944,9 +19964,9 @@ function SFNumberTemplate (TypeName, double, defaultValue)
|
|
|
19944
19964
|
{
|
|
19945
19965
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
19946
19966
|
|
|
19947
|
-
function SFNumber (value)
|
|
19967
|
+
function SFNumber (value = defaultValue)
|
|
19948
19968
|
{
|
|
19949
|
-
Base_X3DField .call (this,
|
|
19969
|
+
Base_X3DField .call (this, +value);
|
|
19950
19970
|
}
|
|
19951
19971
|
|
|
19952
19972
|
return SFScalarPrototypeTemplate (SFNumber, TypeName,
|
|
@@ -19976,7 +19996,7 @@ function SFNumberTemplate (TypeName, double, defaultValue)
|
|
|
19976
19996
|
|
|
19977
19997
|
function SFInt32Template (TypeName)
|
|
19978
19998
|
{
|
|
19979
|
-
function SFInt32 (value)
|
|
19999
|
+
function SFInt32 (value = 0)
|
|
19980
20000
|
{
|
|
19981
20001
|
Base_X3DField .call (this, value|0);
|
|
19982
20002
|
}
|
|
@@ -19996,9 +20016,9 @@ function SFInt32Template (TypeName)
|
|
|
19996
20016
|
|
|
19997
20017
|
function SFStringTemplate (TypeName)
|
|
19998
20018
|
{
|
|
19999
|
-
function SFString (value)
|
|
20019
|
+
function SFString (value = "")
|
|
20000
20020
|
{
|
|
20001
|
-
Base_X3DField .call (this,
|
|
20021
|
+
Base_X3DField .call (this, String (value));
|
|
20002
20022
|
}
|
|
20003
20023
|
|
|
20004
20024
|
SFScalarPrototypeTemplate (SFString, TypeName,
|
|
@@ -20060,10 +20080,7 @@ function SFStringTemplate (TypeName)
|
|
|
20060
20080
|
|
|
20061
20081
|
function SFScalarPrototypeTemplate (Constructor, TypeName, properties = { })
|
|
20062
20082
|
{
|
|
20063
|
-
|
|
20064
|
-
{
|
|
20065
|
-
... Base_X3DField .getStaticProperties (TypeName),
|
|
20066
|
-
});
|
|
20083
|
+
Base_X3DField .addStaticProperties (Constructor, TypeName);
|
|
20067
20084
|
|
|
20068
20085
|
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
20069
20086
|
{
|
|
@@ -20366,26 +20383,9 @@ const Color3_default_ = Color3;
|
|
|
20366
20383
|
|
|
20367
20384
|
|
|
20368
20385
|
|
|
20369
|
-
|
|
20370
|
-
function SFColor (r, g, b)
|
|
20386
|
+
function SFColor (r = 0, g = 0, b = 0)
|
|
20371
20387
|
{
|
|
20372
|
-
|
|
20373
|
-
{
|
|
20374
|
-
case 0:
|
|
20375
|
-
Base_X3DField .call (this, new Numbers_Color3 ());
|
|
20376
|
-
break;
|
|
20377
|
-
|
|
20378
|
-
case 1:
|
|
20379
|
-
Base_X3DField .call (this, arguments [0]);
|
|
20380
|
-
break;
|
|
20381
|
-
|
|
20382
|
-
case 3:
|
|
20383
|
-
Base_X3DField .call (this, new Numbers_Color3 (+r, +g, +b));
|
|
20384
|
-
break;
|
|
20385
|
-
|
|
20386
|
-
default:
|
|
20387
|
-
throw new Error ("Invalid arguments.");
|
|
20388
|
-
}
|
|
20388
|
+
Base_X3DField .call (this, new Numbers_Color3 (+r, +g, +b));
|
|
20389
20389
|
}
|
|
20390
20390
|
|
|
20391
20391
|
Object .assign (Object .setPrototypeOf (SFColor .prototype, Base_X3DField .prototype),
|
|
@@ -20396,7 +20396,7 @@ Object .assign (Object .setPrototypeOf (SFColor .prototype, Base_X3DField .proto
|
|
|
20396
20396
|
},
|
|
20397
20397
|
copy ()
|
|
20398
20398
|
{
|
|
20399
|
-
return
|
|
20399
|
+
return SFColor .fromValue (this .getValue () .copy ());
|
|
20400
20400
|
},
|
|
20401
20401
|
equals (color)
|
|
20402
20402
|
{
|
|
@@ -20421,11 +20421,11 @@ Object .assign (Object .setPrototypeOf (SFColor .prototype, Base_X3DField .proto
|
|
|
20421
20421
|
},
|
|
20422
20422
|
linearToSRGB ()
|
|
20423
20423
|
{
|
|
20424
|
-
return
|
|
20424
|
+
return SFColor .fromValue (this .getValue () .linearToSRGB ());
|
|
20425
20425
|
},
|
|
20426
20426
|
sRGBToLinear ()
|
|
20427
20427
|
{
|
|
20428
|
-
return
|
|
20428
|
+
return SFColor .fromValue (this .getValue () .sRGBToLinear ());
|
|
20429
20429
|
},
|
|
20430
20430
|
lerp: (() =>
|
|
20431
20431
|
{
|
|
@@ -20441,7 +20441,7 @@ Object .assign (Object .setPrototypeOf (SFColor .prototype, Base_X3DField .proto
|
|
|
20441
20441
|
this .getValue () .getHSV (s);
|
|
20442
20442
|
destination .getValue () .getHSV (d);
|
|
20443
20443
|
|
|
20444
|
-
Numbers_Color3 .lerp (s, d, t, r);
|
|
20444
|
+
Numbers_Color3 .lerp (s, d, +t, r);
|
|
20445
20445
|
|
|
20446
20446
|
result .setHSV (r [0], r [1], r [2]);
|
|
20447
20447
|
|
|
@@ -20546,17 +20546,18 @@ Object .defineProperties (SFColor .prototype,
|
|
|
20546
20546
|
b: Object .assign ({ enumerable: true }, SFColor_b),
|
|
20547
20547
|
});
|
|
20548
20548
|
|
|
20549
|
+
Base_X3DField .addStaticProperties (SFColor, "SFColor");
|
|
20550
|
+
|
|
20549
20551
|
Object .defineProperties (SFColor,
|
|
20550
20552
|
{
|
|
20551
|
-
... Base_X3DField .getStaticProperties ("SFColor"),
|
|
20552
20553
|
BLACK:
|
|
20553
20554
|
{
|
|
20554
|
-
value:
|
|
20555
|
+
value: SFColor .fromValue (Numbers_Color3 .BLACK),
|
|
20555
20556
|
enumerable: true,
|
|
20556
20557
|
},
|
|
20557
20558
|
WHITE:
|
|
20558
20559
|
{
|
|
20559
|
-
value:
|
|
20560
|
+
value: SFColor .fromValue (Numbers_Color3 .WHITE),
|
|
20560
20561
|
enumerable: true,
|
|
20561
20562
|
},
|
|
20562
20563
|
fromHSV:
|
|
@@ -20749,26 +20750,9 @@ const Color4_default_ = Color4;
|
|
|
20749
20750
|
|
|
20750
20751
|
|
|
20751
20752
|
|
|
20752
|
-
|
|
20753
|
-
function SFColorRGBA (r, g, b, a)
|
|
20753
|
+
function SFColorRGBA (r = 0, g = 0, b = 0, a = 0)
|
|
20754
20754
|
{
|
|
20755
|
-
|
|
20756
|
-
{
|
|
20757
|
-
case 0:
|
|
20758
|
-
Base_X3DField .call (this, new Numbers_Color4 ());
|
|
20759
|
-
break;
|
|
20760
|
-
|
|
20761
|
-
case 1:
|
|
20762
|
-
Base_X3DField .call (this, arguments [0]);
|
|
20763
|
-
break;
|
|
20764
|
-
|
|
20765
|
-
case 4:
|
|
20766
|
-
Base_X3DField .call (this, new Numbers_Color4 (+r, +g, +b, +a));
|
|
20767
|
-
break
|
|
20768
|
-
|
|
20769
|
-
default:
|
|
20770
|
-
throw new Error ("Invalid arguments.");
|
|
20771
|
-
}
|
|
20755
|
+
Base_X3DField .call (this, new Numbers_Color4 (+r, +g, +b, +a));
|
|
20772
20756
|
}
|
|
20773
20757
|
|
|
20774
20758
|
Object .assign (Object .setPrototypeOf (SFColorRGBA .prototype, Base_X3DField .prototype),
|
|
@@ -20779,7 +20763,7 @@ Object .assign (Object .setPrototypeOf (SFColorRGBA .prototype, Base_X3DField .p
|
|
|
20779
20763
|
},
|
|
20780
20764
|
copy ()
|
|
20781
20765
|
{
|
|
20782
|
-
return
|
|
20766
|
+
return SFColorRGBA .fromValue (this .getValue () .copy ());
|
|
20783
20767
|
},
|
|
20784
20768
|
equals: Fields_SFColor .prototype .equals,
|
|
20785
20769
|
isDefaultValue ()
|
|
@@ -20798,11 +20782,11 @@ Object .assign (Object .setPrototypeOf (SFColorRGBA .prototype, Base_X3DField .p
|
|
|
20798
20782
|
},
|
|
20799
20783
|
linearToSRGB ()
|
|
20800
20784
|
{
|
|
20801
|
-
return
|
|
20785
|
+
return SFColorRGBA .fromValue (this .getValue () .linearToSRGB ());
|
|
20802
20786
|
},
|
|
20803
20787
|
sRGBToLinear ()
|
|
20804
20788
|
{
|
|
20805
|
-
return
|
|
20789
|
+
return SFColorRGBA .fromValue (this .getValue () .sRGBToLinear ());
|
|
20806
20790
|
},
|
|
20807
20791
|
lerp: (() =>
|
|
20808
20792
|
{
|
|
@@ -20818,7 +20802,7 @@ Object .assign (Object .setPrototypeOf (SFColorRGBA .prototype, Base_X3DField .p
|
|
|
20818
20802
|
this .getValue () .getHSVA (s);
|
|
20819
20803
|
destination .getValue () .getHSVA (d);
|
|
20820
20804
|
|
|
20821
|
-
Numbers_Color4 .lerp (s, d, t, r);
|
|
20805
|
+
Numbers_Color4 .lerp (s, d, +t, r);
|
|
20822
20806
|
|
|
20823
20807
|
result .setHSVA (r [0], r [1], r [2], r [3]);
|
|
20824
20808
|
|
|
@@ -20895,22 +20879,23 @@ Object .defineProperties (SFColorRGBA .prototype,
|
|
|
20895
20879
|
a: Object .assign ({ enumerable: true }, SFColorRGBA_a),
|
|
20896
20880
|
});
|
|
20897
20881
|
|
|
20882
|
+
Base_X3DField .addStaticProperties (SFColorRGBA, "SFColorRGBA");
|
|
20883
|
+
|
|
20898
20884
|
Object .defineProperties (SFColorRGBA,
|
|
20899
20885
|
{
|
|
20900
|
-
... Base_X3DField .getStaticProperties ("SFColorRGBA"),
|
|
20901
20886
|
BLACK:
|
|
20902
20887
|
{
|
|
20903
|
-
value:
|
|
20888
|
+
value: SFColorRGBA .fromValue (Numbers_Color4 .BLACK),
|
|
20904
20889
|
enumerable: true,
|
|
20905
20890
|
},
|
|
20906
20891
|
TRANSPARENT:
|
|
20907
20892
|
{
|
|
20908
|
-
value:
|
|
20893
|
+
value: SFColorRGBA .fromValue (Numbers_Color4 .TRANSPARENT),
|
|
20909
20894
|
enumerable: true,
|
|
20910
20895
|
},
|
|
20911
20896
|
WHITE:
|
|
20912
20897
|
{
|
|
20913
|
-
value:
|
|
20898
|
+
value: SFColorRGBA .fromValue (Numbers_Color4 .WHITE),
|
|
20914
20899
|
enumerable: true,
|
|
20915
20900
|
},
|
|
20916
20901
|
fromHSVA:
|
|
@@ -20933,15 +20918,11 @@ const SFColorRGBA_default_ = SFColorRGBA;
|
|
|
20933
20918
|
;// ./src/x_ite/Fields/SFMatrixPrototypeTemplate.js
|
|
20934
20919
|
|
|
20935
20920
|
|
|
20936
|
-
|
|
20937
20921
|
function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, properties = { })
|
|
20938
20922
|
{
|
|
20939
20923
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
20940
20924
|
|
|
20941
|
-
|
|
20942
|
-
{
|
|
20943
|
-
... Base_X3DField .getStaticProperties (TypeName),
|
|
20944
|
-
});
|
|
20925
|
+
Base_X3DField .addStaticProperties (Constructor, TypeName);
|
|
20945
20926
|
|
|
20946
20927
|
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
20947
20928
|
{
|
|
@@ -20951,7 +20932,7 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, prope
|
|
|
20951
20932
|
},
|
|
20952
20933
|
copy ()
|
|
20953
20934
|
{
|
|
20954
|
-
return
|
|
20935
|
+
return Constructor .fromValue (this .getValue () .copy ());
|
|
20955
20936
|
},
|
|
20956
20937
|
equals (matrix)
|
|
20957
20938
|
{
|
|
@@ -21026,47 +21007,47 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, prope
|
|
|
21026
21007
|
},
|
|
21027
21008
|
transpose ()
|
|
21028
21009
|
{
|
|
21029
|
-
return
|
|
21010
|
+
return Constructor .fromValue (this .getValue () .copy () .transpose ());
|
|
21030
21011
|
},
|
|
21031
21012
|
inverse ()
|
|
21032
21013
|
{
|
|
21033
|
-
return
|
|
21014
|
+
return Constructor .fromValue (this .getValue () .copy () .inverse ());
|
|
21034
21015
|
},
|
|
21035
21016
|
multLeft (matrix)
|
|
21036
21017
|
{
|
|
21037
|
-
return
|
|
21018
|
+
return Constructor .fromValue (this .getValue () .copy () .multLeft (matrix .getValue ()));
|
|
21038
21019
|
},
|
|
21039
21020
|
multRight (matrix)
|
|
21040
21021
|
{
|
|
21041
|
-
return
|
|
21022
|
+
return Constructor .fromValue (this .getValue () .copy () .multRight (matrix .getValue ()));
|
|
21042
21023
|
},
|
|
21043
21024
|
multVecMatrix (vector)
|
|
21044
21025
|
{
|
|
21045
|
-
return
|
|
21026
|
+
return vector .constructor .fromValue (this .getValue () .multVecMatrix (vector .getValue () .copy ()));
|
|
21046
21027
|
},
|
|
21047
21028
|
multMatrixVec (vector)
|
|
21048
21029
|
{
|
|
21049
|
-
return
|
|
21030
|
+
return vector .constructor .fromValue (this .getValue () .multMatrixVec (vector .getValue () .copy ()));
|
|
21050
21031
|
},
|
|
21051
21032
|
multDirMatrix (vector)
|
|
21052
21033
|
{
|
|
21053
|
-
return
|
|
21034
|
+
return vector .constructor .fromValue (this .getValue () .multDirMatrix (vector .getValue () .copy ()));
|
|
21054
21035
|
},
|
|
21055
21036
|
multMatrixDir (vector)
|
|
21056
21037
|
{
|
|
21057
|
-
return
|
|
21038
|
+
return vector .constructor .fromValue (this .getValue () .multMatrixDir (vector .getValue () .copy ()));
|
|
21058
21039
|
},
|
|
21059
21040
|
translate (translation)
|
|
21060
21041
|
{
|
|
21061
|
-
return
|
|
21042
|
+
return Constructor .fromValue (this .getValue () .copy () .translate (translation .getValue ()));
|
|
21062
21043
|
},
|
|
21063
21044
|
rotate (rotation)
|
|
21064
21045
|
{
|
|
21065
|
-
return
|
|
21046
|
+
return Constructor .fromValue (this .getValue () .copy () .rotate (rotation .getValue ()));
|
|
21066
21047
|
},
|
|
21067
21048
|
scale (scale)
|
|
21068
21049
|
{
|
|
21069
|
-
return
|
|
21050
|
+
return Constructor .fromValue (this .getValue () .copy () .scale (scale .getValue ()));
|
|
21070
21051
|
},
|
|
21071
21052
|
toStream (generator)
|
|
21072
21053
|
{
|
|
@@ -21141,6 +21122,20 @@ function SFMatrixPrototypeTemplate (Constructor, TypeName, Matrix, double, prope
|
|
|
21141
21122
|
for (let i = 0; i < Matrix .prototype .length; ++ i)
|
|
21142
21123
|
defineProperty (i);
|
|
21143
21124
|
|
|
21125
|
+
Object .defineProperties (Constructor,
|
|
21126
|
+
{
|
|
21127
|
+
ZERO:
|
|
21128
|
+
{
|
|
21129
|
+
value: Constructor .fromValue (Matrix .ZERO),
|
|
21130
|
+
enumerable: true,
|
|
21131
|
+
},
|
|
21132
|
+
IDENTITY:
|
|
21133
|
+
{
|
|
21134
|
+
value: Constructor .fromValue (Matrix .IDENTITY),
|
|
21135
|
+
enumerable: true,
|
|
21136
|
+
},
|
|
21137
|
+
});
|
|
21138
|
+
|
|
21144
21139
|
return Constructor;
|
|
21145
21140
|
}
|
|
21146
21141
|
|
|
@@ -21686,10 +21681,13 @@ Object .assign (Matrix2 .prototype,
|
|
|
21686
21681
|
},
|
|
21687
21682
|
equals (matrix)
|
|
21688
21683
|
{
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
|
|
21692
|
-
|
|
21684
|
+
for (let i = 0; i < 4; ++ i)
|
|
21685
|
+
{
|
|
21686
|
+
if (this [i] !== matrix [i])
|
|
21687
|
+
return false;
|
|
21688
|
+
}
|
|
21689
|
+
|
|
21690
|
+
return true;
|
|
21693
21691
|
},
|
|
21694
21692
|
set1 (r, c, value)
|
|
21695
21693
|
{
|
|
@@ -21879,6 +21877,7 @@ Object .defineProperties (Matrix2 .prototype,
|
|
|
21879
21877
|
|
|
21880
21878
|
Object .assign (Matrix2,
|
|
21881
21879
|
{
|
|
21880
|
+
ZERO: Object .freeze (new Matrix2 (0, 0, 0, 0)),
|
|
21882
21881
|
IDENTITY: Object .freeze (new Matrix2 ()),
|
|
21883
21882
|
});
|
|
21884
21883
|
|
|
@@ -22039,610 +22038,550 @@ const eigen_decomposition_default_ = eigen_decomposition;
|
|
|
22039
22038
|
|
|
22040
22039
|
|
|
22041
22040
|
|
|
22042
|
-
function Matrix3
|
|
22043
|
-
{
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
for (let i = 0; i < 9; ++ i)
|
|
22047
|
-
this [i] = args [i];
|
|
22041
|
+
function Matrix3(...args) {
|
|
22042
|
+
if (args.length) {
|
|
22043
|
+
for (let i = 0; i < 9; ++i)
|
|
22044
|
+
this[i] = args[i];
|
|
22048
22045
|
}
|
|
22049
|
-
else
|
|
22050
|
-
|
|
22051
|
-
this .identity ();
|
|
22046
|
+
else {
|
|
22047
|
+
this.identity();
|
|
22052
22048
|
}
|
|
22053
22049
|
}
|
|
22054
22050
|
|
|
22055
|
-
Object
|
|
22056
|
-
{
|
|
22057
|
-
*[Symbol .iterator] ()
|
|
22058
|
-
{
|
|
22059
|
-
for (let i = 0; i < 9; ++ i)
|
|
22060
|
-
yield this [i];
|
|
22061
|
-
},
|
|
22062
|
-
copy ()
|
|
22051
|
+
Object.assign(Matrix3.prototype,
|
|
22063
22052
|
{
|
|
22064
|
-
|
|
22065
|
-
|
|
22066
|
-
|
|
22067
|
-
|
|
22053
|
+
*[Symbol.iterator]() {
|
|
22054
|
+
for (let i = 0; i < 9; ++i)
|
|
22055
|
+
yield this[i];
|
|
22056
|
+
},
|
|
22057
|
+
copy() {
|
|
22058
|
+
const copy = Object.create(Matrix3.prototype);
|
|
22068
22059
|
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
assign (matrix)
|
|
22072
|
-
{
|
|
22073
|
-
for (let i = 0; i < 9; ++ i)
|
|
22074
|
-
this [i] = matrix [i];
|
|
22060
|
+
for (let i = 0; i < 9; ++i)
|
|
22061
|
+
copy[i] = this[i];
|
|
22075
22062
|
|
|
22076
|
-
|
|
22077
|
-
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
this [1] === matrix [1] &&
|
|
22082
|
-
this [2] === matrix [2] &&
|
|
22083
|
-
this [3] === matrix [3] &&
|
|
22084
|
-
this [4] === matrix [4] &&
|
|
22085
|
-
this [5] === matrix [5] &&
|
|
22086
|
-
this [6] === matrix [6] &&
|
|
22087
|
-
this [7] === matrix [7] &&
|
|
22088
|
-
this [8] === matrix [8];
|
|
22089
|
-
},
|
|
22090
|
-
set1 (r, c, value)
|
|
22091
|
-
{
|
|
22092
|
-
this [r * this .order + c] = value;
|
|
22063
|
+
return copy;
|
|
22064
|
+
},
|
|
22065
|
+
assign(matrix) {
|
|
22066
|
+
for (let i = 0; i < 9; ++i)
|
|
22067
|
+
this[i] = matrix[i];
|
|
22093
22068
|
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22099
|
-
|
|
22100
|
-
|
|
22101
|
-
{
|
|
22102
|
-
const invCenter = new Numbers_Vector2 ();
|
|
22069
|
+
return this;
|
|
22070
|
+
},
|
|
22071
|
+
equals(matrix) {
|
|
22072
|
+
for (let i = 0; i < 9; ++i) {
|
|
22073
|
+
if (this[i] !== matrix[i])
|
|
22074
|
+
return false;
|
|
22075
|
+
}
|
|
22103
22076
|
|
|
22104
|
-
|
|
22105
|
-
|
|
22106
|
-
|
|
22077
|
+
return true;
|
|
22078
|
+
},
|
|
22079
|
+
set1(r, c, value) {
|
|
22080
|
+
this[r * this.order + c] = value;
|
|
22107
22081
|
|
|
22108
|
-
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22082
|
+
return this;
|
|
22083
|
+
},
|
|
22084
|
+
get1(r, c) {
|
|
22085
|
+
return this[r * this.order + c];
|
|
22086
|
+
},
|
|
22087
|
+
set: (() => {
|
|
22088
|
+
const invCenter = new Numbers_Vector2();
|
|
22114
22089
|
|
|
22115
|
-
|
|
22116
|
-
|
|
22117
|
-
case 2:
|
|
22118
|
-
{
|
|
22119
|
-
if (translation && !translation .equals (Numbers_Vector2 .ZERO))
|
|
22120
|
-
this .translate (translation);
|
|
22090
|
+
return function (translation, rotation, scale, scaleOrientation, center) {
|
|
22091
|
+
this.identity();
|
|
22121
22092
|
|
|
22122
|
-
|
|
22123
|
-
|
|
22093
|
+
switch (arguments.length) {
|
|
22094
|
+
case 1:
|
|
22095
|
+
{
|
|
22096
|
+
if (translation && !translation.equals(Numbers_Vector2.ZERO))
|
|
22097
|
+
this.translate(translation);
|
|
22124
22098
|
|
|
22125
|
-
|
|
22126
|
-
|
|
22127
|
-
|
|
22128
|
-
|
|
22129
|
-
|
|
22130
|
-
|
|
22099
|
+
break;
|
|
22100
|
+
}
|
|
22101
|
+
case 2:
|
|
22102
|
+
{
|
|
22103
|
+
if (translation && !translation.equals(Numbers_Vector2.ZERO))
|
|
22104
|
+
this.translate(translation);
|
|
22131
22105
|
|
|
22132
|
-
|
|
22133
|
-
|
|
22106
|
+
if (rotation)
|
|
22107
|
+
this.rotate(rotation);
|
|
22134
22108
|
|
|
22135
|
-
|
|
22136
|
-
|
|
22109
|
+
break;
|
|
22110
|
+
}
|
|
22111
|
+
case 3:
|
|
22112
|
+
{
|
|
22113
|
+
if (translation && !translation.equals(Numbers_Vector2.ZERO))
|
|
22114
|
+
this.translate(translation);
|
|
22137
22115
|
|
|
22138
|
-
|
|
22139
|
-
|
|
22140
|
-
case 4:
|
|
22141
|
-
{
|
|
22142
|
-
if (translation && !translation .equals (Numbers_Vector2 .ZERO))
|
|
22143
|
-
this .translate (translation);
|
|
22116
|
+
if (rotation)
|
|
22117
|
+
this.rotate(rotation);
|
|
22144
22118
|
|
|
22145
|
-
|
|
22146
|
-
|
|
22119
|
+
if (scale && !scale.equals(Numbers_Vector2.ONE))
|
|
22120
|
+
this.scale(scale);
|
|
22147
22121
|
|
|
22148
|
-
|
|
22149
|
-
{
|
|
22150
|
-
if (scaleOrientation)
|
|
22151
|
-
{
|
|
22152
|
-
this .rotate (scaleOrientation);
|
|
22153
|
-
this .scale (scale);
|
|
22154
|
-
this .rotate (-scaleOrientation);
|
|
22122
|
+
break;
|
|
22155
22123
|
}
|
|
22156
|
-
|
|
22124
|
+
case 4:
|
|
22157
22125
|
{
|
|
22158
|
-
|
|
22126
|
+
if (translation && !translation.equals(Numbers_Vector2.ZERO))
|
|
22127
|
+
this.translate(translation);
|
|
22128
|
+
|
|
22129
|
+
if (rotation)
|
|
22130
|
+
this.rotate(rotation);
|
|
22131
|
+
|
|
22132
|
+
if (scale && !scale.equals(Numbers_Vector2.ONE)) {
|
|
22133
|
+
if (scaleOrientation) {
|
|
22134
|
+
this.rotate(scaleOrientation);
|
|
22135
|
+
this.scale(scale);
|
|
22136
|
+
this.rotate(-scaleOrientation);
|
|
22137
|
+
}
|
|
22138
|
+
else {
|
|
22139
|
+
this.scale(scale);
|
|
22140
|
+
}
|
|
22141
|
+
}
|
|
22142
|
+
|
|
22143
|
+
break;
|
|
22159
22144
|
}
|
|
22160
|
-
|
|
22145
|
+
case 5:
|
|
22146
|
+
{
|
|
22147
|
+
// P' = T * C * R * SR * S * -SR * -C * P
|
|
22148
|
+
if (translation && !translation.equals(Numbers_Vector2.ZERO))
|
|
22149
|
+
this.translate(translation);
|
|
22161
22150
|
|
|
22162
|
-
|
|
22163
|
-
}
|
|
22164
|
-
case 5:
|
|
22165
|
-
{
|
|
22166
|
-
// P' = T * C * R * SR * S * -SR * -C * P
|
|
22167
|
-
if (translation && !translation .equals (Numbers_Vector2 .ZERO))
|
|
22168
|
-
this .translate (translation);
|
|
22151
|
+
const hasCenter = center && !center.equals(Numbers_Vector2.ZERO);
|
|
22169
22152
|
|
|
22170
|
-
|
|
22153
|
+
if (hasCenter)
|
|
22154
|
+
this.translate(center);
|
|
22171
22155
|
|
|
22172
|
-
|
|
22173
|
-
|
|
22156
|
+
if (rotation)
|
|
22157
|
+
this.rotate(rotation);
|
|
22174
22158
|
|
|
22175
|
-
|
|
22176
|
-
|
|
22159
|
+
if (scale && !scale.equals(Numbers_Vector2.ONE)) {
|
|
22160
|
+
if (scaleOrientation) {
|
|
22161
|
+
this.rotate(scaleOrientation);
|
|
22162
|
+
this.scale(scale);
|
|
22163
|
+
this.rotate(-scaleOrientation);
|
|
22164
|
+
}
|
|
22165
|
+
else {
|
|
22166
|
+
this.scale(scale);
|
|
22167
|
+
}
|
|
22168
|
+
}
|
|
22177
22169
|
|
|
22178
|
-
|
|
22179
|
-
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
this .rotate (scaleOrientation);
|
|
22183
|
-
this .scale (scale);
|
|
22184
|
-
this .rotate (-scaleOrientation);
|
|
22170
|
+
if (hasCenter)
|
|
22171
|
+
this.translate(invCenter.assign(center).negate());
|
|
22172
|
+
|
|
22173
|
+
break;
|
|
22185
22174
|
}
|
|
22186
|
-
|
|
22175
|
+
case 9:
|
|
22187
22176
|
{
|
|
22188
|
-
|
|
22189
|
-
|
|
22190
|
-
}
|
|
22177
|
+
for (let i = 0; i < 9; ++i)
|
|
22178
|
+
this[i] = arguments[i];
|
|
22191
22179
|
|
|
22192
|
-
|
|
22193
|
-
|
|
22194
|
-
|
|
22195
|
-
break;
|
|
22180
|
+
break;
|
|
22181
|
+
}
|
|
22196
22182
|
}
|
|
22197
|
-
case 9:
|
|
22198
|
-
{
|
|
22199
|
-
for (let i = 0; i < 9; ++ i)
|
|
22200
|
-
this [i] = arguments [i];
|
|
22201
22183
|
|
|
22202
|
-
|
|
22203
|
-
|
|
22204
|
-
|
|
22184
|
+
return this;
|
|
22185
|
+
};
|
|
22186
|
+
})(),
|
|
22187
|
+
get: (() => {
|
|
22188
|
+
const c = new Numbers_Vector2();
|
|
22205
22189
|
|
|
22206
|
-
return
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22190
|
+
return function (translation, rotation, scale, scaleOrientation, center) {
|
|
22191
|
+
switch (arguments.length) {
|
|
22192
|
+
case 1:
|
|
22193
|
+
{
|
|
22194
|
+
translation.set(this[6], this[7]);
|
|
22195
|
+
break;
|
|
22196
|
+
}
|
|
22197
|
+
case 2:
|
|
22198
|
+
case 3:
|
|
22199
|
+
case 4:
|
|
22200
|
+
{
|
|
22201
|
+
this.factor(translation, rotation, scale, scaleOrientation);
|
|
22202
|
+
break;
|
|
22203
|
+
}
|
|
22204
|
+
case 5:
|
|
22205
|
+
{
|
|
22206
|
+
if (center) {
|
|
22207
|
+
m.set(c.assign(center).negate());
|
|
22208
|
+
m.multLeft(this);
|
|
22209
|
+
m.translate(center);
|
|
22210
|
+
m.get(translation, rotation, scale, scaleOrientation);
|
|
22211
|
+
}
|
|
22212
|
+
else {
|
|
22213
|
+
this.factor(translation, rotation, scale, scaleOrientation);
|
|
22214
|
+
}
|
|
22212
22215
|
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
switch (arguments .length)
|
|
22216
|
-
{
|
|
22217
|
-
case 1:
|
|
22218
|
-
{
|
|
22219
|
-
translation .set (this [6], this [7]);
|
|
22220
|
-
break;
|
|
22221
|
-
}
|
|
22222
|
-
case 2:
|
|
22223
|
-
case 3:
|
|
22224
|
-
case 4:
|
|
22225
|
-
{
|
|
22226
|
-
this .factor (translation, rotation, scale, scaleOrientation);
|
|
22227
|
-
break;
|
|
22216
|
+
break;
|
|
22217
|
+
}
|
|
22228
22218
|
}
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22234
|
-
|
|
22235
|
-
|
|
22236
|
-
|
|
22237
|
-
}
|
|
22238
|
-
else
|
|
22239
|
-
{
|
|
22240
|
-
this .factor (translation, rotation, scale, scaleOrientation);
|
|
22241
|
-
}
|
|
22219
|
+
};
|
|
22220
|
+
})(),
|
|
22221
|
+
factor: (() => {
|
|
22222
|
+
const
|
|
22223
|
+
s = new Numbers_Vector2(),
|
|
22224
|
+
si = new Numbers_Matrix2(),
|
|
22225
|
+
so = new Numbers_Matrix2(),
|
|
22226
|
+
b = new Numbers_Matrix2();
|
|
22242
22227
|
|
|
22243
|
-
|
|
22244
|
-
}
|
|
22245
|
-
}
|
|
22246
|
-
};
|
|
22247
|
-
})(),
|
|
22248
|
-
factor: (() =>
|
|
22249
|
-
{
|
|
22250
|
-
const
|
|
22251
|
-
s = new Numbers_Vector2 (),
|
|
22252
|
-
si = new Numbers_Matrix2 (),
|
|
22253
|
-
so = new Numbers_Matrix2 (),
|
|
22254
|
-
b = new Numbers_Matrix2 ();
|
|
22228
|
+
const eigen = { values: [], vectors: [[], []] };
|
|
22255
22229
|
|
|
22256
|
-
|
|
22230
|
+
return function (translation, rotation, scale, scaleOrientation) {
|
|
22231
|
+
// (1) Get translation.
|
|
22232
|
+
translation?.set(this[6], this[7]);
|
|
22257
22233
|
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
// (1) Get translation.
|
|
22261
|
-
translation ?.set (this [6], this [7]);
|
|
22234
|
+
// (2) Create 3x3 matrix.
|
|
22235
|
+
const a = this.submatrix;
|
|
22262
22236
|
|
|
22263
|
-
|
|
22264
|
-
|
|
22237
|
+
// (3) Compute det A. If negative, set sign = -1, else sign = 1
|
|
22238
|
+
const det = a.determinant();
|
|
22239
|
+
const det_sign = det < 0 ? -1 : 1;
|
|
22265
22240
|
|
|
22266
|
-
|
|
22267
|
-
|
|
22268
|
-
|
|
22241
|
+
// (4) B = A * !A (here !A means A transpose)
|
|
22242
|
+
b.assign(a).transpose().multLeft(a);
|
|
22243
|
+
const e = Algorithms_eigen_decomposition(b, eigen);
|
|
22269
22244
|
|
|
22270
|
-
|
|
22271
|
-
b .assign (a) .transpose () .multLeft (a);
|
|
22272
|
-
const e = Algorithms_eigen_decomposition (b, eigen);
|
|
22245
|
+
// Find min / max eigenvalues and do ratio test to determine singularity.
|
|
22273
22246
|
|
|
22274
|
-
|
|
22247
|
+
so.set(e.vectors[0][0], e.vectors[1][0],
|
|
22248
|
+
e.vectors[0][1], e.vectors[1][1]);
|
|
22275
22249
|
|
|
22276
|
-
|
|
22277
|
-
|
|
22250
|
+
if (scaleOrientation) {
|
|
22251
|
+
scaleOrientation[0] = so[0];
|
|
22252
|
+
scaleOrientation[1] = so[1];
|
|
22253
|
+
scaleOrientation[2] = Math.atan2(so[1], so[0]);
|
|
22254
|
+
}
|
|
22278
22255
|
|
|
22279
|
-
|
|
22280
|
-
{
|
|
22281
|
-
scaleOrientation [0] = so [0];
|
|
22282
|
-
scaleOrientation [1] = so [1];
|
|
22283
|
-
scaleOrientation [2] = Math .atan2 (so [1], so [0]);
|
|
22284
|
-
}
|
|
22256
|
+
// Compute s = sqrt(eigen values), with sign. Set si = s-inverse
|
|
22285
22257
|
|
|
22286
|
-
|
|
22258
|
+
s.set(det_sign * Math.sqrt(e.values[0]),
|
|
22259
|
+
det_sign * Math.sqrt(e.values[1]));
|
|
22287
22260
|
|
|
22288
|
-
|
|
22289
|
-
det_sign * Math .sqrt (e .values [1]));
|
|
22261
|
+
scale?.assign(s);
|
|
22290
22262
|
|
|
22291
|
-
|
|
22263
|
+
if (rotation) {
|
|
22264
|
+
si[0] = 1 / s.x;
|
|
22265
|
+
si[3] = 1 / s.y;
|
|
22292
22266
|
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
si [0] = 1 / s .x;
|
|
22296
|
-
si [3] = 1 / s .y;
|
|
22267
|
+
// (5) Compute U = !R ~S R A.
|
|
22268
|
+
a.multLeft(so).multLeft(si).multLeft(so.transpose());
|
|
22297
22269
|
|
|
22298
|
-
|
|
22299
|
-
|
|
22270
|
+
rotation[0] = a[0];
|
|
22271
|
+
rotation[1] = a[1];
|
|
22272
|
+
rotation[2] = Math.atan2(a[1], a[0]);
|
|
22273
|
+
}
|
|
22274
|
+
};
|
|
22275
|
+
})(),
|
|
22276
|
+
determinant2() {
|
|
22277
|
+
const { 0: m0, 1: m1, 3: m3, 4: m4 } = this;
|
|
22300
22278
|
|
|
22301
|
-
|
|
22302
|
-
|
|
22303
|
-
|
|
22304
|
-
}
|
|
22305
|
-
};
|
|
22306
|
-
})(),
|
|
22307
|
-
determinant2 ()
|
|
22308
|
-
{
|
|
22309
|
-
const { 0: m0, 1: m1, 3: m3, 4: m4 } = this;
|
|
22279
|
+
return m0 * m4 - m1 * m3;
|
|
22280
|
+
},
|
|
22281
|
+
determinant() {
|
|
22282
|
+
const { 0: m0, 1: m1, 2: m2, 3: m3, 4: m4, 5: m5, 6: m6, 7: m7, 8: m8 } = this;
|
|
22310
22283
|
|
|
22311
|
-
|
|
22312
|
-
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22284
|
+
return m0 * (m4 * m8 - m5 * m7) -
|
|
22285
|
+
m1 * (m3 * m8 - m5 * m6) +
|
|
22286
|
+
m2 * (m3 * m7 - m4 * m6);
|
|
22287
|
+
},
|
|
22288
|
+
transpose() {
|
|
22289
|
+
let tmp;
|
|
22316
22290
|
|
|
22317
|
-
|
|
22318
|
-
|
|
22319
|
-
|
|
22320
|
-
},
|
|
22321
|
-
transpose ()
|
|
22322
|
-
{
|
|
22323
|
-
let tmp;
|
|
22291
|
+
tmp = this[1]; this[1] = this[3]; this[3] = tmp;
|
|
22292
|
+
tmp = this[2]; this[2] = this[6]; this[6] = tmp;
|
|
22293
|
+
tmp = this[5]; this[5] = this[7]; this[7] = tmp;
|
|
22324
22294
|
|
|
22325
|
-
|
|
22326
|
-
|
|
22327
|
-
|
|
22295
|
+
return this;
|
|
22296
|
+
},
|
|
22297
|
+
inverse() {
|
|
22298
|
+
// Complexity 2 +, 16 -, 33 *, 1 /.
|
|
22328
22299
|
|
|
22329
|
-
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
|
|
22300
|
+
const
|
|
22301
|
+
{ 0: m0, 1: m1, 2: m2, 3: m3, 4: m4, 5: m5, 6: m6, 7: m7, 8: m8 } = this,
|
|
22302
|
+
t4 = m0 * m4,
|
|
22303
|
+
t6 = m0 * m7,
|
|
22304
|
+
t8 = m3 * m1,
|
|
22305
|
+
t10 = m3 * m7,
|
|
22306
|
+
t12 = m6 * m1,
|
|
22307
|
+
t14 = m6 * m4;
|
|
22334
22308
|
|
|
22335
|
-
|
|
22336
|
-
{ 0: m0, 1: m1, 2: m2, 3: m3, 4: m4, 5: m5, 6: m6, 7: m7, 8: m8 } = this,
|
|
22337
|
-
t4 = m0 * m4,
|
|
22338
|
-
t6 = m0 * m7,
|
|
22339
|
-
t8 = m3 * m1,
|
|
22340
|
-
t10 = m3 * m7,
|
|
22341
|
-
t12 = m6 * m1,
|
|
22342
|
-
t14 = m6 * m4;
|
|
22309
|
+
let d = (t4 * m8 - t6 * m5 - t8 * m8 + t10 * m2 + t12 * m5 - t14 * m2);
|
|
22343
22310
|
|
|
22344
|
-
|
|
22311
|
+
// if (d === 0) ... determinant is zero.
|
|
22345
22312
|
|
|
22346
|
-
|
|
22313
|
+
d = 1 / d;
|
|
22347
22314
|
|
|
22348
|
-
|
|
22315
|
+
const
|
|
22316
|
+
b0 = (m4 * m8 - m7 * m5) * d,
|
|
22317
|
+
b1 = -(m1 * m8 - m7 * m2) * d,
|
|
22318
|
+
b2 = (m1 * m5 - m4 * m2) * d,
|
|
22319
|
+
b3 = -(m3 * m8 - m6 * m5) * d,
|
|
22320
|
+
b4 = (m0 * m8 - m6 * m2) * d,
|
|
22321
|
+
b5 = -(m0 * m5 - m3 * m2) * d;
|
|
22322
|
+
|
|
22323
|
+
this[0] = b0;
|
|
22324
|
+
this[1] = b1;
|
|
22325
|
+
this[2] = b2;
|
|
22326
|
+
this[3] = b3;
|
|
22327
|
+
this[4] = b4;
|
|
22328
|
+
this[5] = b5;
|
|
22329
|
+
this[6] = (t10 - t14) * d;
|
|
22330
|
+
this[7] = -(t6 - t12) * d;
|
|
22331
|
+
this[8] = (t4 - t8) * d;
|
|
22349
22332
|
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
|
|
22353
|
-
|
|
22354
|
-
b3 = -(m3 * m8 - m6 * m5) * d,
|
|
22355
|
-
b4 = (m0 * m8 - m6 * m2) * d,
|
|
22356
|
-
b5 = -(m0 * m5 - m3 * m2) * d;
|
|
22333
|
+
return this;
|
|
22334
|
+
},
|
|
22335
|
+
multLeft(matrix) {
|
|
22336
|
+
// Complexity 18 +, 27 *.
|
|
22357
22337
|
|
|
22358
|
-
|
|
22359
|
-
this [1] = b1;
|
|
22360
|
-
this [2] = b2;
|
|
22361
|
-
this [3] = b3;
|
|
22362
|
-
this [4] = b4;
|
|
22363
|
-
this [5] = b5;
|
|
22364
|
-
this [6] = (t10 - t14) * d;
|
|
22365
|
-
this [7] = -(t6 - t12) * d;
|
|
22366
|
-
this [8] = (t4 - t8) * d;
|
|
22338
|
+
const { 0: a0, 1: a1, 2: a2, 3: a3, 4: a4, 5: a5, 6: a6, 7: a7, 8: a8 } = this;
|
|
22367
22339
|
|
|
22368
|
-
|
|
22369
|
-
},
|
|
22370
|
-
multLeft (matrix)
|
|
22371
|
-
{
|
|
22372
|
-
// Complexity 18 +, 27 *.
|
|
22340
|
+
var { 0: b0, 1: b1, 2: b2 } = matrix;
|
|
22373
22341
|
|
|
22374
|
-
|
|
22342
|
+
this[0] = a0 * b0 + a3 * b1 + a6 * b2;
|
|
22343
|
+
this[1] = a1 * b0 + a4 * b1 + a7 * b2;
|
|
22344
|
+
this[2] = a2 * b0 + a5 * b1 + a8 * b2;
|
|
22375
22345
|
|
|
22376
|
-
|
|
22346
|
+
var { 3: b0, 4: b1, 5: b2 } = matrix;
|
|
22377
22347
|
|
|
22378
|
-
|
|
22379
|
-
|
|
22380
|
-
|
|
22348
|
+
this[3] = a0 * b0 + a3 * b1 + a6 * b2;
|
|
22349
|
+
this[4] = a1 * b0 + a4 * b1 + a7 * b2;
|
|
22350
|
+
this[5] = a2 * b0 + a5 * b1 + a8 * b2;
|
|
22381
22351
|
|
|
22382
|
-
|
|
22352
|
+
var { 6: b0, 7: b1, 8: b2 } = matrix;
|
|
22383
22353
|
|
|
22384
|
-
|
|
22385
|
-
|
|
22386
|
-
|
|
22354
|
+
this[6] = a0 * b0 + a3 * b1 + a6 * b2;
|
|
22355
|
+
this[7] = a1 * b0 + a4 * b1 + a7 * b2;
|
|
22356
|
+
this[8] = a2 * b0 + a5 * b1 + a8 * b2;
|
|
22387
22357
|
|
|
22388
|
-
|
|
22358
|
+
return this;
|
|
22359
|
+
},
|
|
22360
|
+
multRight(matrix) {
|
|
22361
|
+
// Complexity 18 +, 27 *.
|
|
22389
22362
|
|
|
22390
|
-
|
|
22391
|
-
this [7] = a1 * b0 + a4 * b1 + a7 * b2;
|
|
22392
|
-
this [8] = a2 * b0 + a5 * b1 + a8 * b2;
|
|
22363
|
+
const { 0: b0, 1: b1, 2: b2, 3: b3, 4: b4, 5: b5, 6: b6, 7: b7, 8: b8 } = matrix;
|
|
22393
22364
|
|
|
22394
|
-
|
|
22395
|
-
},
|
|
22396
|
-
multRight (matrix)
|
|
22397
|
-
{
|
|
22398
|
-
// Complexity 18 +, 27 *.
|
|
22365
|
+
var { 0: a0, 1: a1, 2: a2 } = this;
|
|
22399
22366
|
|
|
22400
|
-
|
|
22367
|
+
this[0] = a0 * b0 + a1 * b3 + a2 * b6;
|
|
22368
|
+
this[1] = a0 * b1 + a1 * b4 + a2 * b7;
|
|
22369
|
+
this[2] = a0 * b2 + a1 * b5 + a2 * b8;
|
|
22401
22370
|
|
|
22402
|
-
|
|
22371
|
+
var { 3: a0, 4: a1, 5: a2 } = this;
|
|
22403
22372
|
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22373
|
+
this[3] = a0 * b0 + a1 * b3 + a2 * b6;
|
|
22374
|
+
this[4] = a0 * b1 + a1 * b4 + a2 * b7;
|
|
22375
|
+
this[5] = a0 * b2 + a1 * b5 + a2 * b8;
|
|
22407
22376
|
|
|
22408
|
-
|
|
22377
|
+
var { 6: a0, 7: a1, 8: a2 } = this;
|
|
22409
22378
|
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22379
|
+
this[6] = a0 * b0 + a1 * b3 + a2 * b6;
|
|
22380
|
+
this[7] = a0 * b1 + a1 * b4 + a2 * b7;
|
|
22381
|
+
this[8] = a0 * b2 + a1 * b5 + a2 * b8;
|
|
22413
22382
|
|
|
22414
|
-
|
|
22383
|
+
return this;
|
|
22384
|
+
},
|
|
22385
|
+
multVecMatrix(vector) {
|
|
22386
|
+
if (vector.length === 2) {
|
|
22387
|
+
const
|
|
22388
|
+
{ x, y } = vector,
|
|
22389
|
+
w = x * this[2] + y * this[5] + this[8];
|
|
22415
22390
|
|
|
22416
|
-
|
|
22417
|
-
|
|
22418
|
-
this [8] = a0 * b2 + a1 * b5 + a2 * b8;
|
|
22391
|
+
vector.x = (x * this[0] + y * this[3] + this[6]) / w;
|
|
22392
|
+
vector.y = (x * this[1] + y * this[4] + this[7]) / w;
|
|
22419
22393
|
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
|
|
22423
|
-
|
|
22424
|
-
if (vector .length === 2)
|
|
22425
|
-
{
|
|
22426
|
-
const
|
|
22427
|
-
{ x, y } = vector,
|
|
22428
|
-
w = x * this [2] + y * this [5] + this [8];
|
|
22394
|
+
return vector;
|
|
22395
|
+
}
|
|
22396
|
+
else {
|
|
22397
|
+
const { x, y, z } = vector;
|
|
22429
22398
|
|
|
22430
|
-
|
|
22431
|
-
|
|
22399
|
+
vector.x = x * this[0] + y * this[3] + z * this[6];
|
|
22400
|
+
vector.y = x * this[1] + y * this[4] + z * this[7];
|
|
22401
|
+
vector.z = x * this[2] + y * this[5] + z * this[8];
|
|
22432
22402
|
|
|
22433
|
-
|
|
22434
|
-
|
|
22435
|
-
|
|
22436
|
-
{
|
|
22437
|
-
|
|
22403
|
+
return vector;
|
|
22404
|
+
}
|
|
22405
|
+
},
|
|
22406
|
+
multMatrixVec(vector) {
|
|
22407
|
+
if (vector.length === 2) {
|
|
22408
|
+
const
|
|
22409
|
+
{ x, y } = vector,
|
|
22410
|
+
w = x * this[6] + y * this[7] + this[8];
|
|
22438
22411
|
|
|
22439
|
-
|
|
22440
|
-
|
|
22441
|
-
vector .z = x * this [2] + y * this [5] + z * this [8];
|
|
22412
|
+
vector.x = (x * this[0] + y * this[1] + this[2]) / w;
|
|
22413
|
+
vector.y = (x * this[3] + y * this[4] + this[5]) / w;
|
|
22442
22414
|
|
|
22443
|
-
|
|
22444
|
-
|
|
22445
|
-
|
|
22446
|
-
|
|
22447
|
-
{
|
|
22448
|
-
if (vector .length === 2)
|
|
22449
|
-
{
|
|
22450
|
-
const
|
|
22451
|
-
{ x, y } = vector,
|
|
22452
|
-
w = x * this [6] + y * this [7] + this [8];
|
|
22415
|
+
return vector;
|
|
22416
|
+
}
|
|
22417
|
+
else {
|
|
22418
|
+
const { x, y, z } = vector;
|
|
22453
22419
|
|
|
22454
|
-
|
|
22455
|
-
|
|
22420
|
+
vector.x = x * this[0] + y * this[1] + z * this[2];
|
|
22421
|
+
vector.y = x * this[3] + y * this[4] + z * this[5];
|
|
22422
|
+
vector.z = x * this[6] + y * this[7] + z * this[8];
|
|
22456
22423
|
|
|
22457
|
-
|
|
22458
|
-
|
|
22459
|
-
|
|
22460
|
-
{
|
|
22461
|
-
const { x, y
|
|
22424
|
+
return vector;
|
|
22425
|
+
}
|
|
22426
|
+
},
|
|
22427
|
+
multDirMatrix(vector) {
|
|
22428
|
+
const { x, y } = vector;
|
|
22462
22429
|
|
|
22463
|
-
vector
|
|
22464
|
-
vector
|
|
22465
|
-
vector .z = x * this [6] + y * this [7] + z * this [8];
|
|
22430
|
+
vector.x = x * this[0] + y * this[3];
|
|
22431
|
+
vector.y = x * this[1] + y * this[4];
|
|
22466
22432
|
|
|
22467
22433
|
return vector;
|
|
22468
|
-
}
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
{
|
|
22472
|
-
const { x, y } = vector;
|
|
22473
|
-
|
|
22474
|
-
vector .x = x * this [0] + y * this [3];
|
|
22475
|
-
vector .y = x * this [1] + y * this [4];
|
|
22476
|
-
|
|
22477
|
-
return vector;
|
|
22478
|
-
},
|
|
22479
|
-
multMatrixDir (vector)
|
|
22480
|
-
{
|
|
22481
|
-
const { x, y } = vector;
|
|
22434
|
+
},
|
|
22435
|
+
multMatrixDir(vector) {
|
|
22436
|
+
const { x, y } = vector;
|
|
22482
22437
|
|
|
22483
|
-
|
|
22484
|
-
|
|
22438
|
+
vector.x = x * this[0] + y * this[1];
|
|
22439
|
+
vector.y = x * this[3] + y * this[4];
|
|
22485
22440
|
|
|
22486
|
-
|
|
22487
|
-
|
|
22488
|
-
|
|
22489
|
-
|
|
22490
|
-
|
|
22491
|
-
|
|
22492
|
-
this [6] = 0; this [7] = 0; this [8] = 1;
|
|
22441
|
+
return vector;
|
|
22442
|
+
},
|
|
22443
|
+
identity() {
|
|
22444
|
+
this[0] = 1; this[1] = 0; this[2] = 0;
|
|
22445
|
+
this[3] = 0; this[4] = 1; this[5] = 0;
|
|
22446
|
+
this[6] = 0; this[7] = 0; this[8] = 1;
|
|
22493
22447
|
|
|
22494
|
-
|
|
22495
|
-
|
|
22496
|
-
|
|
22497
|
-
|
|
22498
|
-
const { x, y } = translation;
|
|
22448
|
+
return this;
|
|
22449
|
+
},
|
|
22450
|
+
translate(translation) {
|
|
22451
|
+
const { x, y } = translation;
|
|
22499
22452
|
|
|
22500
|
-
|
|
22501
|
-
|
|
22453
|
+
this[6] += this[0] * x + this[3] * y;
|
|
22454
|
+
this[7] += this[1] * x + this[4] * y;
|
|
22502
22455
|
|
|
22503
|
-
|
|
22504
|
-
|
|
22505
|
-
|
|
22506
|
-
|
|
22507
|
-
|
|
22508
|
-
|
|
22509
|
-
|
|
22510
|
-
{
|
|
22511
|
-
const { x, y } = scale;
|
|
22456
|
+
return this;
|
|
22457
|
+
},
|
|
22458
|
+
rotate(rotation) {
|
|
22459
|
+
return this.multLeft(Matrix3.fromRotation(rotation));
|
|
22460
|
+
},
|
|
22461
|
+
scale(scale) {
|
|
22462
|
+
const { x, y } = scale;
|
|
22512
22463
|
|
|
22513
|
-
|
|
22514
|
-
|
|
22464
|
+
this[0] *= x;
|
|
22465
|
+
this[3] *= y;
|
|
22515
22466
|
|
|
22516
|
-
|
|
22517
|
-
|
|
22467
|
+
this[1] *= x;
|
|
22468
|
+
this[4] *= y;
|
|
22518
22469
|
|
|
22519
|
-
|
|
22520
|
-
|
|
22521
|
-
|
|
22522
|
-
|
|
22523
|
-
const a = Math .tan (angle);
|
|
22470
|
+
return this;
|
|
22471
|
+
},
|
|
22472
|
+
skewX(angle) {
|
|
22473
|
+
const a = Math.tan(angle);
|
|
22524
22474
|
|
|
22525
|
-
|
|
22526
|
-
|
|
22527
|
-
|
|
22475
|
+
this[3] += this[0] * a;
|
|
22476
|
+
this[4] += this[1] * a;
|
|
22477
|
+
this[5] += this[2] * a;
|
|
22528
22478
|
|
|
22529
|
-
|
|
22530
|
-
|
|
22531
|
-
|
|
22532
|
-
|
|
22533
|
-
const a = Math .tan (angle);
|
|
22479
|
+
return this;
|
|
22480
|
+
},
|
|
22481
|
+
skewY(angle) {
|
|
22482
|
+
const a = Math.tan(angle);
|
|
22534
22483
|
|
|
22535
|
-
|
|
22536
|
-
|
|
22537
|
-
|
|
22484
|
+
this[0] += this[3] * a;
|
|
22485
|
+
this[1] += this[4] * a;
|
|
22486
|
+
this[2] += this[5] * a;
|
|
22538
22487
|
|
|
22539
|
-
|
|
22540
|
-
|
|
22541
|
-
|
|
22542
|
-
|
|
22543
|
-
|
|
22544
|
-
}
|
|
22545
|
-
});
|
|
22488
|
+
return this;
|
|
22489
|
+
},
|
|
22490
|
+
toString() {
|
|
22491
|
+
return Array.prototype.join.call(this, " ");
|
|
22492
|
+
},
|
|
22493
|
+
});
|
|
22546
22494
|
|
|
22547
|
-
for (const key of Object
|
|
22548
|
-
Object
|
|
22495
|
+
for (const key of Object.keys(Matrix3.prototype))
|
|
22496
|
+
Object.defineProperty(Matrix3.prototype, key, { enumerable: false });
|
|
22549
22497
|
|
|
22550
|
-
Object
|
|
22551
|
-
{
|
|
22552
|
-
order: { value: 3 },
|
|
22553
|
-
length: { value: 9 },
|
|
22554
|
-
x:
|
|
22498
|
+
Object.defineProperties(Matrix3.prototype,
|
|
22555
22499
|
{
|
|
22556
|
-
|
|
22500
|
+
order: { value: 3 },
|
|
22501
|
+
length: { value: 9 },
|
|
22502
|
+
x:
|
|
22557
22503
|
{
|
|
22558
|
-
|
|
22504
|
+
get: (() => {
|
|
22505
|
+
const vector = new Numbers_Vector3();
|
|
22559
22506
|
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
|
|
22564
|
-
{
|
|
22565
|
-
get: (() =>
|
|
22507
|
+
return function () { return vector.set(this[0], this[1], this[2]); };
|
|
22508
|
+
})(),
|
|
22509
|
+
},
|
|
22510
|
+
y:
|
|
22566
22511
|
{
|
|
22567
|
-
|
|
22512
|
+
get: (() => {
|
|
22513
|
+
const vector = new Numbers_Vector3();
|
|
22568
22514
|
|
|
22569
|
-
|
|
22570
|
-
|
|
22571
|
-
|
|
22572
|
-
|
|
22573
|
-
{
|
|
22574
|
-
get: (() =>
|
|
22515
|
+
return function () { return vector.set(this[3], this[4], this[5]); };
|
|
22516
|
+
})(),
|
|
22517
|
+
},
|
|
22518
|
+
z:
|
|
22575
22519
|
{
|
|
22576
|
-
|
|
22520
|
+
get: (() => {
|
|
22521
|
+
const vector = new Numbers_Vector3();
|
|
22577
22522
|
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
|
|
22582
|
-
{
|
|
22583
|
-
get: (() =>
|
|
22523
|
+
return function () { return vector.set(this[6], this[7], this[8]); };
|
|
22524
|
+
})(),
|
|
22525
|
+
},
|
|
22526
|
+
xAxis:
|
|
22584
22527
|
{
|
|
22585
|
-
|
|
22528
|
+
get: (() => {
|
|
22529
|
+
const vector = new Numbers_Vector2();
|
|
22586
22530
|
|
|
22587
|
-
|
|
22588
|
-
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
{
|
|
22592
|
-
get: (() =>
|
|
22531
|
+
return function () { return vector.set(this[0], this[1]); };
|
|
22532
|
+
})(),
|
|
22533
|
+
},
|
|
22534
|
+
yAxis:
|
|
22593
22535
|
{
|
|
22594
|
-
|
|
22536
|
+
get: (() => {
|
|
22537
|
+
const vector = new Numbers_Vector2();
|
|
22595
22538
|
|
|
22596
|
-
|
|
22597
|
-
|
|
22598
|
-
|
|
22599
|
-
|
|
22600
|
-
{
|
|
22601
|
-
get: (() =>
|
|
22539
|
+
return function () { return vector.set(this[3], this[4]); };
|
|
22540
|
+
})(),
|
|
22541
|
+
},
|
|
22542
|
+
origin:
|
|
22602
22543
|
{
|
|
22603
|
-
|
|
22544
|
+
get: (() => {
|
|
22545
|
+
const vector = new Numbers_Vector2();
|
|
22604
22546
|
|
|
22605
|
-
|
|
22606
|
-
|
|
22607
|
-
|
|
22608
|
-
|
|
22609
|
-
{
|
|
22610
|
-
get: (() =>
|
|
22547
|
+
return function () { return vector.set(this[6], this[7]); };
|
|
22548
|
+
})(),
|
|
22549
|
+
},
|
|
22550
|
+
submatrix:
|
|
22611
22551
|
{
|
|
22612
|
-
|
|
22552
|
+
get: (() => {
|
|
22553
|
+
const matrix = new Numbers_Matrix2();
|
|
22613
22554
|
|
|
22614
|
-
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
|
|
22619
|
-
}
|
|
22620
|
-
}
|
|
22621
|
-
}
|
|
22622
|
-
});
|
|
22555
|
+
return function () {
|
|
22556
|
+
matrix[0] = this[0]; matrix[1] = this[1];
|
|
22557
|
+
matrix[2] = this[3]; matrix[3] = this[4];
|
|
22558
|
+
return matrix;
|
|
22559
|
+
};
|
|
22560
|
+
})(),
|
|
22561
|
+
},
|
|
22562
|
+
});
|
|
22623
22563
|
|
|
22624
|
-
Object
|
|
22625
|
-
{
|
|
22626
|
-
IDENTITY: Object .freeze (new Matrix3 ()),
|
|
22627
|
-
fromRotation (rotation)
|
|
22564
|
+
Object.assign(Matrix3,
|
|
22628
22565
|
{
|
|
22629
|
-
|
|
22630
|
-
|
|
22631
|
-
|
|
22566
|
+
ZERO: Object.freeze(new Matrix3(0, 0, 0, 0, 0, 0, 0, 0, 0)),
|
|
22567
|
+
IDENTITY: Object.freeze(new Matrix3()),
|
|
22568
|
+
fromRotation(rotation) {
|
|
22569
|
+
const
|
|
22570
|
+
sinAngle = Math.sin(rotation),
|
|
22571
|
+
cosAngle = Math.cos(rotation);
|
|
22632
22572
|
|
|
22633
|
-
|
|
22634
|
-
|
|
22635
|
-
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
|
|
22641
|
-
|
|
22642
|
-
}
|
|
22643
|
-
});
|
|
22573
|
+
return new Matrix3(cosAngle, sinAngle, 0,
|
|
22574
|
+
-sinAngle, cosAngle, 0,
|
|
22575
|
+
0, 0, 1);
|
|
22576
|
+
},
|
|
22577
|
+
fromMatrix2(matrix) {
|
|
22578
|
+
return new Matrix3(matrix[0], matrix[1], 0,
|
|
22579
|
+
matrix[2], matrix[3], 0,
|
|
22580
|
+
0, 0, 1);
|
|
22581
|
+
},
|
|
22582
|
+
});
|
|
22644
22583
|
|
|
22645
|
-
const m = new Matrix3
|
|
22584
|
+
const m = new Matrix3();
|
|
22646
22585
|
|
|
22647
22586
|
const Matrix3_default_ = Matrix3;
|
|
22648
22587
|
;
|
|
@@ -22653,57 +22592,18 @@ const Matrix3_default_ = Matrix3;
|
|
|
22653
22592
|
|
|
22654
22593
|
|
|
22655
22594
|
|
|
22595
|
+
|
|
22656
22596
|
function SFMatrix3Template (TypeName, double)
|
|
22657
22597
|
{
|
|
22658
|
-
function SFMatrix3 (m00, m01, m02,
|
|
22659
|
-
m10, m11, m12,
|
|
22660
|
-
m20, m21, m22)
|
|
22598
|
+
function SFMatrix3 (m00 = 1, m01 = 0, m02 = 0,
|
|
22599
|
+
m10 = 0, m11 = 1, m12 = 0,
|
|
22600
|
+
m20 = 0, m21 = 0, m22 = 1)
|
|
22661
22601
|
{
|
|
22662
|
-
|
|
22663
|
-
|
|
22664
|
-
|
|
22665
|
-
Base_X3DField .call (this, new Numbers_Matrix3 ());
|
|
22666
|
-
break;
|
|
22667
|
-
|
|
22668
|
-
case 1:
|
|
22669
|
-
Base_X3DField .call (this, arguments [0]);
|
|
22670
|
-
break;
|
|
22671
|
-
|
|
22672
|
-
case 3:
|
|
22673
|
-
{
|
|
22674
|
-
const
|
|
22675
|
-
r0 = arguments [0],
|
|
22676
|
-
r1 = arguments [1],
|
|
22677
|
-
r2 = arguments [2];
|
|
22678
|
-
|
|
22679
|
-
Base_X3DField .call (this, new Numbers_Matrix3 (r0 .x, r0 .y, r0 .z,
|
|
22680
|
-
r1 .x, r1 .y, r1 .z,
|
|
22681
|
-
r2 .x, r2 .y, r2 .z));
|
|
22682
|
-
|
|
22683
|
-
break;
|
|
22684
|
-
}
|
|
22685
|
-
case 9:
|
|
22686
|
-
{
|
|
22687
|
-
Base_X3DField .call (this, new Numbers_Matrix3 (+m00, +m01, +m02,
|
|
22688
|
-
+m10, +m11, +m12,
|
|
22689
|
-
+m20, +m21, +m22));
|
|
22690
|
-
|
|
22691
|
-
break;
|
|
22692
|
-
}
|
|
22693
|
-
default:
|
|
22694
|
-
throw new Error ("Invalid arguments.");
|
|
22695
|
-
}
|
|
22602
|
+
Base_X3DField .call (this, new Numbers_Matrix3 (+m00, +m01, +m02,
|
|
22603
|
+
+m10, +m11, +m12,
|
|
22604
|
+
+m20, +m21, +m22));
|
|
22696
22605
|
}
|
|
22697
22606
|
|
|
22698
|
-
Object .defineProperties (SFMatrix3,
|
|
22699
|
-
{
|
|
22700
|
-
IDENTITY:
|
|
22701
|
-
{
|
|
22702
|
-
value: new SFMatrix3 (),
|
|
22703
|
-
enumerable: true,
|
|
22704
|
-
},
|
|
22705
|
-
});
|
|
22706
|
-
|
|
22707
22607
|
return Fields_SFMatrixPrototypeTemplate (SFMatrix3, TypeName, Numbers_Matrix3, double,
|
|
22708
22608
|
{
|
|
22709
22609
|
setTransform: (() =>
|
|
@@ -22712,7 +22612,7 @@ function SFMatrix3Template (TypeName, double)
|
|
|
22712
22612
|
|
|
22713
22613
|
return function (translation, rotation, scale, scaleOrientation, center)
|
|
22714
22614
|
{
|
|
22715
|
-
args .push (translation ?.getValue (), rotation, scale ?.getValue (), scaleOrientation, center ?.getValue ());
|
|
22615
|
+
args .push (translation ?.getValue (), +rotation, scale ?.getValue (), +scaleOrientation, center ?.getValue ());
|
|
22716
22616
|
|
|
22717
22617
|
for (let i = args .length - 1; i > -1; -- i)
|
|
22718
22618
|
{
|
|
@@ -22729,15 +22629,15 @@ function SFMatrix3Template (TypeName, double)
|
|
|
22729
22629
|
})(),
|
|
22730
22630
|
rotate (rotation)
|
|
22731
22631
|
{
|
|
22732
|
-
return
|
|
22632
|
+
return SFMatrix3 .fromValue (this .getValue () .copy () .rotate (+rotation));
|
|
22733
22633
|
},
|
|
22734
22634
|
skewX (angle)
|
|
22735
22635
|
{
|
|
22736
|
-
return
|
|
22636
|
+
return SFMatrix3 .fromValue (this .getValue () .copy () .skewX (+angle));
|
|
22737
22637
|
},
|
|
22738
22638
|
skewY (angle)
|
|
22739
22639
|
{
|
|
22740
|
-
return
|
|
22640
|
+
return SFMatrix3 .fromValue (this .getValue () .copy () .skewY (+angle));
|
|
22741
22641
|
},
|
|
22742
22642
|
});
|
|
22743
22643
|
}
|
|
@@ -23789,32 +23689,9 @@ Object .assign (Rotation4 .prototype,
|
|
|
23789
23689
|
|
|
23790
23690
|
return this;
|
|
23791
23691
|
},
|
|
23792
|
-
|
|
23692
|
+
equals (rotation)
|
|
23793
23693
|
{
|
|
23794
|
-
this [
|
|
23795
|
-
this [_y] = y;
|
|
23796
|
-
this [_z] = z;
|
|
23797
|
-
this [_angle] = angle;
|
|
23798
|
-
|
|
23799
|
-
const scale = Math .hypot (x, y, z);
|
|
23800
|
-
|
|
23801
|
-
if (scale === 0)
|
|
23802
|
-
{
|
|
23803
|
-
this [_quaternion] .set (0, 0, 0, 1);
|
|
23804
|
-
return this;
|
|
23805
|
-
}
|
|
23806
|
-
|
|
23807
|
-
// Calculate quaternion
|
|
23808
|
-
|
|
23809
|
-
const
|
|
23810
|
-
halfTheta = Math_Algorithm .interval (angle / 2, 0, Math .PI),
|
|
23811
|
-
ascale = Math .sin (halfTheta) / scale;
|
|
23812
|
-
|
|
23813
|
-
this [_quaternion] .set (x * ascale,
|
|
23814
|
-
y * ascale,
|
|
23815
|
-
z * ascale,
|
|
23816
|
-
Math .cos (halfTheta));
|
|
23817
|
-
return this;
|
|
23694
|
+
return this [_quaternion] .equals (rotation [_quaternion]);
|
|
23818
23695
|
},
|
|
23819
23696
|
get: (() =>
|
|
23820
23697
|
{
|
|
@@ -23850,6 +23727,33 @@ Object .assign (Rotation4 .prototype,
|
|
|
23850
23727
|
}
|
|
23851
23728
|
};
|
|
23852
23729
|
})(),
|
|
23730
|
+
set (x = 0, y = 0, z = 1, angle = 0)
|
|
23731
|
+
{
|
|
23732
|
+
this [_x] = x;
|
|
23733
|
+
this [_y] = y;
|
|
23734
|
+
this [_z] = z;
|
|
23735
|
+
this [_angle] = angle;
|
|
23736
|
+
|
|
23737
|
+
const scale = Math .hypot (x, y, z);
|
|
23738
|
+
|
|
23739
|
+
if (scale === 0)
|
|
23740
|
+
{
|
|
23741
|
+
this [_quaternion] .set (0, 0, 0, 1);
|
|
23742
|
+
return this;
|
|
23743
|
+
}
|
|
23744
|
+
|
|
23745
|
+
// Calculate quaternion
|
|
23746
|
+
|
|
23747
|
+
const
|
|
23748
|
+
halfTheta = Math_Algorithm .interval (angle / 2, 0, Math .PI),
|
|
23749
|
+
ascale = Math .sin (halfTheta) / scale;
|
|
23750
|
+
|
|
23751
|
+
this [_quaternion] .set (x * ascale,
|
|
23752
|
+
y * ascale,
|
|
23753
|
+
z * ascale,
|
|
23754
|
+
Math .cos (halfTheta));
|
|
23755
|
+
return this;
|
|
23756
|
+
},
|
|
23853
23757
|
setAxisAngle (axis, angle)
|
|
23854
23758
|
{
|
|
23855
23759
|
return this .set (axis .x, axis .y, axis .z, angle);
|
|
@@ -23915,17 +23819,21 @@ Object .assign (Rotation4 .prototype,
|
|
|
23915
23819
|
return this;
|
|
23916
23820
|
};
|
|
23917
23821
|
})(),
|
|
23822
|
+
getAxis (axis = new Numbers_Vector3 ())
|
|
23823
|
+
{
|
|
23824
|
+
return axis .set (this [_x], this [_y], this [_z]);
|
|
23825
|
+
},
|
|
23918
23826
|
setAxis (vector)
|
|
23919
23827
|
{
|
|
23920
23828
|
this .set (vector .x, vector .y, vector .z, this [_angle]);
|
|
23921
23829
|
},
|
|
23922
|
-
|
|
23830
|
+
getMatrix (matrix = new Numbers_Matrix3 ())
|
|
23923
23831
|
{
|
|
23924
|
-
return
|
|
23832
|
+
return this [_quaternion] .getMatrix (matrix);
|
|
23925
23833
|
},
|
|
23926
|
-
|
|
23834
|
+
setMatrix (matrix)
|
|
23927
23835
|
{
|
|
23928
|
-
this [_quaternion] .
|
|
23836
|
+
this [_quaternion] .setMatrix (matrix) .normalize ();
|
|
23929
23837
|
this .update ();
|
|
23930
23838
|
return this;
|
|
23931
23839
|
},
|
|
@@ -23933,15 +23841,15 @@ Object .assign (Rotation4 .prototype,
|
|
|
23933
23841
|
{
|
|
23934
23842
|
return quaternion .assign (this [_quaternion]);
|
|
23935
23843
|
},
|
|
23936
|
-
|
|
23844
|
+
setQuaternion (quaternion)
|
|
23937
23845
|
{
|
|
23938
|
-
this [_quaternion] .
|
|
23846
|
+
this [_quaternion] .assign (quaternion) .normalize ();
|
|
23939
23847
|
this .update ();
|
|
23940
23848
|
return this;
|
|
23941
23849
|
},
|
|
23942
|
-
|
|
23850
|
+
getEuler (euler = [ ], order = "XYZ")
|
|
23943
23851
|
{
|
|
23944
|
-
return this [_quaternion] .
|
|
23852
|
+
return this [_quaternion] .getEuler (euler, order);
|
|
23945
23853
|
},
|
|
23946
23854
|
setEuler (x, y, z, order = "XYZ")
|
|
23947
23855
|
{
|
|
@@ -23950,14 +23858,6 @@ Object .assign (Rotation4 .prototype,
|
|
|
23950
23858
|
this .update ();
|
|
23951
23859
|
return this;
|
|
23952
23860
|
},
|
|
23953
|
-
getEuler (euler = [ ], order = "XYZ")
|
|
23954
|
-
{
|
|
23955
|
-
return this [_quaternion] .getEuler (euler, order);
|
|
23956
|
-
},
|
|
23957
|
-
equals (rotation)
|
|
23958
|
-
{
|
|
23959
|
-
return this [_quaternion] .equals (rotation [_quaternion]);
|
|
23960
|
-
},
|
|
23961
23861
|
inverse ()
|
|
23962
23862
|
{
|
|
23963
23863
|
this [_quaternion] .inverse ();
|
|
@@ -24206,22 +24106,13 @@ Object .assign (Matrix4_Matrix4 .prototype,
|
|
|
24206
24106
|
},
|
|
24207
24107
|
equals (matrix)
|
|
24208
24108
|
{
|
|
24209
|
-
|
|
24210
|
-
|
|
24211
|
-
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
|
|
24215
|
-
|
|
24216
|
-
this [ 7] === matrix [ 7] &&
|
|
24217
|
-
this [ 8] === matrix [ 8] &&
|
|
24218
|
-
this [ 9] === matrix [ 9] &&
|
|
24219
|
-
this [10] === matrix [10] &&
|
|
24220
|
-
this [11] === matrix [11] &&
|
|
24221
|
-
this [12] === matrix [12] &&
|
|
24222
|
-
this [13] === matrix [13] &&
|
|
24223
|
-
this [14] === matrix [14] &&
|
|
24224
|
-
this [15] === matrix [15];
|
|
24109
|
+
for (let i = 0; i < 16; ++ i)
|
|
24110
|
+
{
|
|
24111
|
+
if (this [i] !== matrix [i])
|
|
24112
|
+
return false;
|
|
24113
|
+
}
|
|
24114
|
+
|
|
24115
|
+
return true;
|
|
24225
24116
|
},
|
|
24226
24117
|
set1 (r, c, value)
|
|
24227
24118
|
{
|
|
@@ -24880,6 +24771,7 @@ Object .defineProperties (Matrix4_Matrix4 .prototype,
|
|
|
24880
24771
|
|
|
24881
24772
|
Object .assign (Matrix4_Matrix4,
|
|
24882
24773
|
{
|
|
24774
|
+
ZERO: Object .freeze (new Matrix4_Matrix4 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)),
|
|
24883
24775
|
IDENTITY: Object .freeze (new Matrix4_Matrix4 ()),
|
|
24884
24776
|
fromRotation (rotation)
|
|
24885
24777
|
{
|
|
@@ -24920,59 +24812,17 @@ const Matrix4_default_ = Matrix4_Matrix4;
|
|
|
24920
24812
|
|
|
24921
24813
|
function SFMatrix4Template (TypeName, double)
|
|
24922
24814
|
{
|
|
24923
|
-
function SFMatrix4 (m00, m01, m02, m03,
|
|
24924
|
-
m10, m11, m12, m13,
|
|
24925
|
-
m20, m21, m22, m23,
|
|
24926
|
-
m30, m31, m32, m33)
|
|
24815
|
+
function SFMatrix4 (m00 = 1, m01 = 0, m02 = 0, m03 = 0,
|
|
24816
|
+
m10 = 0, m11 = 1, m12 = 0, m13 = 0,
|
|
24817
|
+
m20 = 0, m21 = 0, m22 = 1, m23 = 0,
|
|
24818
|
+
m30 = 0, m31 = 0, m32 = 0, m33 = 1)
|
|
24927
24819
|
{
|
|
24928
|
-
|
|
24929
|
-
|
|
24930
|
-
|
|
24931
|
-
|
|
24932
|
-
break;
|
|
24933
|
-
|
|
24934
|
-
case 1:
|
|
24935
|
-
Base_X3DField .call (this, arguments [0]);
|
|
24936
|
-
break;
|
|
24937
|
-
|
|
24938
|
-
case 4:
|
|
24939
|
-
{
|
|
24940
|
-
const
|
|
24941
|
-
r0 = arguments [0],
|
|
24942
|
-
r1 = arguments [1],
|
|
24943
|
-
r2 = arguments [2],
|
|
24944
|
-
r3 = arguments [3];
|
|
24945
|
-
|
|
24946
|
-
Base_X3DField .call (this, new Numbers_Matrix4 (r0 .x, r0 .y, r0 .z, r0 .w,
|
|
24947
|
-
r1 .x, r1 .y, r1 .z, r1 .w,
|
|
24948
|
-
r2 .x, r2 .y, r2 .z, r2 .w,
|
|
24949
|
-
r3 .x, r3 .y, r3 .z, r3 .w));
|
|
24950
|
-
|
|
24951
|
-
break;
|
|
24952
|
-
}
|
|
24953
|
-
case 16:
|
|
24954
|
-
{
|
|
24955
|
-
Base_X3DField .call (this, new Numbers_Matrix4 (+m00, +m01, +m02, +m03,
|
|
24956
|
-
+m10, +m11, +m12, +m13,
|
|
24957
|
-
+m20, +m21, +m22, +m23,
|
|
24958
|
-
+m30, +m31, +m32, +m33));
|
|
24959
|
-
|
|
24960
|
-
break;
|
|
24961
|
-
}
|
|
24962
|
-
default:
|
|
24963
|
-
throw new Error ("Invalid arguments.");
|
|
24964
|
-
}
|
|
24820
|
+
Base_X3DField .call (this, new Numbers_Matrix4 (+m00, +m01, +m02, +m03,
|
|
24821
|
+
+m10, +m11, +m12, +m13,
|
|
24822
|
+
+m20, +m21, +m22, +m23,
|
|
24823
|
+
+m30, +m31, +m32, +m33));
|
|
24965
24824
|
}
|
|
24966
24825
|
|
|
24967
|
-
Object .defineProperties (SFMatrix4,
|
|
24968
|
-
{
|
|
24969
|
-
IDENTITY:
|
|
24970
|
-
{
|
|
24971
|
-
value: new SFMatrix4 (),
|
|
24972
|
-
enumerable: true,
|
|
24973
|
-
},
|
|
24974
|
-
});
|
|
24975
|
-
|
|
24976
24826
|
return Fields_SFMatrixPrototypeTemplate (SFMatrix4, TypeName, Numbers_Matrix4, double);
|
|
24977
24827
|
}
|
|
24978
24828
|
|
|
@@ -25064,104 +24914,95 @@ const
|
|
|
25064
24914
|
|
|
25065
24915
|
const SFNode_handler =
|
|
25066
24916
|
{
|
|
25067
|
-
get (target, key)
|
|
24917
|
+
get (target, key, receiver)
|
|
25068
24918
|
{
|
|
25069
|
-
|
|
24919
|
+
if (typeof key === "string")
|
|
25070
24920
|
{
|
|
25071
|
-
const value = target [key];
|
|
25072
|
-
|
|
25073
|
-
if (value !== undefined)
|
|
25074
|
-
return value;
|
|
25075
|
-
|
|
25076
24921
|
const
|
|
25077
24922
|
node = target .getValue (),
|
|
25078
|
-
field = node
|
|
24923
|
+
field = node ?.getField (key, false);
|
|
25079
24924
|
|
|
25080
|
-
|
|
25081
|
-
|
|
25082
|
-
|
|
25083
|
-
|
|
24925
|
+
if (field)
|
|
24926
|
+
{
|
|
24927
|
+
// Specification conform would be: accessType & X3DConstants .outputOnly.
|
|
24928
|
+
// But we allow read access to plain fields, too.
|
|
24929
|
+
if (field .getAccessType () === Base_X3DConstants .inputOnly)
|
|
24930
|
+
return undefined;
|
|
25084
24931
|
|
|
25085
|
-
|
|
25086
|
-
|
|
25087
|
-
catch
|
|
25088
|
-
{
|
|
25089
|
-
return undefined;
|
|
24932
|
+
return field .valueOf ();
|
|
24933
|
+
}
|
|
25090
24934
|
}
|
|
24935
|
+
|
|
24936
|
+
return Reflect .get (target, key, receiver);
|
|
25091
24937
|
},
|
|
25092
|
-
set (target, key, value)
|
|
24938
|
+
set (target, key, value, receiver)
|
|
25093
24939
|
{
|
|
25094
|
-
if (key
|
|
25095
|
-
{
|
|
25096
|
-
target [key] = value;
|
|
25097
|
-
return true;
|
|
25098
|
-
}
|
|
25099
|
-
|
|
25100
|
-
try
|
|
24940
|
+
if (typeof key === "string")
|
|
25101
24941
|
{
|
|
25102
24942
|
const
|
|
25103
|
-
node
|
|
25104
|
-
field
|
|
25105
|
-
accessType = field .getAccessType ();
|
|
24943
|
+
node = target .getValue (),
|
|
24944
|
+
field = node ?.getField (key, false);
|
|
25106
24945
|
|
|
25107
|
-
if (
|
|
25108
|
-
|
|
24946
|
+
if (field)
|
|
24947
|
+
{
|
|
24948
|
+
const accessType = field .getAccessType ();
|
|
25109
24949
|
|
|
25110
|
-
|
|
25111
|
-
|
|
25112
|
-
|
|
25113
|
-
|
|
25114
|
-
|
|
25115
|
-
|
|
24950
|
+
if (accessType === Base_X3DConstants .outputOnly)
|
|
24951
|
+
return false;
|
|
24952
|
+
|
|
24953
|
+
field .setValue (value);
|
|
24954
|
+
return true;
|
|
24955
|
+
}
|
|
25116
24956
|
}
|
|
24957
|
+
|
|
24958
|
+
return Reflect .set (target, key, value, receiver);
|
|
25117
24959
|
},
|
|
25118
24960
|
has (target, key)
|
|
25119
24961
|
{
|
|
25120
|
-
|
|
25121
|
-
|
|
25122
|
-
return !! target .getValue () .getField (key);
|
|
25123
|
-
}
|
|
25124
|
-
catch
|
|
25125
|
-
{
|
|
25126
|
-
return key in target;
|
|
25127
|
-
}
|
|
24962
|
+
return Boolean (target .getValue () .getField (key, false))
|
|
24963
|
+
|| Reflect .has (target, key);
|
|
25128
24964
|
},
|
|
25129
24965
|
ownKeys (target)
|
|
25130
24966
|
{
|
|
25131
24967
|
const
|
|
25132
|
-
|
|
24968
|
+
node = target .getValue (),
|
|
25133
24969
|
ownKeys = [ ];
|
|
25134
24970
|
|
|
25135
|
-
if (
|
|
24971
|
+
if (node)
|
|
25136
24972
|
{
|
|
25137
|
-
for (const { name } of
|
|
24973
|
+
for (const { name } of node .getFieldDefinitions ())
|
|
25138
24974
|
ownKeys .push (name);
|
|
25139
24975
|
}
|
|
25140
24976
|
|
|
25141
|
-
return ownKeys;
|
|
24977
|
+
return ownKeys .concat (Reflect .ownKeys (target));
|
|
25142
24978
|
},
|
|
25143
24979
|
getOwnPropertyDescriptor (target, key)
|
|
25144
24980
|
{
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
if (value)
|
|
24981
|
+
if (typeof key === "string")
|
|
25148
24982
|
{
|
|
25149
|
-
const
|
|
24983
|
+
const node = target .getValue ();
|
|
25150
24984
|
|
|
25151
|
-
if (
|
|
24985
|
+
if (node)
|
|
25152
24986
|
{
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
24987
|
+
const fieldDefinition = node .getFieldDefinitions () .get (key);
|
|
24988
|
+
|
|
24989
|
+
if (fieldDefinition)
|
|
24990
|
+
{
|
|
24991
|
+
return {
|
|
24992
|
+
value: this .get (target, key),
|
|
24993
|
+
writable: fieldDefinition .accessType !== Base_X3DConstants .outputOnly,
|
|
24994
|
+
enumerable: true,
|
|
24995
|
+
configurable: true,
|
|
24996
|
+
};
|
|
24997
|
+
}
|
|
25159
24998
|
}
|
|
25160
24999
|
}
|
|
25000
|
+
|
|
25001
|
+
return Reflect .getOwnPropertyDescriptor (target, key);
|
|
25161
25002
|
},
|
|
25162
25003
|
};
|
|
25163
25004
|
|
|
25164
|
-
function SFNode (
|
|
25005
|
+
function SFNode (node)
|
|
25165
25006
|
{
|
|
25166
25007
|
// Node need to test for X3DBaseNode, because there is a special version of SFNode in Script.
|
|
25167
25008
|
|
|
@@ -25170,11 +25011,11 @@ function SFNode (value)
|
|
|
25170
25011
|
this [_target] = this;
|
|
25171
25012
|
this [_proxy] = proxy;
|
|
25172
25013
|
|
|
25173
|
-
if (
|
|
25014
|
+
if (node ?.getType () .includes (Base_X3DConstants .X3DNode))
|
|
25174
25015
|
{
|
|
25175
|
-
|
|
25016
|
+
node .addParent (proxy);
|
|
25176
25017
|
|
|
25177
|
-
Base_X3DField .call (this,
|
|
25018
|
+
Base_X3DField .call (this, node);
|
|
25178
25019
|
}
|
|
25179
25020
|
else
|
|
25180
25021
|
{
|
|
@@ -25192,11 +25033,11 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25192
25033
|
{
|
|
25193
25034
|
const
|
|
25194
25035
|
target = this [_target],
|
|
25195
|
-
|
|
25036
|
+
node = target .getValue ();
|
|
25196
25037
|
|
|
25197
|
-
if (
|
|
25038
|
+
if (node && instance)
|
|
25198
25039
|
{
|
|
25199
|
-
const copy =
|
|
25040
|
+
const copy = node .copy (instance);
|
|
25200
25041
|
|
|
25201
25042
|
if (!copy .isInitialized () && !instance .getExecutionContext () .getOuterNode () ?.getType () .includes (Base_X3DConstants .X3DProtoDeclaration))
|
|
25202
25043
|
{
|
|
@@ -25206,7 +25047,7 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25206
25047
|
return new SFNode (copy);
|
|
25207
25048
|
}
|
|
25208
25049
|
|
|
25209
|
-
return new SFNode (
|
|
25050
|
+
return new SFNode (node);
|
|
25210
25051
|
},
|
|
25211
25052
|
equals (node)
|
|
25212
25053
|
{
|
|
@@ -25223,7 +25064,7 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25223
25064
|
|
|
25224
25065
|
return target .getValue () === null;
|
|
25225
25066
|
},
|
|
25226
|
-
set (
|
|
25067
|
+
set (node)
|
|
25227
25068
|
{
|
|
25228
25069
|
const
|
|
25229
25070
|
target = this [_target],
|
|
@@ -25233,11 +25074,11 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25233
25074
|
|
|
25234
25075
|
// No need to test for X3DBaseNode, because there is a special version of SFNode in Script.
|
|
25235
25076
|
|
|
25236
|
-
if (
|
|
25077
|
+
if (node ?.getType () .includes (Base_X3DConstants .X3DNode))
|
|
25237
25078
|
{
|
|
25238
|
-
|
|
25079
|
+
node .addParent (target [_proxy]);
|
|
25239
25080
|
|
|
25240
|
-
Base_X3DField .prototype .set .call (target,
|
|
25081
|
+
Base_X3DField .prototype .set .call (target, node);
|
|
25241
25082
|
}
|
|
25242
25083
|
else
|
|
25243
25084
|
{
|
|
@@ -25248,10 +25089,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25248
25089
|
{
|
|
25249
25090
|
const
|
|
25250
25091
|
target = this [_target],
|
|
25251
|
-
|
|
25092
|
+
node = target .getValue ();
|
|
25252
25093
|
|
|
25253
|
-
if (
|
|
25254
|
-
return
|
|
25094
|
+
if (node)
|
|
25095
|
+
return node .getTypeName ();
|
|
25255
25096
|
|
|
25256
25097
|
throw new Error ("SFNode.getNodeTypeName: node is null.");
|
|
25257
25098
|
},
|
|
@@ -25259,10 +25100,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25259
25100
|
{
|
|
25260
25101
|
const
|
|
25261
25102
|
target = this [_target],
|
|
25262
|
-
|
|
25103
|
+
node = target .getValue ();
|
|
25263
25104
|
|
|
25264
|
-
if (
|
|
25265
|
-
return
|
|
25105
|
+
if (node)
|
|
25106
|
+
return node .getName ();
|
|
25266
25107
|
|
|
25267
25108
|
throw new Error ("SFNode.getNodeName: node is null.");
|
|
25268
25109
|
},
|
|
@@ -25270,10 +25111,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25270
25111
|
{
|
|
25271
25112
|
const
|
|
25272
25113
|
target = this [_target],
|
|
25273
|
-
|
|
25114
|
+
node = target .getValue ();
|
|
25274
25115
|
|
|
25275
|
-
if (
|
|
25276
|
-
return
|
|
25116
|
+
if (node)
|
|
25117
|
+
return node .getDisplayName ();
|
|
25277
25118
|
|
|
25278
25119
|
throw new Error ("SFNode.getNodeDisplayName: node is null.");
|
|
25279
25120
|
},
|
|
@@ -25281,10 +25122,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25281
25122
|
{
|
|
25282
25123
|
const
|
|
25283
25124
|
target = this [_target],
|
|
25284
|
-
|
|
25125
|
+
node = target .getValue ();
|
|
25285
25126
|
|
|
25286
|
-
if (
|
|
25287
|
-
return Array .from (
|
|
25127
|
+
if (node)
|
|
25128
|
+
return Array .from (node .getType ());
|
|
25288
25129
|
|
|
25289
25130
|
throw new Error ("SFNode.getNodeType: node is null.");
|
|
25290
25131
|
},
|
|
@@ -25301,10 +25142,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25301
25142
|
{
|
|
25302
25143
|
const
|
|
25303
25144
|
target = this [_target],
|
|
25304
|
-
|
|
25145
|
+
node = target .getValue ();
|
|
25305
25146
|
|
|
25306
|
-
if (
|
|
25307
|
-
return
|
|
25147
|
+
if (node)
|
|
25148
|
+
return node .getFieldDefinitions ();
|
|
25308
25149
|
|
|
25309
25150
|
throw new Error ("SFNode.getFieldDefinitions: node is null.");
|
|
25310
25151
|
},
|
|
@@ -25315,10 +25156,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25315
25156
|
{
|
|
25316
25157
|
const
|
|
25317
25158
|
target = this [_target],
|
|
25318
|
-
|
|
25159
|
+
node = target .getValue ();
|
|
25319
25160
|
|
|
25320
|
-
if (
|
|
25321
|
-
return
|
|
25161
|
+
if (node)
|
|
25162
|
+
return node .getField (name);
|
|
25322
25163
|
|
|
25323
25164
|
throw new Error ("SFNode is disposed.")
|
|
25324
25165
|
},
|
|
@@ -25338,10 +25179,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25338
25179
|
{
|
|
25339
25180
|
const
|
|
25340
25181
|
[key, name, callback] = args,
|
|
25341
|
-
|
|
25182
|
+
node = target .getValue ();
|
|
25342
25183
|
|
|
25343
|
-
if (
|
|
25344
|
-
return
|
|
25184
|
+
if (node)
|
|
25185
|
+
return node .getField (name) .addFieldCallback (key, callback);
|
|
25345
25186
|
|
|
25346
25187
|
throw new Error ("SFNode.addFieldCallback: node is null.");
|
|
25347
25188
|
}
|
|
@@ -25363,10 +25204,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25363
25204
|
{
|
|
25364
25205
|
const
|
|
25365
25206
|
[key, name] = args,
|
|
25366
|
-
|
|
25207
|
+
node = target .getValue ();
|
|
25367
25208
|
|
|
25368
|
-
if (
|
|
25369
|
-
return
|
|
25209
|
+
if (node)
|
|
25210
|
+
return node .getField (name) .removeFieldCallback (key);
|
|
25370
25211
|
|
|
25371
25212
|
throw new Error ("SFNode.removeFieldCallback: node is null.");
|
|
25372
25213
|
}
|
|
@@ -25374,28 +25215,28 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25374
25215
|
},
|
|
25375
25216
|
getNodeUserData (key)
|
|
25376
25217
|
{
|
|
25377
|
-
const
|
|
25218
|
+
const node = this [_target] .getValue ();
|
|
25378
25219
|
|
|
25379
|
-
if (
|
|
25380
|
-
return
|
|
25220
|
+
if (node)
|
|
25221
|
+
return node .getUserData (key);
|
|
25381
25222
|
|
|
25382
25223
|
throw new Error ("SFNode.getNodeUserData: node is null.");
|
|
25383
25224
|
},
|
|
25384
25225
|
setNodeUserData (key, data)
|
|
25385
25226
|
{
|
|
25386
|
-
const
|
|
25227
|
+
const node = this [_target] .getValue ();
|
|
25387
25228
|
|
|
25388
|
-
if (
|
|
25389
|
-
return
|
|
25229
|
+
if (node)
|
|
25230
|
+
return node .setUserData (key, data);
|
|
25390
25231
|
|
|
25391
25232
|
throw new Error ("SFNode.setNodeUserData: node is null.");
|
|
25392
25233
|
},
|
|
25393
25234
|
removeNodeUserData (key)
|
|
25394
25235
|
{
|
|
25395
|
-
const
|
|
25236
|
+
const node = this [_target] .getValue ();
|
|
25396
25237
|
|
|
25397
|
-
if (
|
|
25398
|
-
return
|
|
25238
|
+
if (node)
|
|
25239
|
+
return node .removeUserData (key);
|
|
25399
25240
|
|
|
25400
25241
|
throw new Error ("SFNode.removeNodeUserData: node is null.");
|
|
25401
25242
|
},
|
|
@@ -25403,18 +25244,18 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25403
25244
|
{
|
|
25404
25245
|
const
|
|
25405
25246
|
target = this [_target],
|
|
25406
|
-
|
|
25247
|
+
node = target .getValue ();
|
|
25407
25248
|
|
|
25408
|
-
return
|
|
25249
|
+
return node ? Fields_SFNodeCache .get (node) : null;
|
|
25409
25250
|
},
|
|
25410
25251
|
toStream (generator)
|
|
25411
25252
|
{
|
|
25412
25253
|
const
|
|
25413
25254
|
target = this [_target],
|
|
25414
|
-
|
|
25255
|
+
node = target .getValue ();
|
|
25415
25256
|
|
|
25416
|
-
if (
|
|
25417
|
-
|
|
25257
|
+
if (node)
|
|
25258
|
+
node .toStream (generator);
|
|
25418
25259
|
else
|
|
25419
25260
|
generator .NULL ();
|
|
25420
25261
|
},
|
|
@@ -25422,10 +25263,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25422
25263
|
{
|
|
25423
25264
|
const
|
|
25424
25265
|
target = this [_target],
|
|
25425
|
-
|
|
25266
|
+
node = target .getValue ();
|
|
25426
25267
|
|
|
25427
|
-
if (
|
|
25428
|
-
|
|
25268
|
+
if (node)
|
|
25269
|
+
node .toVRMLStream (generator);
|
|
25429
25270
|
else
|
|
25430
25271
|
generator .NULL ();
|
|
25431
25272
|
},
|
|
@@ -25433,10 +25274,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25433
25274
|
{
|
|
25434
25275
|
const
|
|
25435
25276
|
target = this [_target],
|
|
25436
|
-
|
|
25277
|
+
node = target .getValue ();
|
|
25437
25278
|
|
|
25438
|
-
if (
|
|
25439
|
-
|
|
25279
|
+
if (node)
|
|
25280
|
+
node .toXMLStream (generator);
|
|
25440
25281
|
else
|
|
25441
25282
|
generator .string += "<!-- NULL -->";
|
|
25442
25283
|
},
|
|
@@ -25448,10 +25289,10 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25448
25289
|
{
|
|
25449
25290
|
const
|
|
25450
25291
|
target = this [_target],
|
|
25451
|
-
|
|
25292
|
+
node = target .getValue ();
|
|
25452
25293
|
|
|
25453
|
-
if (
|
|
25454
|
-
|
|
25294
|
+
if (node)
|
|
25295
|
+
node .toJSONStream (generator);
|
|
25455
25296
|
else
|
|
25456
25297
|
generator .string += "null";
|
|
25457
25298
|
},
|
|
@@ -25469,10 +25310,7 @@ Object .assign (Object .setPrototypeOf (SFNode .prototype, Base_X3DField .protot
|
|
|
25469
25310
|
for (const key of Object .keys (SFNode .prototype))
|
|
25470
25311
|
Object .defineProperty (SFNode .prototype, key, { enumerable: false });
|
|
25471
25312
|
|
|
25472
|
-
|
|
25473
|
-
{
|
|
25474
|
-
... Base_X3DField .getStaticProperties ("SFNode"),
|
|
25475
|
-
});
|
|
25313
|
+
Base_X3DField .addStaticProperties (SFNode, "SFNode");
|
|
25476
25314
|
|
|
25477
25315
|
const SFNode_default_ = SFNode;
|
|
25478
25316
|
;
|
|
@@ -25481,15 +25319,11 @@ const SFNode_default_ = SFNode;
|
|
|
25481
25319
|
;// ./src/x_ite/Fields/SFVecPrototypeTemplate.js
|
|
25482
25320
|
|
|
25483
25321
|
|
|
25484
|
-
|
|
25485
25322
|
function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properties = { })
|
|
25486
25323
|
{
|
|
25487
25324
|
const _formatter = double ? "DoubleFormat" : "FloatFormat";
|
|
25488
25325
|
|
|
25489
|
-
|
|
25490
|
-
{
|
|
25491
|
-
... Base_X3DField .getStaticProperties (TypeName),
|
|
25492
|
-
});
|
|
25326
|
+
Base_X3DField .addStaticProperties (Constructor, TypeName);
|
|
25493
25327
|
|
|
25494
25328
|
Object .assign (Object .setPrototypeOf (Constructor .prototype, Base_X3DField .prototype),
|
|
25495
25329
|
{
|
|
@@ -25499,7 +25333,7 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properti
|
|
|
25499
25333
|
},
|
|
25500
25334
|
copy ()
|
|
25501
25335
|
{
|
|
25502
|
-
return
|
|
25336
|
+
return Constructor .fromValue (this .getValue () .copy ());
|
|
25503
25337
|
},
|
|
25504
25338
|
equals (vector)
|
|
25505
25339
|
{
|
|
@@ -25515,15 +25349,15 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properti
|
|
|
25515
25349
|
},
|
|
25516
25350
|
abs ()
|
|
25517
25351
|
{
|
|
25518
|
-
return
|
|
25352
|
+
return Constructor .fromValue (this .getValue () .copy () .abs ());
|
|
25519
25353
|
},
|
|
25520
25354
|
add (vector)
|
|
25521
25355
|
{
|
|
25522
|
-
return
|
|
25356
|
+
return Constructor .fromValue (this .getValue () .copy () .add (vector .getValue ()));
|
|
25523
25357
|
},
|
|
25524
25358
|
clamp (low, high)
|
|
25525
25359
|
{
|
|
25526
|
-
return
|
|
25360
|
+
return Constructor .fromValue (this .getValue () .copy () .clamp (low .getValue (), high .getValue ()));
|
|
25527
25361
|
},
|
|
25528
25362
|
distance (vector)
|
|
25529
25363
|
{
|
|
@@ -25531,11 +25365,11 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properti
|
|
|
25531
25365
|
},
|
|
25532
25366
|
divide (value)
|
|
25533
25367
|
{
|
|
25534
|
-
return
|
|
25368
|
+
return Constructor .fromValue (this .getValue () .copy () .divide (+value));
|
|
25535
25369
|
},
|
|
25536
25370
|
divVec (vector)
|
|
25537
25371
|
{
|
|
25538
|
-
return
|
|
25372
|
+
return Constructor .fromValue (this .getValue () .copy () .divVec (vector .getValue ()));
|
|
25539
25373
|
},
|
|
25540
25374
|
dot (vector)
|
|
25541
25375
|
{
|
|
@@ -25543,7 +25377,7 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properti
|
|
|
25543
25377
|
},
|
|
25544
25378
|
inverse ()
|
|
25545
25379
|
{
|
|
25546
|
-
return
|
|
25380
|
+
return Constructor .fromValue (this .getValue () .copy () .inverse ());
|
|
25547
25381
|
},
|
|
25548
25382
|
length ()
|
|
25549
25383
|
{
|
|
@@ -25551,39 +25385,39 @@ function SFVecPrototypeTemplate (Constructor, TypeName, Vector, double, properti
|
|
|
25551
25385
|
},
|
|
25552
25386
|
lerp (destination, t)
|
|
25553
25387
|
{
|
|
25554
|
-
return
|
|
25388
|
+
return Constructor .fromValue (this .getValue () .copy () .lerp (destination, +t));
|
|
25555
25389
|
},
|
|
25556
25390
|
max (vector)
|
|
25557
25391
|
{
|
|
25558
|
-
return
|
|
25392
|
+
return Constructor .fromValue (this .getValue () .copy () .max (vector .getValue ()));
|
|
25559
25393
|
},
|
|
25560
25394
|
min (vector)
|
|
25561
25395
|
{
|
|
25562
|
-
return
|
|
25396
|
+
return Constructor .fromValue (this .getValue () .copy () .min (vector .getValue ()));
|
|
25563
25397
|
},
|
|
25564
25398
|
multiply (value)
|
|
25565
25399
|
{
|
|
25566
|
-
return
|
|
25400
|
+
return Constructor .fromValue (this .getValue () .copy () .multiply (+value));
|
|
25567
25401
|
},
|
|
25568
25402
|
multVec (vector)
|
|
25569
25403
|
{
|
|
25570
|
-
return
|
|
25404
|
+
return Constructor .fromValue (this .getValue () .copy () .multVec (vector .getValue ()));
|
|
25571
25405
|
},
|
|
25572
25406
|
negate ()
|
|
25573
25407
|
{
|
|
25574
|
-
return
|
|
25408
|
+
return Constructor .fromValue (this .getValue () .copy () .negate ());
|
|
25575
25409
|
},
|
|
25576
25410
|
normalize ()
|
|
25577
25411
|
{
|
|
25578
|
-
return
|
|
25412
|
+
return Constructor .fromValue (this .getValue () .copy () .normalize ());
|
|
25579
25413
|
},
|
|
25580
25414
|
reflect (normal)
|
|
25581
25415
|
{
|
|
25582
|
-
return
|
|
25416
|
+
return Constructor .fromValue (this .getValue () .copy () .reflect (normal .getValue ()));
|
|
25583
25417
|
},
|
|
25584
25418
|
subtract (vector)
|
|
25585
25419
|
{
|
|
25586
|
-
return
|
|
25420
|
+
return Constructor .fromValue (this .getValue () .copy () .subtract (vector .getValue ()));
|
|
25587
25421
|
},
|
|
25588
25422
|
toStream (generator)
|
|
25589
25423
|
{
|
|
@@ -25721,53 +25555,39 @@ const SFVecPrototypeTemplate_default_ = SFVecPrototypeTemplate;
|
|
|
25721
25555
|
|
|
25722
25556
|
function SFVec3Template (TypeName, double)
|
|
25723
25557
|
{
|
|
25724
|
-
function SFVec3 (x, y, z)
|
|
25558
|
+
function SFVec3 (x = 0, y = 0, z = 0)
|
|
25725
25559
|
{
|
|
25726
|
-
|
|
25727
|
-
{
|
|
25728
|
-
case 0:
|
|
25729
|
-
Base_X3DField .call (this, new Numbers_Vector3 ());
|
|
25730
|
-
break;
|
|
25731
|
-
|
|
25732
|
-
case 1:
|
|
25733
|
-
Base_X3DField .call (this, arguments [0]);
|
|
25734
|
-
break;
|
|
25735
|
-
|
|
25736
|
-
case 3:
|
|
25737
|
-
Base_X3DField .call (this, new Numbers_Vector3 (+x, +y, +z));
|
|
25738
|
-
break;
|
|
25739
|
-
|
|
25740
|
-
default:
|
|
25741
|
-
throw new Error ("Invalid arguments.");
|
|
25742
|
-
}
|
|
25560
|
+
Base_X3DField .call (this, new Numbers_Vector3 (+x, +y, +z));
|
|
25743
25561
|
}
|
|
25744
25562
|
|
|
25563
|
+
Fields_SFVecPrototypeTemplate (SFVec3, TypeName, Numbers_Vector3, double,
|
|
25564
|
+
{
|
|
25565
|
+
cross (vector)
|
|
25566
|
+
{
|
|
25567
|
+
return SFVec3 .fromValue (this .getValue () .copy () .cross (vector .getValue ()));
|
|
25568
|
+
},
|
|
25569
|
+
});
|
|
25570
|
+
|
|
25745
25571
|
Object .defineProperties (SFVec3,
|
|
25746
25572
|
{
|
|
25747
25573
|
X_AXIS:
|
|
25748
25574
|
{
|
|
25749
|
-
value:
|
|
25575
|
+
value: SFVec3 .fromValue (Numbers_Vector3 .X_AXIS),
|
|
25750
25576
|
enumerable: true,
|
|
25751
25577
|
},
|
|
25752
25578
|
Y_AXIS:
|
|
25753
25579
|
{
|
|
25754
|
-
value:
|
|
25580
|
+
value: SFVec3 .fromValue (Numbers_Vector3 .Y_AXIS),
|
|
25755
25581
|
enumerable: true,
|
|
25756
25582
|
},
|
|
25757
25583
|
Z_AXIS:
|
|
25758
25584
|
{
|
|
25759
|
-
value:
|
|
25585
|
+
value: SFVec3 .fromValue (Numbers_Vector3 .Z_AXIS),
|
|
25760
25586
|
enumerable: true,
|
|
25761
25587
|
},
|
|
25762
25588
|
});
|
|
25763
25589
|
|
|
25764
|
-
return
|
|
25765
|
-
{
|
|
25766
|
-
cross (vector)
|
|
25767
|
-
{
|
|
25768
|
-
return new (this .constructor) (this .getValue () .copy () .cross (vector .getValue ()));
|
|
25769
|
-
},
|
|
25770
|
-
});
|
|
25590
|
+
return SFVec3;
|
|
25771
25591
|
}
|
|
25772
25592
|
|
|
25773
25593
|
const SFVec3 = {
|
|
@@ -25786,51 +25606,28 @@ const SFVec3_default_ = SFVec3;
|
|
|
25786
25606
|
|
|
25787
25607
|
|
|
25788
25608
|
|
|
25789
|
-
|
|
25790
25609
|
const
|
|
25791
|
-
SFVec3d
|
|
25792
|
-
|
|
25793
|
-
SFMatrix3d = Fields_SFMatrix3 .SFMatrix3d,
|
|
25794
|
-
SFMatrix3f = Fields_SFMatrix3 .SFMatrix3f;
|
|
25610
|
+
{ SFVec3d, SFVec3f } = Fields_SFVec3,
|
|
25611
|
+
{ SFMatrix3f } = Fields_SFMatrix3;
|
|
25795
25612
|
|
|
25796
|
-
function SFRotation (x, y, z, angle)
|
|
25613
|
+
function SFRotation (x = 0, y = 0, z = 1, angle = 0)
|
|
25797
25614
|
{
|
|
25798
|
-
|
|
25615
|
+
if ((x instanceof SFVec3f) || (x instanceof SFVec3d))
|
|
25799
25616
|
{
|
|
25800
|
-
|
|
25801
|
-
{
|
|
25802
|
-
Base_X3DField .call (this, new Numbers_Rotation4 ());
|
|
25803
|
-
break;
|
|
25804
|
-
}
|
|
25805
|
-
case 1:
|
|
25806
|
-
{
|
|
25807
|
-
if ((arguments [0] instanceof SFMatrix3d) || (arguments [0] instanceof SFMatrix3f))
|
|
25808
|
-
{
|
|
25809
|
-
Base_X3DField .call (this, new Numbers_Rotation4 () .setMatrix (arguments [0] .getValue ()));
|
|
25810
|
-
break;
|
|
25811
|
-
}
|
|
25812
|
-
|
|
25813
|
-
Base_X3DField .call (this, arguments [0]);
|
|
25814
|
-
break;
|
|
25815
|
-
}
|
|
25816
|
-
case 2:
|
|
25617
|
+
if ((y instanceof SFVec3f) || (y instanceof SFVec3d))
|
|
25817
25618
|
{
|
|
25818
|
-
|
|
25819
|
-
|
|
25820
|
-
Base_X3DField .call (this, new Numbers_Rotation4 (arguments [0] .getValue (), arguments [1] .getValue ()));
|
|
25821
|
-
break;
|
|
25822
|
-
}
|
|
25823
|
-
|
|
25824
|
-
Base_X3DField .call (this, new Numbers_Rotation4 (arguments [0] .getValue (), +arguments [1]));
|
|
25825
|
-
break;
|
|
25619
|
+
// new SFRotation (fromVector: SFVec3d | SFVec3f, toVector: SFVec3d | SFVec3f)
|
|
25620
|
+
Base_X3DField .call (this, new Numbers_Rotation4 (x .getValue (), y .getValue ()));
|
|
25826
25621
|
}
|
|
25827
|
-
|
|
25622
|
+
else
|
|
25828
25623
|
{
|
|
25829
|
-
|
|
25830
|
-
|
|
25624
|
+
// new SFRotation (axis: SFVec3d | SFVec3f, angle: number)
|
|
25625
|
+
Base_X3DField .call (this, new Numbers_Rotation4 (x .getValue (), +y));
|
|
25831
25626
|
}
|
|
25832
|
-
|
|
25833
|
-
|
|
25627
|
+
}
|
|
25628
|
+
else
|
|
25629
|
+
{
|
|
25630
|
+
Base_X3DField .call (this, new Numbers_Rotation4 (+x, +y, +z, +angle));
|
|
25834
25631
|
}
|
|
25835
25632
|
}
|
|
25836
25633
|
|
|
@@ -25842,7 +25639,7 @@ Object .assign (Object .setPrototypeOf (SFRotation .prototype, Base_X3DField .pr
|
|
|
25842
25639
|
},
|
|
25843
25640
|
copy ()
|
|
25844
25641
|
{
|
|
25845
|
-
return
|
|
25642
|
+
return SFRotation .fromValue (this .getValue () .copy ());
|
|
25846
25643
|
},
|
|
25847
25644
|
equals (rotation)
|
|
25848
25645
|
{
|
|
@@ -25856,62 +25653,62 @@ Object .assign (Object .setPrototypeOf (SFRotation .prototype, Base_X3DField .pr
|
|
|
25856
25653
|
{
|
|
25857
25654
|
this .getValue () .assign (value);
|
|
25858
25655
|
},
|
|
25656
|
+
getAxis ()
|
|
25657
|
+
{
|
|
25658
|
+
return SFVec3f .fromValue (this .getValue () .getAxis ());
|
|
25659
|
+
},
|
|
25859
25660
|
setAxis (vector)
|
|
25860
25661
|
{
|
|
25861
25662
|
this .getValue () .setAxis (vector .getValue ());
|
|
25862
25663
|
this .addEvent ();
|
|
25863
25664
|
},
|
|
25864
|
-
|
|
25665
|
+
getMatrix ()
|
|
25865
25666
|
{
|
|
25866
|
-
return
|
|
25667
|
+
return SFMatrix3f .fromValue (this .getValue () .getMatrix ());
|
|
25867
25668
|
},
|
|
25868
25669
|
setMatrix (matrix)
|
|
25869
25670
|
{
|
|
25870
25671
|
this .getValue () .setMatrix (matrix .getValue ());
|
|
25871
25672
|
this .addEvent ();
|
|
25872
25673
|
},
|
|
25873
|
-
|
|
25874
|
-
{
|
|
25875
|
-
return new SFMatrix3f (this .getValue () .getMatrix ());
|
|
25876
|
-
},
|
|
25877
|
-
setQuaternion: (() =>
|
|
25674
|
+
getQuaternion: (() =>
|
|
25878
25675
|
{
|
|
25879
25676
|
const q = new Numbers_Quaternion ();
|
|
25880
25677
|
|
|
25881
|
-
return function (
|
|
25678
|
+
return function ()
|
|
25882
25679
|
{
|
|
25883
|
-
this .getValue () .
|
|
25884
|
-
this .addEvent ();
|
|
25680
|
+
return [... this .getValue () .getQuaternion (q)];
|
|
25885
25681
|
};
|
|
25886
25682
|
})(),
|
|
25887
|
-
|
|
25683
|
+
setQuaternion: (() =>
|
|
25888
25684
|
{
|
|
25889
25685
|
const q = new Numbers_Quaternion ();
|
|
25890
25686
|
|
|
25891
|
-
return function ()
|
|
25687
|
+
return function (x, y, z, w)
|
|
25892
25688
|
{
|
|
25893
|
-
|
|
25689
|
+
this .getValue () .setQuaternion (q .set (+x, +y, +z, +w));
|
|
25690
|
+
this .addEvent ();
|
|
25894
25691
|
};
|
|
25895
25692
|
})(),
|
|
25896
25693
|
inverse ()
|
|
25897
25694
|
{
|
|
25898
|
-
return
|
|
25695
|
+
return SFRotation .fromValue (this .getValue () .copy () .inverse ());
|
|
25899
25696
|
},
|
|
25900
25697
|
multiply (rotation)
|
|
25901
25698
|
{
|
|
25902
|
-
return
|
|
25699
|
+
return SFRotation .fromValue (this .getValue () .copy () .multRight (rotation .getValue ()));
|
|
25903
25700
|
},
|
|
25904
25701
|
multVec (vector)
|
|
25905
25702
|
{
|
|
25906
|
-
return
|
|
25703
|
+
return vector .constructor .fromValue (this .getValue () .multVecRot (vector .getValue () .copy ()));
|
|
25907
25704
|
},
|
|
25908
25705
|
slerp (rotation, t)
|
|
25909
25706
|
{
|
|
25910
|
-
return
|
|
25707
|
+
return SFRotation .fromValue (this .getValue () .copy () .slerp (rotation .getValue (), t));
|
|
25911
25708
|
},
|
|
25912
25709
|
straighten (upVector)
|
|
25913
25710
|
{
|
|
25914
|
-
return
|
|
25711
|
+
return SFRotation .fromValue (this .getValue () .copy () .straighten (upVector ?.getValue ()));
|
|
25915
25712
|
},
|
|
25916
25713
|
toStream (generator)
|
|
25917
25714
|
{
|
|
@@ -26023,14 +25820,37 @@ Object .defineProperties (SFRotation .prototype,
|
|
|
26023
25820
|
angle: Object .assign ({ enumerable: true }, SFRotation_angle),
|
|
26024
25821
|
});
|
|
26025
25822
|
|
|
25823
|
+
Base_X3DField .addStaticProperties (SFRotation, "SFRotation");
|
|
25824
|
+
|
|
26026
25825
|
Object .defineProperties (SFRotation,
|
|
26027
25826
|
{
|
|
26028
|
-
... Base_X3DField .getStaticProperties ("SFRotation"),
|
|
26029
25827
|
IDENTITY:
|
|
26030
25828
|
{
|
|
26031
|
-
value:
|
|
25829
|
+
value: SFRotation .fromValue (Numbers_Rotation4 .IDENTITY),
|
|
26032
25830
|
enumerable: true,
|
|
26033
25831
|
},
|
|
25832
|
+
fromMatrix:
|
|
25833
|
+
{
|
|
25834
|
+
value (matrix)
|
|
25835
|
+
{
|
|
25836
|
+
const rotation = new this ();
|
|
25837
|
+
|
|
25838
|
+
rotation .setMatrix (matrix);
|
|
25839
|
+
|
|
25840
|
+
return rotation;
|
|
25841
|
+
},
|
|
25842
|
+
},
|
|
25843
|
+
fromQuaternion:
|
|
25844
|
+
{
|
|
25845
|
+
value (x, y, z, w)
|
|
25846
|
+
{
|
|
25847
|
+
const rotation = new this ();
|
|
25848
|
+
|
|
25849
|
+
rotation .setQuaternion (+x, +y, +z, +w);
|
|
25850
|
+
|
|
25851
|
+
return rotation;
|
|
25852
|
+
},
|
|
25853
|
+
},
|
|
26034
25854
|
});
|
|
26035
25855
|
|
|
26036
25856
|
const SFRotation_default_ = SFRotation;
|
|
@@ -26044,42 +25864,28 @@ const SFRotation_default_ = SFRotation;
|
|
|
26044
25864
|
|
|
26045
25865
|
function SFVec2Template (TypeName, double)
|
|
26046
25866
|
{
|
|
26047
|
-
function SFVec2 (x, y)
|
|
25867
|
+
function SFVec2 (x = 0, y = 0)
|
|
26048
25868
|
{
|
|
26049
|
-
|
|
26050
|
-
{
|
|
26051
|
-
case 0:
|
|
26052
|
-
Base_X3DField .call (this, new Numbers_Vector2 ());
|
|
26053
|
-
break;
|
|
26054
|
-
|
|
26055
|
-
case 1:
|
|
26056
|
-
Base_X3DField .call (this, arguments [0]);
|
|
26057
|
-
break;
|
|
26058
|
-
|
|
26059
|
-
case 2:
|
|
26060
|
-
Base_X3DField .call (this, new Numbers_Vector2 (+x, +y));
|
|
26061
|
-
break;
|
|
26062
|
-
|
|
26063
|
-
default:
|
|
26064
|
-
throw new Error ("Invalid arguments.");
|
|
26065
|
-
}
|
|
25869
|
+
Base_X3DField .call (this, new Numbers_Vector2 (+x, +y));
|
|
26066
25870
|
}
|
|
26067
25871
|
|
|
25872
|
+
Fields_SFVecPrototypeTemplate (SFVec2, TypeName, Numbers_Vector2, double)
|
|
25873
|
+
|
|
26068
25874
|
Object .defineProperties (SFVec2,
|
|
26069
25875
|
{
|
|
26070
25876
|
X_AXIS:
|
|
26071
25877
|
{
|
|
26072
|
-
value:
|
|
25878
|
+
value: SFVec2 .fromValue (Numbers_Vector2 .X_AXIS),
|
|
26073
25879
|
enumerable: true,
|
|
26074
25880
|
},
|
|
26075
25881
|
Y_AXIS:
|
|
26076
25882
|
{
|
|
26077
|
-
value:
|
|
25883
|
+
value: SFVec2 .fromValue (Numbers_Vector2 .Y_AXIS),
|
|
26078
25884
|
enumerable: true,
|
|
26079
25885
|
},
|
|
26080
25886
|
});
|
|
26081
25887
|
|
|
26082
|
-
return
|
|
25888
|
+
return SFVec2;
|
|
26083
25889
|
}
|
|
26084
25890
|
|
|
26085
25891
|
const SFVec2 = {
|
|
@@ -26098,58 +25904,44 @@ const SFVec2_default_ = SFVec2;
|
|
|
26098
25904
|
|
|
26099
25905
|
function SFVec4Template (TypeName, double)
|
|
26100
25906
|
{
|
|
26101
|
-
function SFVec4 (x, y, z, w)
|
|
25907
|
+
function SFVec4 (x = 0, y = 0, z = 0, w = 1)
|
|
26102
25908
|
{
|
|
26103
|
-
|
|
26104
|
-
{
|
|
26105
|
-
case 0:
|
|
26106
|
-
Base_X3DField .call (this, new Numbers_Vector4 (0, 0, 0, 1));
|
|
26107
|
-
break;
|
|
26108
|
-
|
|
26109
|
-
case 1:
|
|
26110
|
-
Base_X3DField .call (this, arguments [0]);
|
|
26111
|
-
break;
|
|
26112
|
-
|
|
26113
|
-
case 4:
|
|
26114
|
-
Base_X3DField .call (this, new Numbers_Vector4 (+x, +y, +z, +w));
|
|
26115
|
-
break;
|
|
26116
|
-
|
|
26117
|
-
default:
|
|
26118
|
-
throw new Error ("Invalid arguments.");
|
|
26119
|
-
}
|
|
25909
|
+
Base_X3DField .call (this, new Numbers_Vector4 (+x, +y, +z, +w));
|
|
26120
25910
|
}
|
|
26121
25911
|
|
|
25912
|
+
Fields_SFVecPrototypeTemplate (SFVec4, TypeName, Numbers_Vector4, double,
|
|
25913
|
+
{
|
|
25914
|
+
isDefaultValue ()
|
|
25915
|
+
{
|
|
25916
|
+
return this .getValue () .equals (Numbers_Vector4 .W_AXIS);
|
|
25917
|
+
},
|
|
25918
|
+
});
|
|
25919
|
+
|
|
26122
25920
|
Object .defineProperties (SFVec4,
|
|
26123
25921
|
{
|
|
26124
25922
|
X_AXIS:
|
|
26125
25923
|
{
|
|
26126
|
-
value:
|
|
25924
|
+
value: SFVec4 .fromValue (Numbers_Vector4 .X_AXIS),
|
|
26127
25925
|
enumerable: true,
|
|
26128
25926
|
},
|
|
26129
25927
|
Y_AXIS:
|
|
26130
25928
|
{
|
|
26131
|
-
value:
|
|
25929
|
+
value: SFVec4 .fromValue (Numbers_Vector4 .Y_AXIS),
|
|
26132
25930
|
enumerable: true,
|
|
26133
25931
|
},
|
|
26134
25932
|
Z_AXIS:
|
|
26135
25933
|
{
|
|
26136
|
-
value:
|
|
25934
|
+
value: SFVec4 .fromValue (Numbers_Vector4 .Z_AXIS),
|
|
26137
25935
|
enumerable: true,
|
|
26138
25936
|
},
|
|
26139
25937
|
W_AXIS:
|
|
26140
25938
|
{
|
|
26141
|
-
value:
|
|
25939
|
+
value: SFVec4 .fromValue (Numbers_Vector4 .W_AXIS),
|
|
26142
25940
|
enumerable: true,
|
|
26143
25941
|
},
|
|
26144
25942
|
});
|
|
26145
25943
|
|
|
26146
|
-
return
|
|
26147
|
-
{
|
|
26148
|
-
isDefaultValue ()
|
|
26149
|
-
{
|
|
26150
|
-
return this .getValue () .equals (Numbers_Vector4 .W_AXIS);
|
|
26151
|
-
},
|
|
26152
|
-
});
|
|
25944
|
+
return SFVec4;
|
|
26153
25945
|
}
|
|
26154
25946
|
|
|
26155
25947
|
const SFVec4 = {
|
|
@@ -26270,73 +26062,76 @@ const
|
|
|
26270
26062
|
|
|
26271
26063
|
const X3DObjectArrayField_handler =
|
|
26272
26064
|
{
|
|
26273
|
-
get (target, key)
|
|
26065
|
+
get (target, key, receiver)
|
|
26274
26066
|
{
|
|
26275
|
-
const value = target [key];
|
|
26276
|
-
|
|
26277
|
-
if (value !== undefined)
|
|
26278
|
-
return value;
|
|
26279
|
-
|
|
26280
26067
|
if (typeof key === "string")
|
|
26281
26068
|
{
|
|
26282
|
-
const
|
|
26283
|
-
array = target .getValue (),
|
|
26284
|
-
index = +key;
|
|
26069
|
+
const index = +key;
|
|
26285
26070
|
|
|
26286
26071
|
if (Number .isInteger (index))
|
|
26287
26072
|
{
|
|
26288
|
-
|
|
26289
|
-
|
|
26073
|
+
const array = target .getValue ();
|
|
26074
|
+
|
|
26290
26075
|
if (index >= array .length)
|
|
26291
|
-
|
|
26076
|
+
return undefined;
|
|
26292
26077
|
|
|
26293
26078
|
return array [index] .valueOf ();
|
|
26294
26079
|
}
|
|
26295
|
-
else
|
|
26296
|
-
{
|
|
26297
|
-
return target [key];
|
|
26298
|
-
}
|
|
26299
26080
|
}
|
|
26081
|
+
|
|
26082
|
+
return Reflect .get (target, key, receiver);
|
|
26300
26083
|
},
|
|
26301
|
-
set (target, key, value)
|
|
26084
|
+
set (target, key, value, receiver)
|
|
26302
26085
|
{
|
|
26303
|
-
if (key
|
|
26086
|
+
if (typeof key === "string")
|
|
26304
26087
|
{
|
|
26305
|
-
|
|
26306
|
-
return true;
|
|
26307
|
-
}
|
|
26088
|
+
const index = +key;
|
|
26308
26089
|
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26090
|
+
if (Number .isInteger (index))
|
|
26091
|
+
{
|
|
26092
|
+
const array = target .getValue ();
|
|
26312
26093
|
|
|
26313
|
-
|
|
26314
|
-
|
|
26094
|
+
if (index >= array .length)
|
|
26095
|
+
target .resize (index + 1);
|
|
26315
26096
|
|
|
26316
|
-
|
|
26097
|
+
array [index] .setValue (value);
|
|
26317
26098
|
|
|
26318
|
-
|
|
26099
|
+
return true;
|
|
26100
|
+
}
|
|
26101
|
+
}
|
|
26102
|
+
|
|
26103
|
+
return Reflect .set (target, key, value, receiver);
|
|
26319
26104
|
},
|
|
26320
26105
|
has (target, key)
|
|
26321
26106
|
{
|
|
26322
|
-
if (
|
|
26323
|
-
|
|
26107
|
+
if (typeof key === "string")
|
|
26108
|
+
{
|
|
26109
|
+
const index = +key;
|
|
26324
26110
|
|
|
26325
|
-
|
|
26111
|
+
if (Number .isInteger (index))
|
|
26112
|
+
return index < target .getValue () .length;
|
|
26113
|
+
}
|
|
26114
|
+
|
|
26115
|
+
return Reflect .has (target, key);
|
|
26326
26116
|
},
|
|
26327
26117
|
ownKeys (target)
|
|
26328
26118
|
{
|
|
26329
|
-
return Object .keys (target .getValue ());
|
|
26119
|
+
return Object .keys (target .getValue ()) .concat (Reflect .ownKeys (target));
|
|
26330
26120
|
},
|
|
26331
26121
|
getOwnPropertyDescriptor (target, key)
|
|
26332
26122
|
{
|
|
26333
|
-
if (typeof key
|
|
26334
|
-
|
|
26123
|
+
if (typeof key === "string")
|
|
26124
|
+
{
|
|
26125
|
+
const index = +key;
|
|
26335
26126
|
|
|
26336
|
-
|
|
26127
|
+
if (Number .isInteger (index))
|
|
26128
|
+
{
|
|
26129
|
+
if (index < target .getValue () .length)
|
|
26130
|
+
return Object .getOwnPropertyDescriptor (target .getValue (), key);
|
|
26131
|
+
}
|
|
26132
|
+
}
|
|
26337
26133
|
|
|
26338
|
-
|
|
26339
|
-
return Object .getOwnPropertyDescriptor (target .getValue (), key);
|
|
26134
|
+
return Reflect .getOwnPropertyDescriptor (target, key);
|
|
26340
26135
|
},
|
|
26341
26136
|
};
|
|
26342
26137
|
|
|
@@ -26789,28 +26584,21 @@ const
|
|
|
26789
26584
|
|
|
26790
26585
|
const X3DTypedArrayField_handler =
|
|
26791
26586
|
{
|
|
26792
|
-
get (target, key)
|
|
26587
|
+
get (target, key, receiver)
|
|
26793
26588
|
{
|
|
26794
|
-
const value = target [key];
|
|
26795
|
-
|
|
26796
|
-
if (value !== undefined)
|
|
26797
|
-
return value;
|
|
26798
|
-
|
|
26799
26589
|
if (typeof key === "string")
|
|
26800
26590
|
{
|
|
26801
26591
|
const index = +key;
|
|
26802
26592
|
|
|
26803
26593
|
if (Number .isInteger (index))
|
|
26804
26594
|
{
|
|
26595
|
+
if (index >= target [_length])
|
|
26596
|
+
return undefined;
|
|
26597
|
+
|
|
26805
26598
|
const
|
|
26806
26599
|
components = target .getComponents (),
|
|
26807
|
-
valueType = target .getValueType ()
|
|
26808
|
-
|
|
26809
|
-
// For historical reasons this behavior is intended (resize), there are
|
|
26810
|
-
// enough X3D/VRML worlds in the Internet who rely on this behavior.
|
|
26811
|
-
const array = index < target [_length]
|
|
26812
|
-
? target .getValue ()
|
|
26813
|
-
: target .resize (index + 1, target .getSingleValue ());
|
|
26600
|
+
valueType = target .getValueType (),
|
|
26601
|
+
array = target .getValue ();
|
|
26814
26602
|
|
|
26815
26603
|
if (components === 1)
|
|
26816
26604
|
{
|
|
@@ -26821,76 +26609,87 @@ const X3DTypedArrayField_handler =
|
|
|
26821
26609
|
{
|
|
26822
26610
|
// Return reference to index.
|
|
26823
26611
|
|
|
26824
|
-
return target [_cache] [index]
|
|
26825
|
-
?? (target [_cache] [index] = createValue (target, index, components, valueType));
|
|
26612
|
+
return target [_cache] [index] ??= createValue (target, index, components, valueType);
|
|
26826
26613
|
}
|
|
26827
26614
|
}
|
|
26828
|
-
else
|
|
26829
|
-
{
|
|
26830
|
-
return target [key];
|
|
26831
|
-
}
|
|
26832
26615
|
}
|
|
26616
|
+
|
|
26617
|
+
return Reflect .get (target, key, receiver);
|
|
26833
26618
|
},
|
|
26834
|
-
set (target, key, value)
|
|
26619
|
+
set (target, key, value, receiver)
|
|
26835
26620
|
{
|
|
26836
|
-
if (key
|
|
26621
|
+
if (typeof key === "string")
|
|
26837
26622
|
{
|
|
26838
|
-
|
|
26839
|
-
return true;
|
|
26840
|
-
}
|
|
26623
|
+
let index = +key;
|
|
26841
26624
|
|
|
26842
|
-
|
|
26625
|
+
if (Number .isInteger (index))
|
|
26626
|
+
{
|
|
26627
|
+
const components = target .getComponents ();
|
|
26843
26628
|
|
|
26844
|
-
|
|
26845
|
-
index = +key,
|
|
26846
|
-
array = target .getValue ();
|
|
26629
|
+
let array = target .getValue ();
|
|
26847
26630
|
|
|
26848
|
-
|
|
26849
|
-
|
|
26631
|
+
if (index >= target [_length])
|
|
26632
|
+
array = target .resize (index + 1, target .getSingleValue ());
|
|
26850
26633
|
|
|
26851
|
-
|
|
26852
|
-
|
|
26853
|
-
|
|
26634
|
+
if (components === 1)
|
|
26635
|
+
{
|
|
26636
|
+
const valueType = target .getValueType ();
|
|
26854
26637
|
|
|
26855
|
-
|
|
26856
|
-
|
|
26857
|
-
|
|
26858
|
-
|
|
26859
|
-
|
|
26638
|
+
array [index] = valueType (value);
|
|
26639
|
+
}
|
|
26640
|
+
else
|
|
26641
|
+
{
|
|
26642
|
+
index *= components;
|
|
26860
26643
|
|
|
26861
|
-
|
|
26862
|
-
|
|
26863
|
-
|
|
26644
|
+
for (let c = 0; c < components; ++ c, ++ index)
|
|
26645
|
+
array [index] = value [c];
|
|
26646
|
+
}
|
|
26864
26647
|
|
|
26865
|
-
|
|
26648
|
+
target .addEvent ();
|
|
26866
26649
|
|
|
26867
|
-
|
|
26650
|
+
return true;
|
|
26651
|
+
}
|
|
26652
|
+
}
|
|
26653
|
+
|
|
26654
|
+
return Reflect .set (target, key, value, receiver);
|
|
26868
26655
|
},
|
|
26869
26656
|
has (target, key)
|
|
26870
26657
|
{
|
|
26871
|
-
if (
|
|
26872
|
-
|
|
26658
|
+
if (typeof key === "string")
|
|
26659
|
+
{
|
|
26660
|
+
const index = +key;
|
|
26873
26661
|
|
|
26874
|
-
|
|
26662
|
+
if (Number .isInteger (index))
|
|
26663
|
+
return index < target [_length];
|
|
26664
|
+
}
|
|
26665
|
+
|
|
26666
|
+
return Reflect .has (target, key);
|
|
26875
26667
|
},
|
|
26876
26668
|
ownKeys (target)
|
|
26877
26669
|
{
|
|
26878
|
-
const
|
|
26670
|
+
const
|
|
26671
|
+
length = target [_length],
|
|
26672
|
+
ownKeys = [ ];
|
|
26879
26673
|
|
|
26880
|
-
for (let i = 0
|
|
26674
|
+
for (let i = 0; i < length; ++ i)
|
|
26881
26675
|
ownKeys .push (String (i));
|
|
26882
26676
|
|
|
26883
|
-
return ownKeys;
|
|
26677
|
+
return ownKeys .concat (Reflect .ownKeys (target));
|
|
26884
26678
|
},
|
|
26885
26679
|
getOwnPropertyDescriptor (target, key)
|
|
26886
26680
|
{
|
|
26887
|
-
if (typeof key
|
|
26888
|
-
|
|
26681
|
+
if (typeof key === "string")
|
|
26682
|
+
{
|
|
26683
|
+
const index = +key;
|
|
26889
26684
|
|
|
26890
|
-
|
|
26685
|
+
if (Number .isInteger (index))
|
|
26686
|
+
{
|
|
26687
|
+
if (index < target [_length])
|
|
26688
|
+
return Object .getOwnPropertyDescriptor (target .getValue (), key);
|
|
26689
|
+
}
|
|
26690
|
+
}
|
|
26891
26691
|
|
|
26892
|
-
|
|
26893
|
-
return Object .getOwnPropertyDescriptor (target .getValue (), key);
|
|
26692
|
+
return Reflect .getOwnPropertyDescriptor (target, key);
|
|
26894
26693
|
},
|
|
26895
26694
|
};
|
|
26896
26695
|
|
|
@@ -27892,10 +27691,9 @@ const X3DTypedArrayField_default_ = X3DTypedArrayField;
|
|
|
27892
27691
|
|
|
27893
27692
|
|
|
27894
27693
|
|
|
27895
|
-
|
|
27896
27694
|
const
|
|
27897
27695
|
{ SFBool, SFDouble, SFFloat, SFInt32, SFString, SFTime } = Fields_SFScalar,
|
|
27898
|
-
{ SFMatrix3d
|
|
27696
|
+
{ SFMatrix3d, SFMatrix3f: ArrayFields_SFMatrix3f } = Fields_SFMatrix3,
|
|
27899
27697
|
{ SFMatrix4d, SFMatrix4f } = Fields_SFMatrix4,
|
|
27900
27698
|
{ SFVec2d, SFVec2f } = Fields_SFVec2,
|
|
27901
27699
|
{ SFVec3d: ArrayFields_SFVec3d, SFVec3f: ArrayFields_SFVec3f } = Fields_SFVec3,
|
|
@@ -28120,10 +27918,7 @@ Object .assign (Object .setPrototypeOf (MFNode .prototype, Base_X3DObjectArrayFi
|
|
|
28120
27918
|
for (const key of Object .keys (MFNode .prototype))
|
|
28121
27919
|
Object .defineProperty (MFNode .prototype, key, { enumerable: false });
|
|
28122
27920
|
|
|
28123
|
-
|
|
28124
|
-
{
|
|
28125
|
-
... Base_X3DField .getStaticProperties ("MFNode"),
|
|
28126
|
-
});
|
|
27921
|
+
Base_X3DField .addStaticProperties (MFNode, "MFNode");
|
|
28127
27922
|
|
|
28128
27923
|
function MFString (... args)
|
|
28129
27924
|
{
|
|
@@ -28165,10 +27960,7 @@ Object .assign (Object .setPrototypeOf (MFString .prototype, Base_X3DObjectArray
|
|
|
28165
27960
|
for (const key of Object .keys (MFString .prototype))
|
|
28166
27961
|
Object .defineProperty (MFString .prototype, key, { enumerable: false });
|
|
28167
27962
|
|
|
28168
|
-
|
|
28169
|
-
{
|
|
28170
|
-
... Base_X3DField .getStaticProperties ("MFString"),
|
|
28171
|
-
});
|
|
27963
|
+
Base_X3DField .addStaticProperties (MFString, "MFString");
|
|
28172
27964
|
|
|
28173
27965
|
/**
|
|
28174
27966
|
* MFImage
|
|
@@ -28190,10 +27982,7 @@ Object .assign (Object .setPrototypeOf (MFImage .prototype, Base_X3DObjectArrayF
|
|
|
28190
27982
|
for (const key of Object .keys (MFImage .prototype))
|
|
28191
27983
|
Object .defineProperty (MFImage .prototype, key, { enumerable: false });
|
|
28192
27984
|
|
|
28193
|
-
|
|
28194
|
-
{
|
|
28195
|
-
... Base_X3DField .getStaticProperties ("MFImage"),
|
|
28196
|
-
});
|
|
27985
|
+
Base_X3DField .addStaticProperties (MFImage, "MFImage");
|
|
28197
27986
|
|
|
28198
27987
|
function TypedArrayTemplate (TypeName, SingleType, ValueType, ArrayType, Components, singleValue)
|
|
28199
27988
|
{
|
|
@@ -28229,10 +28018,7 @@ function TypedArrayTemplate (TypeName, SingleType, ValueType, ArrayType, Compone
|
|
|
28229
28018
|
for (const key of Object .keys (ArrayField .prototype))
|
|
28230
28019
|
Object .defineProperty (ArrayField .prototype, key, { enumerable: false });
|
|
28231
28020
|
|
|
28232
|
-
|
|
28233
|
-
{
|
|
28234
|
-
... Base_X3DField .getStaticProperties (TypeName),
|
|
28235
|
-
});
|
|
28021
|
+
Base_X3DField .addStaticProperties (ArrayField, TypeName);
|
|
28236
28022
|
|
|
28237
28023
|
return ArrayField;
|
|
28238
28024
|
}
|
|
@@ -28248,7 +28034,7 @@ const ArrayFields =
|
|
|
28248
28034
|
MFFloat: TypedArrayTemplate ("MFFloat", SFFloat, Value, Float32Array, 1),
|
|
28249
28035
|
MFImage: MFImage,
|
|
28250
28036
|
MFInt32: TypedArrayTemplate ("MFInt32", SFInt32, Value, Int32Array, 1),
|
|
28251
|
-
MFMatrix3d: TypedArrayTemplate ("MFMatrix3d",
|
|
28037
|
+
MFMatrix3d: TypedArrayTemplate ("MFMatrix3d", SFMatrix3d, SFMatrix3d, Float64Array, 9, Numbers_Matrix3 .IDENTITY),
|
|
28252
28038
|
MFMatrix3f: TypedArrayTemplate ("MFMatrix3f", ArrayFields_SFMatrix3f, ArrayFields_SFMatrix3f, Float32Array, 9, Numbers_Matrix3 .IDENTITY),
|
|
28253
28039
|
MFMatrix4d: TypedArrayTemplate ("MFMatrix4d", SFMatrix4d, SFMatrix4d, Float64Array, 16, Numbers_Matrix4 .IDENTITY),
|
|
28254
28040
|
MFMatrix4f: TypedArrayTemplate ("MFMatrix4f", SFMatrix4f, SFMatrix4f, Float32Array, 16, Numbers_Matrix4 .IDENTITY),
|
|
@@ -28273,8 +28059,7 @@ const ArrayFields_default_ = ArrayFields;
|
|
|
28273
28059
|
|
|
28274
28060
|
|
|
28275
28061
|
|
|
28276
|
-
|
|
28277
|
-
const MFInt32 = Fields_ArrayFields .MFInt32;
|
|
28062
|
+
const { MFInt32 } = Fields_ArrayFields;
|
|
28278
28063
|
|
|
28279
28064
|
/*
|
|
28280
28065
|
* Image
|
|
@@ -28317,41 +28102,41 @@ Object .assign (Image .prototype,
|
|
|
28317
28102
|
this .comp = comp|0;
|
|
28318
28103
|
this .array .assign (array);
|
|
28319
28104
|
},
|
|
28105
|
+
getWidth ()
|
|
28106
|
+
{
|
|
28107
|
+
return this .width;
|
|
28108
|
+
},
|
|
28320
28109
|
setWidth (value)
|
|
28321
28110
|
{
|
|
28322
28111
|
this .width = Math .max (value|0, 0);
|
|
28323
28112
|
this .array .length = this .width * this .height;
|
|
28324
28113
|
},
|
|
28325
|
-
|
|
28114
|
+
getHeight ()
|
|
28326
28115
|
{
|
|
28327
|
-
return this .
|
|
28116
|
+
return this .height;
|
|
28328
28117
|
},
|
|
28329
28118
|
setHeight (value)
|
|
28330
28119
|
{
|
|
28331
28120
|
this .height = Math .max (value|0, 0);
|
|
28332
28121
|
this .array .length = this .width * this .height;
|
|
28333
28122
|
},
|
|
28334
|
-
|
|
28123
|
+
getComp ()
|
|
28335
28124
|
{
|
|
28336
|
-
return this .
|
|
28125
|
+
return this .comp;
|
|
28337
28126
|
},
|
|
28338
28127
|
setComp (value)
|
|
28339
28128
|
{
|
|
28340
28129
|
this .comp = Math_Algorithm .clamp (value|0, 0, 4);
|
|
28341
28130
|
},
|
|
28342
|
-
|
|
28131
|
+
getArray ()
|
|
28343
28132
|
{
|
|
28344
|
-
return this .
|
|
28133
|
+
return this .array;
|
|
28345
28134
|
},
|
|
28346
28135
|
setArray (value)
|
|
28347
28136
|
{
|
|
28348
28137
|
this .array .setValue (value);
|
|
28349
28138
|
this .array .length = this .width * this .height;
|
|
28350
28139
|
},
|
|
28351
|
-
getArray ()
|
|
28352
|
-
{
|
|
28353
|
-
return this .array;
|
|
28354
|
-
},
|
|
28355
28140
|
});
|
|
28356
28141
|
|
|
28357
28142
|
/*
|
|
@@ -28360,29 +28145,9 @@ Object .assign (Image .prototype,
|
|
|
28360
28145
|
|
|
28361
28146
|
const _set_size = Symbol ();
|
|
28362
28147
|
|
|
28363
|
-
function SFImage (width, height, comp, array)
|
|
28148
|
+
function SFImage (width = 0, height = 0, comp = 0, array = new MFInt32 ())
|
|
28364
28149
|
{
|
|
28365
|
-
|
|
28366
|
-
{
|
|
28367
|
-
case 0:
|
|
28368
|
-
Base_X3DField .call (this, new Image (0, 0, 0, new MFInt32 ()));
|
|
28369
|
-
break;
|
|
28370
|
-
|
|
28371
|
-
case 1:
|
|
28372
|
-
Base_X3DField .call (this, arguments [0]);
|
|
28373
|
-
break;
|
|
28374
|
-
|
|
28375
|
-
case 3:
|
|
28376
|
-
Base_X3DField .call (this, new Image (width, height, comp, new MFInt32 ()));
|
|
28377
|
-
break;
|
|
28378
|
-
|
|
28379
|
-
case 4:
|
|
28380
|
-
Base_X3DField .call (this, new Image (width, height, comp, array));
|
|
28381
|
-
break;
|
|
28382
|
-
|
|
28383
|
-
default:
|
|
28384
|
-
throw new Error ("Invalid arguments.");
|
|
28385
|
-
}
|
|
28150
|
+
Base_X3DField .call (this, new Image (width, height, comp, array));
|
|
28386
28151
|
|
|
28387
28152
|
this .getValue () .getArray () .addParent (this);
|
|
28388
28153
|
this .addInterest (_set_size, this);
|
|
@@ -28403,7 +28168,7 @@ Object .assign (Object .setPrototypeOf (SFImage .prototype, Base_X3DField .proto
|
|
|
28403
28168
|
},
|
|
28404
28169
|
copy ()
|
|
28405
28170
|
{
|
|
28406
|
-
return new SFImage (this .
|
|
28171
|
+
return new SFImage (this .width, this .height, this .comp, this .array);
|
|
28407
28172
|
},
|
|
28408
28173
|
equals (image)
|
|
28409
28174
|
{
|
|
@@ -28588,10 +28353,7 @@ Object .defineProperties (SFImage .prototype,
|
|
|
28588
28353
|
array: Object .assign ({ enumerable: true }, array),
|
|
28589
28354
|
});
|
|
28590
28355
|
|
|
28591
|
-
|
|
28592
|
-
{
|
|
28593
|
-
... Base_X3DField .getStaticProperties ("SFImage"),
|
|
28594
|
-
});
|
|
28356
|
+
Base_X3DField .addStaticProperties (SFImage, "SFImage");
|
|
28595
28357
|
|
|
28596
28358
|
const SFImage_default_ = SFImage;
|
|
28597
28359
|
;
|
|
@@ -28943,7 +28705,7 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
|
|
|
28943
28705
|
{
|
|
28944
28706
|
return this [_fieldDefinitions];
|
|
28945
28707
|
},
|
|
28946
|
-
getField (name)
|
|
28708
|
+
getField (name, _throw = true)
|
|
28947
28709
|
{
|
|
28948
28710
|
const field = getFieldFromArray (this [_userDefinedFields], name)
|
|
28949
28711
|
?? getFieldFromArray (this [_predefinedFields], name);
|
|
@@ -28951,7 +28713,8 @@ Object .assign (Object .setPrototypeOf (X3DBaseNode .prototype, Base_X3DChildObj
|
|
|
28951
28713
|
if (field)
|
|
28952
28714
|
return field;
|
|
28953
28715
|
|
|
28954
|
-
|
|
28716
|
+
if (_throw)
|
|
28717
|
+
throw new Error (`Unknown field '${name}' in node class ${this .getTypeName ()}.`);
|
|
28955
28718
|
},
|
|
28956
28719
|
getFields ()
|
|
28957
28720
|
{
|
|
@@ -29300,7 +29063,7 @@ const X3DBaseNode_default_ = X3DBaseNode;
|
|
|
29300
29063
|
|
|
29301
29064
|
/* harmony default export */ const Base_X3DBaseNode = (Namespace/* default */.A .add ("X3DBaseNode", X3DBaseNode_default_));
|
|
29302
29065
|
;// ./src/x_ite/Browser/Legacy.js
|
|
29303
|
-
/* provided dependency */ var Legacy_$ = __webpack_require__(
|
|
29066
|
+
/* provided dependency */ var Legacy_$ = __webpack_require__(965)["A"];
|
|
29304
29067
|
const Legacy =
|
|
29305
29068
|
{
|
|
29306
29069
|
elements (elements, X3DBrowser)
|
|
@@ -29362,7 +29125,7 @@ const Legacy_default_ = Legacy;
|
|
|
29362
29125
|
|
|
29363
29126
|
/* harmony default export */ const Browser_Legacy = (Namespace/* default */.A .add ("Legacy", Legacy_default_));
|
|
29364
29127
|
;// ./src/x_ite/BROWSER_VERSION.js
|
|
29365
|
-
const BROWSER_VERSION_default_ = "
|
|
29128
|
+
const BROWSER_VERSION_default_ = "15.0.0";
|
|
29366
29129
|
;
|
|
29367
29130
|
|
|
29368
29131
|
/* harmony default export */ const BROWSER_VERSION = (Namespace/* default */.A .add ("BROWSER_VERSION", BROWSER_VERSION_default_));
|
|
@@ -29949,7 +29712,7 @@ const gettext_default_ = (string) => locale .get (string) || string;
|
|
|
29949
29712
|
|
|
29950
29713
|
/* harmony default export */ const gettext = (Namespace/* default */.A .add ("gettext", gettext_default_));
|
|
29951
29714
|
;// ./src/x_ite/Browser/Core/BrowserTimings.js
|
|
29952
|
-
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(
|
|
29715
|
+
/* provided dependency */ var BrowserTimings_$ = __webpack_require__(965)["A"];
|
|
29953
29716
|
|
|
29954
29717
|
|
|
29955
29718
|
|
|
@@ -30400,7 +30163,7 @@ const TextCompression_default_ = TextCompression;
|
|
|
30400
30163
|
|
|
30401
30164
|
/* harmony default export */ const Core_TextCompression = (Namespace/* default */.A .add ("TextCompression", TextCompression_default_));
|
|
30402
30165
|
;// ./src/x_ite/Browser/Core/BrowserOptions.js
|
|
30403
|
-
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(
|
|
30166
|
+
/* provided dependency */ var BrowserOptions_$ = __webpack_require__(965)["A"];
|
|
30404
30167
|
|
|
30405
30168
|
|
|
30406
30169
|
|
|
@@ -30705,11 +30468,14 @@ Object .assign (Object .setPrototypeOf (BrowserOptions .prototype, Base_X3DBaseN
|
|
|
30705
30468
|
|
|
30706
30469
|
this .removeUpdateContentScale ?.();
|
|
30707
30470
|
|
|
30708
|
-
this .removeUpdateContentScale =
|
|
30709
|
-
|
|
30710
|
-
|
|
30471
|
+
this .removeUpdateContentScale = () =>
|
|
30472
|
+
{
|
|
30473
|
+
visualViewport .removeEventListener ("resize", update);
|
|
30474
|
+
media .removeEventListener ("change", update);
|
|
30475
|
+
};
|
|
30711
30476
|
|
|
30712
|
-
|
|
30477
|
+
visualViewport .addEventListener ("resize", update);
|
|
30478
|
+
media .addEventListener ("change", update);
|
|
30713
30479
|
|
|
30714
30480
|
browser .reshape ();
|
|
30715
30481
|
},
|
|
@@ -30879,7 +30645,7 @@ const BrowserProperties_default_ = BrowserProperties;
|
|
|
30879
30645
|
|
|
30880
30646
|
/* harmony default export */ const Core_BrowserProperties = (Namespace/* default */.A .add ("BrowserProperties", BrowserProperties_default_));
|
|
30881
30647
|
;// ./src/x_ite/Browser/Core/RenderingProperties.js
|
|
30882
|
-
/* provided dependency */ var RenderingProperties_$ = __webpack_require__(
|
|
30648
|
+
/* provided dependency */ var RenderingProperties_$ = __webpack_require__(965)["A"];
|
|
30883
30649
|
|
|
30884
30650
|
|
|
30885
30651
|
|
|
@@ -30904,8 +30670,6 @@ Object .assign (Object .setPrototypeOf (RenderingProperties .prototype, Base_X3D
|
|
|
30904
30670
|
|
|
30905
30671
|
const browser = this .getBrowser ();
|
|
30906
30672
|
|
|
30907
|
-
this ._ContentScale .addInterest ("set_contentScale__", this);
|
|
30908
|
-
|
|
30909
30673
|
this ._MaxTextureSize = browser .getMaxTextureSize ();
|
|
30910
30674
|
this ._TextureUnits = browser .getMaxCombinedTextureUnits ();
|
|
30911
30675
|
this ._MaxLights = browser .getMaxLights ();
|
|
@@ -30914,9 +30678,9 @@ Object .assign (Object .setPrototypeOf (RenderingProperties .prototype, Base_X3D
|
|
|
30914
30678
|
this ._MaxAnisotropicDegree = browser .getMaxAnisotropicDegree ();
|
|
30915
30679
|
this ._MaxSamples = browser .getMaxSamples ();
|
|
30916
30680
|
|
|
30917
|
-
this .
|
|
30681
|
+
this .set_pixelsPerPoint__ ();
|
|
30918
30682
|
},
|
|
30919
|
-
|
|
30683
|
+
set_pixelsPerPoint__ ()
|
|
30920
30684
|
{
|
|
30921
30685
|
const
|
|
30922
30686
|
inches = RenderingProperties_$("<div></div>") .hide () .css ("height", "10in") .appendTo (RenderingProperties_$("body")),
|
|
@@ -30924,8 +30688,8 @@ Object .assign (Object .setPrototypeOf (RenderingProperties .prototype, Base_X3D
|
|
|
30924
30688
|
|
|
30925
30689
|
inches .remove ();
|
|
30926
30690
|
|
|
30927
|
-
this ._PixelsPerPoint = pixelsPerPoint
|
|
30928
|
-
}
|
|
30691
|
+
this ._PixelsPerPoint = pixelsPerPoint;
|
|
30692
|
+
},
|
|
30929
30693
|
});
|
|
30930
30694
|
|
|
30931
30695
|
Object .defineProperties (RenderingProperties,
|
|
@@ -30963,7 +30727,7 @@ const RenderingProperties_default_ = RenderingProperties;
|
|
|
30963
30727
|
|
|
30964
30728
|
/* harmony default export */ const Core_RenderingProperties = (Namespace/* default */.A .add ("RenderingProperties", RenderingProperties_default_));
|
|
30965
30729
|
;// ./src/x_ite/Browser/Core/Notification.js
|
|
30966
|
-
/* provided dependency */ var Notification_$ = __webpack_require__(
|
|
30730
|
+
/* provided dependency */ var Notification_$ = __webpack_require__(965)["A"];
|
|
30967
30731
|
|
|
30968
30732
|
|
|
30969
30733
|
|
|
@@ -31049,7 +30813,7 @@ const Notification_default_ = Notification;
|
|
|
31049
30813
|
|
|
31050
30814
|
/* harmony default export */ const Core_Notification = (Namespace/* default */.A .add ("Notification", Notification_default_));
|
|
31051
30815
|
;// ./src/x_ite/Browser/Core/ContextMenu.js
|
|
31052
|
-
/* provided dependency */ var ContextMenu_$ = __webpack_require__(
|
|
30816
|
+
/* provided dependency */ var ContextMenu_$ = __webpack_require__(965)["A"];
|
|
31053
30817
|
|
|
31054
30818
|
|
|
31055
30819
|
|
|
@@ -33749,10 +33513,7 @@ Object .assign (Box3 .prototype,
|
|
|
33749
33513
|
{
|
|
33750
33514
|
case 0:
|
|
33751
33515
|
{
|
|
33752
|
-
this .matrix .
|
|
33753
|
-
0, 0, 0, 0,
|
|
33754
|
-
0, 0, 0, 0,
|
|
33755
|
-
0, 0, 0, 0);
|
|
33516
|
+
this .matrix .assign (Numbers_Matrix4 .ZERO);
|
|
33756
33517
|
|
|
33757
33518
|
return this;
|
|
33758
33519
|
}
|
|
@@ -34487,7 +34248,7 @@ const NamedNodesArray_default_ = NamedNodesArray;
|
|
|
34487
34248
|
|
|
34488
34249
|
/* harmony default export */ const Execution_NamedNodesArray = (Namespace/* default */.A .add ("NamedNodesArray", NamedNodesArray_default_));
|
|
34489
34250
|
;// ./src/x_ite/Components/Core/X3DImportedNodeProxy.js
|
|
34490
|
-
/* provided dependency */ var X3DImportedNodeProxy_$ = __webpack_require__(
|
|
34251
|
+
/* provided dependency */ var X3DImportedNodeProxy_$ = __webpack_require__(965)["A"];
|
|
34491
34252
|
|
|
34492
34253
|
|
|
34493
34254
|
|
|
@@ -36436,7 +36197,7 @@ const X3DProtoDeclaration_default_ = X3DProtoDeclaration;
|
|
|
36436
36197
|
|
|
36437
36198
|
/* harmony default export */ const Prototype_X3DProtoDeclaration = (Namespace/* default */.A .add ("X3DProtoDeclaration", X3DProtoDeclaration_default_));
|
|
36438
36199
|
;// ./src/x_ite/Parser/X3DParser.js
|
|
36439
|
-
/* provided dependency */ var X3DParser_$ = __webpack_require__(
|
|
36200
|
+
/* provided dependency */ var X3DParser_$ = __webpack_require__(965)["A"];
|
|
36440
36201
|
|
|
36441
36202
|
|
|
36442
36203
|
function X3DParser (scene, name = "Parser")
|
|
@@ -36759,7 +36520,7 @@ const Placeholder_default_ = Placeholder;
|
|
|
36759
36520
|
|
|
36760
36521
|
/* harmony default export */ const Parser_Placeholder = (Namespace/* default */.A .add ("Placeholder", Placeholder_default_));
|
|
36761
36522
|
;// ./src/x_ite/Parser/VRMLParser.js
|
|
36762
|
-
/* provided dependency */ var VRMLParser_$ = __webpack_require__(
|
|
36523
|
+
/* provided dependency */ var VRMLParser_$ = __webpack_require__(965)["A"];
|
|
36763
36524
|
|
|
36764
36525
|
|
|
36765
36526
|
|
|
@@ -39452,7 +39213,7 @@ const VRMLParser_default_ = VRMLParser;
|
|
|
39452
39213
|
|
|
39453
39214
|
/* harmony default export */ const Parser_VRMLParser = (Namespace/* default */.A .add ("VRMLParser", VRMLParser_default_));
|
|
39454
39215
|
;// ./src/x_ite/Parser/XMLParser.js
|
|
39455
|
-
/* provided dependency */ var XMLParser_$ = __webpack_require__(
|
|
39216
|
+
/* provided dependency */ var XMLParser_$ = __webpack_require__(965)["A"];
|
|
39456
39217
|
|
|
39457
39218
|
|
|
39458
39219
|
|
|
@@ -40738,7 +40499,7 @@ const XMLParser_default_ = XMLParser;
|
|
|
40738
40499
|
|
|
40739
40500
|
/* harmony default export */ const Parser_XMLParser = (Namespace/* default */.A .add ("XMLParser", XMLParser_default_));
|
|
40740
40501
|
;// ./src/x_ite/Parser/JSONParser.js
|
|
40741
|
-
/* provided dependency */ var JSONParser_$ = __webpack_require__(
|
|
40502
|
+
/* provided dependency */ var JSONParser_$ = __webpack_require__(965)["A"];
|
|
40742
40503
|
|
|
40743
40504
|
|
|
40744
40505
|
|
|
@@ -41647,7 +41408,7 @@ const Plane3_default_ = Plane3;
|
|
|
41647
41408
|
|
|
41648
41409
|
/* harmony default export */ const Geometry_Plane3 = (Namespace/* default */.A .add ("Plane3", Plane3_default_));
|
|
41649
41410
|
;// ./src/standard/Math/Geometry/Triangle3.js
|
|
41650
|
-
/* provided dependency */ var libtess = __webpack_require__(
|
|
41411
|
+
/* provided dependency */ var libtess = __webpack_require__(525);
|
|
41651
41412
|
|
|
41652
41413
|
|
|
41653
41414
|
const Triangle3 =
|
|
@@ -48352,7 +48113,7 @@ const X3DTexture2DNode_default_ = X3DTexture2DNode;
|
|
|
48352
48113
|
|
|
48353
48114
|
/* harmony default export */ const Texturing_X3DTexture2DNode = (Namespace/* default */.A .add ("X3DTexture2DNode", X3DTexture2DNode_default_));
|
|
48354
48115
|
;// ./src/x_ite/Components/Texturing/ImageTexture.js
|
|
48355
|
-
/* provided dependency */ var ImageTexture_$ = __webpack_require__(
|
|
48116
|
+
/* provided dependency */ var ImageTexture_$ = __webpack_require__(965)["A"];
|
|
48356
48117
|
|
|
48357
48118
|
|
|
48358
48119
|
|
|
@@ -50868,7 +50629,7 @@ const Layer_default_ = Layer;
|
|
|
50868
50629
|
|
|
50869
50630
|
/* harmony default export */ const Layering_Layer = (Namespace/* default */.A .add ("Layer", Layer_default_));
|
|
50870
50631
|
;// ./src/x_ite/Parser/GLTF2Parser.js
|
|
50871
|
-
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(
|
|
50632
|
+
/* provided dependency */ var GLTF2Parser_$ = __webpack_require__(965)["A"];
|
|
50872
50633
|
|
|
50873
50634
|
|
|
50874
50635
|
|
|
@@ -52446,7 +52207,7 @@ Object .assign (Object .setPrototypeOf (GLTF2Parser .prototype, Parser_X3DParser
|
|
|
52446
52207
|
|
|
52447
52208
|
const multiscatterColor = new Numbers_Color3 ();
|
|
52448
52209
|
|
|
52449
|
-
if (this .vectorValue (KHR_materials_volume_scatter .
|
|
52210
|
+
if (this .vectorValue (KHR_materials_volume_scatter .multiscatterColorFactor, multiscatterColor))
|
|
52450
52211
|
extension ._multiscatterColor = multiscatterColor;
|
|
52451
52212
|
|
|
52452
52213
|
extension ._multiscatterColorTexture = this .textureInfo (KHR_materials_volume_scatter .multiscatterColorTexture);
|
|
@@ -55223,7 +54984,7 @@ const GLTF2Parser_default_ = GLTF2Parser;
|
|
|
55223
54984
|
|
|
55224
54985
|
/* harmony default export */ const Parser_GLTF2Parser = (Namespace/* default */.A .add ("GLTF2Parser", GLTF2Parser_default_));
|
|
55225
54986
|
;// ./src/x_ite/Parser/GLB2Parser.js
|
|
55226
|
-
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(
|
|
54987
|
+
/* provided dependency */ var GLB2Parser_$ = __webpack_require__(965)["A"];
|
|
55227
54988
|
|
|
55228
54989
|
|
|
55229
54990
|
|
|
@@ -55329,7 +55090,7 @@ const GLB2Parser_default_ = GLB2Parser;
|
|
|
55329
55090
|
|
|
55330
55091
|
/* harmony default export */ const Parser_GLB2Parser = (Namespace/* default */.A .add ("GLB2Parser", GLB2Parser_default_));
|
|
55331
55092
|
;// ./src/x_ite/Parser/OBJParser.js
|
|
55332
|
-
/* provided dependency */ var OBJParser_$ = __webpack_require__(
|
|
55093
|
+
/* provided dependency */ var OBJParser_$ = __webpack_require__(965)["A"];
|
|
55333
55094
|
|
|
55334
55095
|
|
|
55335
55096
|
|
|
@@ -56783,7 +56544,7 @@ const STLAParser_default_ = STLAParser;
|
|
|
56783
56544
|
|
|
56784
56545
|
/* harmony default export */ const Parser_STLAParser = (Namespace/* default */.A .add ("STLAParser", STLAParser_default_));
|
|
56785
56546
|
;// ./src/x_ite/Parser/STLBParser.js
|
|
56786
|
-
/* provided dependency */ var STLBParser_$ = __webpack_require__(
|
|
56547
|
+
/* provided dependency */ var STLBParser_$ = __webpack_require__(965)["A"];
|
|
56787
56548
|
|
|
56788
56549
|
|
|
56789
56550
|
|
|
@@ -57781,9 +57542,7 @@ Object .assign (Box2 .prototype,
|
|
|
57781
57542
|
{
|
|
57782
57543
|
case 0:
|
|
57783
57544
|
{
|
|
57784
|
-
this .matrix .
|
|
57785
|
-
0, 0, 0,
|
|
57786
|
-
0, 0, 0);
|
|
57545
|
+
this .matrix .assign (Numbers_Matrix3 .ZERO);
|
|
57787
57546
|
|
|
57788
57547
|
return this;
|
|
57789
57548
|
}
|
|
@@ -58153,8 +57912,8 @@ const Bezier_default_ = Bezier;
|
|
|
58153
57912
|
|
|
58154
57913
|
/* harmony default export */ const Algorithms_Bezier = (Namespace/* default */.A .add ("Bezier", Bezier_default_));
|
|
58155
57914
|
;// ./src/x_ite/Parser/SVGParser.js
|
|
58156
|
-
/* provided dependency */ var SVGParser_$ = __webpack_require__(
|
|
58157
|
-
/* provided dependency */ var SVGParser_libtess = __webpack_require__(
|
|
57915
|
+
/* provided dependency */ var SVGParser_$ = __webpack_require__(965)["A"];
|
|
57916
|
+
/* provided dependency */ var SVGParser_libtess = __webpack_require__(525);
|
|
58158
57917
|
|
|
58159
57918
|
|
|
58160
57919
|
|
|
@@ -60888,7 +60647,7 @@ const SVGParser_default_ = SVGParser;
|
|
|
60888
60647
|
|
|
60889
60648
|
/* harmony default export */ const Parser_SVGParser = (Namespace/* default */.A .add ("SVGParser", SVGParser_default_));
|
|
60890
60649
|
;// ./src/x_ite/Parser/GoldenGate.js
|
|
60891
|
-
/* provided dependency */ var GoldenGate_$ = __webpack_require__(
|
|
60650
|
+
/* provided dependency */ var GoldenGate_$ = __webpack_require__(965)["A"];
|
|
60892
60651
|
|
|
60893
60652
|
|
|
60894
60653
|
|
|
@@ -61304,7 +61063,7 @@ const X3DWorld_default_ = X3DWorld;
|
|
|
61304
61063
|
|
|
61305
61064
|
/* harmony default export */ const Execution_X3DWorld = (Namespace/* default */.A .add ("X3DWorld", X3DWorld_default_));
|
|
61306
61065
|
;// ./src/x_ite/InputOutput/FileLoader.js
|
|
61307
|
-
/* provided dependency */ var FileLoader_$ = __webpack_require__(
|
|
61066
|
+
/* provided dependency */ var FileLoader_$ = __webpack_require__(965)["A"];
|
|
61308
61067
|
|
|
61309
61068
|
|
|
61310
61069
|
|
|
@@ -62011,7 +61770,7 @@ const ProtoDeclarationArray_default_ = ProtoDeclarationArray;
|
|
|
62011
61770
|
|
|
62012
61771
|
/* harmony default export */ const Prototype_ProtoDeclarationArray = (Namespace/* default */.A .add ("ProtoDeclarationArray", ProtoDeclarationArray_default_));
|
|
62013
61772
|
;// ./src/x_ite/Routing/X3DRoute.js
|
|
62014
|
-
/* provided dependency */ var X3DRoute_$ = __webpack_require__(
|
|
61773
|
+
/* provided dependency */ var X3DRoute_$ = __webpack_require__(965)["A"];
|
|
62015
61774
|
|
|
62016
61775
|
|
|
62017
61776
|
|
|
@@ -63901,7 +63660,7 @@ Object .assign (Object .setPrototypeOf (X3DScene .prototype, Execution_X3DExecut
|
|
|
63901
63660
|
if (!this [_units] .has (category))
|
|
63902
63661
|
return;
|
|
63903
63662
|
|
|
63904
|
-
this [_units] .update (category, category, new Configuration_UnitInfo (category, String (name),
|
|
63663
|
+
this [_units] .update (category, category, new Configuration_UnitInfo (category, String (name), +conversionFactor));
|
|
63905
63664
|
|
|
63906
63665
|
this ._units_changed = Date .now () / 1000;
|
|
63907
63666
|
},
|
|
@@ -64668,7 +64427,7 @@ add ("PT_Sans/PTSans-Italic.woff2", false, true);
|
|
|
64668
64427
|
// add ("PT_Sans/PTSans-BoldItalic.woff2", true, true);
|
|
64669
64428
|
|
|
64670
64429
|
;// ./src/x_ite/Browser/Core/X3DCoreContext.js
|
|
64671
|
-
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(
|
|
64430
|
+
/* provided dependency */ var X3DCoreContext_$ = __webpack_require__(965)["A"];
|
|
64672
64431
|
|
|
64673
64432
|
|
|
64674
64433
|
|
|
@@ -68026,7 +67785,7 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
68026
67785
|
return;
|
|
68027
67786
|
|
|
68028
67787
|
// Needed for geometry primitives, Text with ScreenFontStyle and tools.
|
|
68029
|
-
geometryContext .traverseBefore ?.(type, renderObject);
|
|
67788
|
+
geometryContext .traverseBefore ?.(type, renderObject, this);
|
|
68030
67789
|
|
|
68031
67790
|
switch (type)
|
|
68032
67791
|
{
|
|
@@ -68063,7 +67822,7 @@ Object .assign (Object .setPrototypeOf (X3DShapeNode .prototype, Core_X3DChildNo
|
|
|
68063
67822
|
}
|
|
68064
67823
|
|
|
68065
67824
|
// Needed for geometry primitives, Text with ScreenFontStyle and tools.
|
|
68066
|
-
geometryContext .traverseAfter ?.(type, renderObject);
|
|
67825
|
+
geometryContext .traverseAfter ?.(type, renderObject, this);
|
|
68067
67826
|
},
|
|
68068
67827
|
picking (renderObject)
|
|
68069
67828
|
{
|
|
@@ -70781,8 +70540,8 @@ const OrientationChaser_default_ = OrientationChaser;
|
|
|
70781
70540
|
|
|
70782
70541
|
/* harmony default export */ const Followers_OrientationChaser = (Namespace/* default */.A .add ("OrientationChaser", OrientationChaser_default_));
|
|
70783
70542
|
;// ./src/x_ite/Browser/Navigation/ExamineViewer.js
|
|
70784
|
-
/* provided dependency */ var jquery_mousewheel = __webpack_require__(
|
|
70785
|
-
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(
|
|
70543
|
+
/* provided dependency */ var jquery_mousewheel = __webpack_require__(878);
|
|
70544
|
+
/* provided dependency */ var ExamineViewer_$ = __webpack_require__(965)["A"];
|
|
70786
70545
|
|
|
70787
70546
|
|
|
70788
70547
|
|
|
@@ -71857,8 +71616,8 @@ const ScreenLine_default_ = ScreenLine;
|
|
|
71857
71616
|
|
|
71858
71617
|
/* harmony default export */ const Rendering_ScreenLine = (Namespace/* default */.A .add ("ScreenLine", ScreenLine_default_));
|
|
71859
71618
|
;// ./src/x_ite/Browser/Navigation/X3DFlyViewer.js
|
|
71860
|
-
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(
|
|
71861
|
-
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(
|
|
71619
|
+
/* provided dependency */ var X3DFlyViewer_jquery_mousewheel = __webpack_require__(878);
|
|
71620
|
+
/* provided dependency */ var X3DFlyViewer_$ = __webpack_require__(965)["A"];
|
|
71862
71621
|
|
|
71863
71622
|
|
|
71864
71623
|
|
|
@@ -72595,8 +72354,8 @@ const FlyViewer_default_ = FlyViewer;
|
|
|
72595
72354
|
|
|
72596
72355
|
/* harmony default export */ const Navigation_FlyViewer = (Namespace/* default */.A .add ("FlyViewer", FlyViewer_default_));
|
|
72597
72356
|
;// ./src/x_ite/Browser/Navigation/PlaneViewer.js
|
|
72598
|
-
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(
|
|
72599
|
-
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(
|
|
72357
|
+
/* provided dependency */ var PlaneViewer_jquery_mousewheel = __webpack_require__(878);
|
|
72358
|
+
/* provided dependency */ var PlaneViewer_$ = __webpack_require__(965)["A"];
|
|
72600
72359
|
|
|
72601
72360
|
|
|
72602
72361
|
|
|
@@ -72809,8 +72568,8 @@ const NoneViewer_default_ = NoneViewer;
|
|
|
72809
72568
|
|
|
72810
72569
|
/* harmony default export */ const Navigation_NoneViewer = (Namespace/* default */.A .add ("NoneViewer", NoneViewer_default_));
|
|
72811
72570
|
;// ./src/x_ite/Browser/Navigation/LookAtViewer.js
|
|
72812
|
-
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(
|
|
72813
|
-
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(
|
|
72571
|
+
/* provided dependency */ var LookAtViewer_jquery_mousewheel = __webpack_require__(878);
|
|
72572
|
+
/* provided dependency */ var LookAtViewer_$ = __webpack_require__(965)["A"];
|
|
72814
72573
|
|
|
72815
72574
|
|
|
72816
72575
|
|
|
@@ -73479,7 +73238,6 @@ const X3DLightNode_default_ = X3DLightNode;
|
|
|
73479
73238
|
|
|
73480
73239
|
|
|
73481
73240
|
|
|
73482
|
-
|
|
73483
73241
|
const DirectionalLights = Utility_ObjectCache (DirectionalLightContainer);
|
|
73484
73242
|
|
|
73485
73243
|
function DirectionalLightContainer ()
|
|
@@ -74156,8 +73914,8 @@ const X3DPickingContext_default_ = X3DPickingContext;
|
|
|
74156
73914
|
|
|
74157
73915
|
/* harmony default export */ const Picking_X3DPickingContext = (Namespace/* default */.A .add ("X3DPickingContext", X3DPickingContext_default_));
|
|
74158
73916
|
;// ./src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js
|
|
74159
|
-
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(
|
|
74160
|
-
/* provided dependency */ var PointingDevice_$ = __webpack_require__(
|
|
73917
|
+
/* provided dependency */ var PointingDevice_jquery_mousewheel = __webpack_require__(878);
|
|
73918
|
+
/* provided dependency */ var PointingDevice_$ = __webpack_require__(965)["A"];
|
|
74161
73919
|
|
|
74162
73920
|
|
|
74163
73921
|
|
|
@@ -75417,7 +75175,7 @@ const Lock_default_ = Lock;
|
|
|
75417
75175
|
|
|
75418
75176
|
/* harmony default export */ const Utility_Lock = (Namespace/* default */.A .add ("Lock", Lock_default_));
|
|
75419
75177
|
;// ./src/x_ite/Browser/Rendering/X3DRenderingContext.js
|
|
75420
|
-
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(
|
|
75178
|
+
/* provided dependency */ var X3DRenderingContext_$ = __webpack_require__(965)["A"];
|
|
75421
75179
|
|
|
75422
75180
|
|
|
75423
75181
|
|
|
@@ -75703,17 +75461,15 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
75703
75461
|
return new Promise (resolve =>
|
|
75704
75462
|
{
|
|
75705
75463
|
const
|
|
75706
|
-
|
|
75707
|
-
|
|
75708
|
-
viewportHeight = Math .max (height * contentScale, 1)|0,
|
|
75709
|
-
key = Symbol ();
|
|
75464
|
+
[vWidth, vHeight] = this .limitFramebufferSize (width, height),
|
|
75465
|
+
key = Symbol ();
|
|
75710
75466
|
|
|
75711
75467
|
const test = () =>
|
|
75712
75468
|
{
|
|
75713
|
-
if (this ._viewport [2] !==
|
|
75469
|
+
if (this ._viewport [2] !== vWidth)
|
|
75714
75470
|
return;
|
|
75715
75471
|
|
|
75716
|
-
if (this ._viewport [3] !==
|
|
75472
|
+
if (this ._viewport [3] !== vHeight)
|
|
75717
75473
|
return;
|
|
75718
75474
|
|
|
75719
75475
|
this ._viewport .removeFieldCallback (key);
|
|
@@ -75734,10 +75490,13 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
75734
75490
|
return;
|
|
75735
75491
|
|
|
75736
75492
|
const
|
|
75737
|
-
canvas
|
|
75738
|
-
|
|
75739
|
-
width
|
|
75740
|
-
|
|
75493
|
+
canvas = this .getCanvas (),
|
|
75494
|
+
parent = canvas .parent (),
|
|
75495
|
+
[width, height, contentScale] = this .limitFramebufferSize (parent .width (), parent .height ());
|
|
75496
|
+
|
|
75497
|
+
this .getRenderingProperties () ._ContentScale = parent .width () ? width / parent .width () : contentScale;
|
|
75498
|
+
|
|
75499
|
+
// this .println (this .getRenderingProperty ("ContentScale"), devicePixelRatio)
|
|
75741
75500
|
|
|
75742
75501
|
canvas
|
|
75743
75502
|
.prop ("width", width)
|
|
@@ -75747,6 +75506,39 @@ Object .assign (X3DRenderingContext .prototype,
|
|
|
75747
75506
|
|
|
75748
75507
|
this .addBrowserEvent ();
|
|
75749
75508
|
},
|
|
75509
|
+
limitFramebufferSize (width, height)
|
|
75510
|
+
{
|
|
75511
|
+
const
|
|
75512
|
+
gl = this .getContext (),
|
|
75513
|
+
maxViewportDims = gl .getParameter (gl .MAX_VIEWPORT_DIMS);
|
|
75514
|
+
|
|
75515
|
+
let contentScale = this .getBrowserOption ("ContentScale");
|
|
75516
|
+
|
|
75517
|
+
if (contentScale === -1)
|
|
75518
|
+
contentScale = devicePixelRatio;
|
|
75519
|
+
|
|
75520
|
+
width *= contentScale,
|
|
75521
|
+
height *= contentScale;
|
|
75522
|
+
|
|
75523
|
+
if (width > maxViewportDims [0] || height > maxViewportDims [1])
|
|
75524
|
+
{
|
|
75525
|
+
if (width > height)
|
|
75526
|
+
{
|
|
75527
|
+
height = maxViewportDims [1] * height / width;
|
|
75528
|
+
width = maxViewportDims [0];
|
|
75529
|
+
}
|
|
75530
|
+
else
|
|
75531
|
+
{
|
|
75532
|
+
width = maxViewportDims [0] * width / height;
|
|
75533
|
+
height = maxViewportDims [1];
|
|
75534
|
+
}
|
|
75535
|
+
}
|
|
75536
|
+
|
|
75537
|
+
width = Math .max (width|0, 1);
|
|
75538
|
+
height = Math .max (height|0, 1);
|
|
75539
|
+
|
|
75540
|
+
return [width, height, contentScale];
|
|
75541
|
+
},
|
|
75750
75542
|
reshapeFramebuffer (i, x, y, width, height)
|
|
75751
75543
|
{
|
|
75752
75544
|
const
|
|
@@ -77572,7 +77364,7 @@ const X3DShaderNode_default_ = X3DShaderNode;
|
|
|
77572
77364
|
|
|
77573
77365
|
/* harmony default export */ const Shaders_X3DShaderNode = (Namespace/* default */.A .add ("X3DShaderNode", X3DShaderNode_default_));
|
|
77574
77366
|
;// ./src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js
|
|
77575
|
-
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(
|
|
77367
|
+
/* provided dependency */ var X3DProgrammableShaderObject_$ = __webpack_require__(965)["A"];
|
|
77576
77368
|
|
|
77577
77369
|
|
|
77578
77370
|
|
|
@@ -79571,7 +79363,7 @@ const ShaderCompiler_default_ = ShaderCompiler;
|
|
|
79571
79363
|
|
|
79572
79364
|
/* harmony default export */ const Shaders_ShaderCompiler = (Namespace/* default */.A .add ("ShaderCompiler", ShaderCompiler_default_));
|
|
79573
79365
|
;// ./src/x_ite/Components/Shaders/ShaderPart.js
|
|
79574
|
-
/* provided dependency */ var ShaderPart_$ = __webpack_require__(
|
|
79366
|
+
/* provided dependency */ var ShaderPart_$ = __webpack_require__(965)["A"];
|
|
79575
79367
|
|
|
79576
79368
|
|
|
79577
79369
|
|
|
@@ -80594,13 +80386,15 @@ Object .assign (Object .setPrototypeOf (LineProperties .prototype, Shape_X3DAppe
|
|
|
80594
80386
|
|
|
80595
80387
|
if (this .applied)
|
|
80596
80388
|
{
|
|
80389
|
+
const lineStippleScale = 1 / (browser .getRenderingProperty ("PixelsPerPoint") * browser .getRenderingProperty ("ContentScale") * 32); // 32px
|
|
80390
|
+
|
|
80597
80391
|
const textureUnit = browser .popTextureUnit ();
|
|
80598
80392
|
|
|
80599
80393
|
if (!this .transformLines)
|
|
80600
80394
|
gl .lineWidth (this .linewidthScaleFactor);
|
|
80601
80395
|
|
|
80602
80396
|
gl .uniform1i (shaderObject .x3d_LinePropertiesLinetype, this .linetype);
|
|
80603
|
-
gl .uniform1f (shaderObject .x3d_LineStippleScale,
|
|
80397
|
+
gl .uniform1f (shaderObject .x3d_LineStippleScale, lineStippleScale);
|
|
80604
80398
|
|
|
80605
80399
|
gl .activeTexture (gl .TEXTURE0 + textureUnit);
|
|
80606
80400
|
gl .bindTexture (gl .TEXTURE_2D, browser .getLinetypeTexture () .getTexture ());
|
|
@@ -81273,10 +81067,6 @@ Object .assign (X3DShapeContext .prototype,
|
|
|
81273
81067
|
return defaultAppearance;
|
|
81274
81068
|
})();
|
|
81275
81069
|
},
|
|
81276
|
-
getLineStippleScale ()
|
|
81277
|
-
{
|
|
81278
|
-
return 1 / (this .getRenderingProperty ("PixelsPerPoint") * 32); // 32px
|
|
81279
|
-
},
|
|
81280
81070
|
getDefaultPointProperties ()
|
|
81281
81071
|
{
|
|
81282
81072
|
return this [_defaultPointProperties] ??= (() =>
|
|
@@ -81503,7 +81293,7 @@ const PeriodicWave_default_ = PeriodicWave;
|
|
|
81503
81293
|
|
|
81504
81294
|
/* harmony default export */ const Sound_PeriodicWave = (Namespace/* default */.A .add ("PeriodicWave", PeriodicWave_default_));
|
|
81505
81295
|
;// ./src/x_ite/Browser/Sound/X3DSoundContext.js
|
|
81506
|
-
/* provided dependency */ var X3DSoundContext_$ = __webpack_require__(
|
|
81296
|
+
/* provided dependency */ var X3DSoundContext_$ = __webpack_require__(965)["A"];
|
|
81507
81297
|
|
|
81508
81298
|
|
|
81509
81299
|
|
|
@@ -81810,7 +81600,7 @@ const TextureTransform_default_ = TextureTransform;
|
|
|
81810
81600
|
|
|
81811
81601
|
/* harmony default export */ const Texturing_TextureTransform = (Namespace/* default */.A .add ("TextureTransform", TextureTransform_default_));
|
|
81812
81602
|
;// ./src/x_ite/Browser/Texturing/KTXDecoder.js
|
|
81813
|
-
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(
|
|
81603
|
+
/* provided dependency */ var KTXDecoder_$ = __webpack_require__(965)["A"];
|
|
81814
81604
|
const KTXDecoder_default_ = class KTXDecoder
|
|
81815
81605
|
{
|
|
81816
81606
|
constructor (gl, externalKtxlib, scriptDir)
|
|
@@ -82843,7 +82633,7 @@ const X3DBrowserContext_default_ = X3DBrowserContext;
|
|
|
82843
82633
|
|
|
82844
82634
|
/* harmony default export */ const Browser_X3DBrowserContext = (Namespace/* default */.A .add ("X3DBrowserContext", X3DBrowserContext_default_));
|
|
82845
82635
|
;// ./src/x_ite/Browser/DOMIntegration.js
|
|
82846
|
-
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(
|
|
82636
|
+
/* provided dependency */ var DOMIntegration_$ = __webpack_require__(965)["A"];
|
|
82847
82637
|
/*******************************************************************************
|
|
82848
82638
|
* MIT License
|
|
82849
82639
|
*
|
|
@@ -91627,7 +91417,6 @@ const EnvironmentLight_default_ = EnvironmentLight;
|
|
|
91627
91417
|
|
|
91628
91418
|
|
|
91629
91419
|
|
|
91630
|
-
|
|
91631
91420
|
// Shadow map layout
|
|
91632
91421
|
// Compact layout:
|
|
91633
91422
|
//
|
|
@@ -91930,7 +91719,6 @@ const PointLight_default_ = PointLight;
|
|
|
91930
91719
|
|
|
91931
91720
|
|
|
91932
91721
|
|
|
91933
|
-
|
|
91934
91722
|
const SpotLights = Utility_ObjectCache (SpotLightContainer);
|
|
91935
91723
|
|
|
91936
91724
|
function SpotLightContainer ()
|
|
@@ -100895,9 +100683,9 @@ const PNGMedia_default_ = PNGMedia;
|
|
|
100895
100683
|
|
|
100896
100684
|
/* harmony default export */ const Texturing_PNGMedia = (Namespace/* default */.A .add ("PNGMedia", PNGMedia_default_));
|
|
100897
100685
|
;// ./src/x_ite/Components/Texturing/MovieTexture.js
|
|
100898
|
-
/* provided dependency */ var MovieTexture_$ = __webpack_require__(
|
|
100899
|
-
/* provided dependency */ var SuperGif = __webpack_require__(
|
|
100900
|
-
/* provided dependency */ var APNG = __webpack_require__(
|
|
100686
|
+
/* provided dependency */ var MovieTexture_$ = __webpack_require__(965)["A"];
|
|
100687
|
+
/* provided dependency */ var SuperGif = __webpack_require__(399);
|
|
100688
|
+
/* provided dependency */ var APNG = __webpack_require__(581);
|
|
100901
100689
|
|
|
100902
100690
|
|
|
100903
100691
|
|
|
@@ -102257,7 +102045,7 @@ const Components_default_ = Components;
|
|
|
102257
102045
|
|
|
102258
102046
|
/* harmony default export */ const x_ite_Components = (Namespace/* default */.A .add ("Components", Components_default_));
|
|
102259
102047
|
;// ./src/x_ite/Browser/X3DBrowser.js
|
|
102260
|
-
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(
|
|
102048
|
+
/* provided dependency */ var X3DBrowser_$ = __webpack_require__(965)["A"];
|
|
102261
102049
|
|
|
102262
102050
|
|
|
102263
102051
|
|
|
@@ -103404,7 +103192,7 @@ const SUPPORTED_VERSIONS_default_ = [
|
|
|
103404
103192
|
|
|
103405
103193
|
/* harmony default export */ const SUPPORTED_VERSIONS = (Namespace/* default */.A .add ("SUPPORTED_VERSIONS", SUPPORTED_VERSIONS_default_));
|
|
103406
103194
|
;// ./src/x_ite/X3DCanvasElement.js
|
|
103407
|
-
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(
|
|
103195
|
+
/* provided dependency */ var X3DCanvasElement_$ = __webpack_require__(965)["A"];
|
|
103408
103196
|
|
|
103409
103197
|
|
|
103410
103198
|
class X3DCanvasElement extends HTMLElement
|
|
@@ -103568,8 +103356,8 @@ const QuickSort_default_ = QuickSort;
|
|
|
103568
103356
|
|
|
103569
103357
|
/* harmony default export */ const Algorithms_QuickSort = (Namespace/* default */.A .add ("QuickSort", QuickSort_default_));
|
|
103570
103358
|
;// ./src/lib/jquery.js
|
|
103571
|
-
/* provided dependency */ var jquery_$ = __webpack_require__(
|
|
103572
|
-
/* provided dependency */ var pako = __webpack_require__(
|
|
103359
|
+
/* provided dependency */ var jquery_$ = __webpack_require__(965)["A"];
|
|
103360
|
+
/* provided dependency */ var pako = __webpack_require__(260);
|
|
103573
103361
|
Object .assign (jquery_$,
|
|
103574
103362
|
{
|
|
103575
103363
|
decodeText (input)
|
|
@@ -103633,13 +103421,13 @@ const jquery_default_ = jquery_$;
|
|
|
103633
103421
|
|
|
103634
103422
|
/* harmony default export */ const jquery = (Namespace/* default */.A .add ("jquery", jquery_default_));
|
|
103635
103423
|
;// ./src/lib/libtess.js
|
|
103636
|
-
/* provided dependency */ var libtess_libtess = __webpack_require__(
|
|
103424
|
+
/* provided dependency */ var libtess_libtess = __webpack_require__(525);
|
|
103637
103425
|
const libtess_default_ = libtess_libtess;
|
|
103638
103426
|
;
|
|
103639
103427
|
|
|
103640
103428
|
/* harmony default export */ const lib_libtess = (Namespace/* default */.A .add ("libtess", libtess_default_));
|
|
103641
103429
|
;// ./src/x_ite/X3D.js
|
|
103642
|
-
/* provided dependency */ var X3D_$ = __webpack_require__(
|
|
103430
|
+
/* provided dependency */ var X3D_$ = __webpack_require__(965)["A"];
|
|
103643
103431
|
|
|
103644
103432
|
|
|
103645
103433
|
|
|
@@ -103805,7 +103593,7 @@ Namespace/* default */.A, Namespace/* default */.A .Fields,
|
|
|
103805
103593
|
|
|
103806
103594
|
// Assign X3D to global namespace.
|
|
103807
103595
|
|
|
103808
|
-
window [Symbol .for ("X_ITE.X3D-
|
|
103596
|
+
window [Symbol .for ("X_ITE.X3D-15.0.0")] = x_ite_X3D;
|
|
103809
103597
|
|
|
103810
103598
|
customElements .define ("x3d-canvas", x_ite_X3DCanvasElement);
|
|
103811
103599
|
|