@pacem/pacem-3d 1.0.3 → 1.0.5-archimedes
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/pacem-3d.js +508 -508
- package/dist/browser/pacem-3d.js.map +1 -1
- package/dist/browser/pacem-3d.min.js +2 -2
- package/dist/bundle/pacem-3d.min.mjs +18 -18
- package/dist/bundle/pacem-3d.mjs +523 -525
- package/dist/bundle/pacem-3d.mjs.map +4 -4
- package/dist/esm/constants.js +1 -1
- package/dist/esm/converters.js +1 -1
- package/dist/esm/decorators.js +1 -1
- package/dist/esm/detector.js +1 -1
- package/dist/esm/geometry.js +1 -1
- package/dist/esm/index-components-drawing3d.js +1 -1
- package/dist/esm/index-components.js +3 -2
- package/dist/esm/index-drawing3d.js +1 -1
- package/dist/esm/index-iife.js +1 -1
- package/dist/esm/index-root.js +3 -2
- package/dist/esm/index.js +3 -2
- package/dist/esm/stage.js +1 -1
- package/dist/esm/types.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +5 -3
package/dist/browser/pacem-3d.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @pacem/pacem-3d v1.0.
|
|
2
|
+
* @pacem/pacem-3d v1.0.5-archimedes (https://js.pacem.it)
|
|
3
3
|
* Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -887,84 +887,155 @@
|
|
|
887
887
|
class Pacem3DAdapterElement extends pacemCore.PacemEventTarget {
|
|
888
888
|
}
|
|
889
889
|
|
|
890
|
-
//namespace Pacem.
|
|
891
|
-
/**
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
var info = detected.info[section] = detected.info[section] || {};
|
|
910
|
-
name = name.replace(/[^\w]+/g, '');
|
|
911
|
-
name = name.substring(0, 1).toLowerCase() + name.substring(1);
|
|
912
|
-
info[name] = value;
|
|
913
|
-
};
|
|
914
|
-
if (navigator.userAgent.indexOf('MSIE') >= 0) {
|
|
915
|
-
try {
|
|
916
|
-
ctx = window['WebGLHelper'].CreateGLContext(cvs, 'canvas');
|
|
890
|
+
//namespace Pacem.Drawing3D {
|
|
891
|
+
/**
|
|
892
|
+
* Property decorator factory that turns the decorated field into an accessor backed by a private field, invoking
|
|
893
|
+
* `callback` with the property name and old/new values whenever it is set to a different value. Used by
|
|
894
|
+
* {@link NodeGeometry}/{@link LineGeometry}/{@link MeshGeometry} to flag themselves as dirty ({@link StalePropertyFlag.Geometry})
|
|
895
|
+
* whenever their vertex data changes.
|
|
896
|
+
* @param callback Invoked (with `this` bound to the decorated instance) on every effective change of the property.
|
|
897
|
+
*/
|
|
898
|
+
function NotifyChange(callback) {
|
|
899
|
+
return (target, prop, descriptor) => {
|
|
900
|
+
const backingField = `_${prop}_${pacemCore.Utils.uniqueCode()}_backingField`;
|
|
901
|
+
function getter() {
|
|
902
|
+
return this[backingField];
|
|
903
|
+
}
|
|
904
|
+
function setter(val) {
|
|
905
|
+
if (val !== this[backingField]) {
|
|
906
|
+
const old = this[backingField];
|
|
907
|
+
this[backingField] = val;
|
|
908
|
+
callback.call(this, prop, old, val);
|
|
917
909
|
}
|
|
918
|
-
catch (e) { }
|
|
919
910
|
}
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
911
|
+
//if (delete target[prop]) {
|
|
912
|
+
Object.defineProperty(target, prop, {
|
|
913
|
+
get: function () {
|
|
914
|
+
return getter.call(this);
|
|
915
|
+
},
|
|
916
|
+
set: function (val) {
|
|
917
|
+
setter.call(this, val);
|
|
918
|
+
},
|
|
919
|
+
enumerable: true,
|
|
920
|
+
configurable: false
|
|
921
|
+
});
|
|
922
|
+
//}
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
var __decorate$j = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
927
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
928
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
929
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
930
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
931
|
+
};
|
|
932
|
+
/**
|
|
933
|
+
* Abstract base for the concrete geometry classes ({@link LineGeometry}, {@link MeshGeometry}) that back a
|
|
934
|
+
* {@link Pacem3DMeshElement}'s `geometry` property, providing shared bounding-volume computation helpers.
|
|
935
|
+
*/
|
|
936
|
+
class NodeGeometry {
|
|
937
|
+
constructor(positions = []) {
|
|
938
|
+
this.positions = positions;
|
|
939
|
+
}
|
|
940
|
+
/** Computes the centroid (average) of the given positions. */
|
|
941
|
+
static barycenter(positions) {
|
|
942
|
+
var bary = { x: 0, y: 0, z: 0 };
|
|
943
|
+
if (!pacemCore.Utils.isNullOrEmpty(positions)) {
|
|
944
|
+
var count = positions.length;
|
|
945
|
+
for (var i = 0; i < positions.length; i++) {
|
|
946
|
+
var pt = positions[i];
|
|
947
|
+
bary.x += pt.x;
|
|
948
|
+
bary.y += pt.y;
|
|
949
|
+
bary.z += pt.z;
|
|
930
950
|
}
|
|
951
|
+
var countDbl = 1.0 * count;
|
|
952
|
+
bary.x /= countDbl;
|
|
953
|
+
bary.y /= countDbl;
|
|
954
|
+
bary.z /= countDbl;
|
|
931
955
|
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
addLine('misc', 'Max Render Buffer Size', getParam(ctx.MAX_RENDERBUFFER_SIZE));
|
|
951
|
-
addLine('misc', 'Max Viewport Dimensions', getParam(ctx.MAX_VIEWPORT_DIMS));
|
|
952
|
-
addLine('misc', 'Aliased Line Width Range', getParam(ctx.ALIASED_LINE_WIDTH_RANGE));
|
|
953
|
-
addLine('misc', 'Aliased Point Size Range', getParam(ctx.ALIASED_POINT_SIZE_RANGE));
|
|
954
|
-
addLine('misc', 'Supported Extensions', ctx.getSupportedExtensions() || []);
|
|
956
|
+
return bary;
|
|
957
|
+
}
|
|
958
|
+
/** Computes the axis-aligned {@link Box3D} enclosing the given positions. */
|
|
959
|
+
static boundingBox(positions) {
|
|
960
|
+
const output = {
|
|
961
|
+
minX: +Infinity, minY: +Infinity, minZ: +Infinity,
|
|
962
|
+
maxX: -Infinity, maxY: -Infinity, maxZ: -Infinity
|
|
963
|
+
};
|
|
964
|
+
if (!pacemCore.Utils.isNullOrEmpty(positions)) {
|
|
965
|
+
for (var i = 0; i < positions.length; i++) {
|
|
966
|
+
var pt = positions[i];
|
|
967
|
+
output.minX = Math.min(output.minX, pt.x);
|
|
968
|
+
output.minY = Math.min(output.minY, pt.y);
|
|
969
|
+
output.minZ = Math.min(output.minZ, pt.z);
|
|
970
|
+
output.maxX = Math.max(output.maxX, pt.x);
|
|
971
|
+
output.maxY = Math.max(output.maxY, pt.y);
|
|
972
|
+
output.maxZ = Math.max(output.maxZ, pt.z);
|
|
973
|
+
}
|
|
955
974
|
}
|
|
975
|
+
return output;
|
|
956
976
|
}
|
|
957
|
-
/**
|
|
958
|
-
|
|
959
|
-
|
|
977
|
+
/** Marks the geometry as stale, flagging it with {@link StalePropertyFlag.Geometry} for the next render. */
|
|
978
|
+
setAsDirty() {
|
|
979
|
+
setSelfAsDirty.call(this);
|
|
960
980
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
981
|
+
}
|
|
982
|
+
function setSelfAsDirty() {
|
|
983
|
+
const me = this;
|
|
984
|
+
me.flags = [/* no further specifications, other than 'geometry' */ StalePropertyFlag.Geometry];
|
|
985
|
+
}
|
|
986
|
+
/** A {@link NodeGeometry} rendered as a polyline through its {@link positions} (no faces/triangles). */
|
|
987
|
+
class LineGeometry extends NodeGeometry {
|
|
988
|
+
}
|
|
989
|
+
__decorate$j([
|
|
990
|
+
NotifyChange(setSelfAsDirty)
|
|
991
|
+
], LineGeometry.prototype, "positions", void 0);
|
|
992
|
+
/** A {@link MeshGeometry} implementation with lazily-computed {@link barycenter}/{@link boundingBox} and settable {@link boundingSphere}, used as the `geometry` of a {@link Pacem3DMeshElement}. */
|
|
993
|
+
class MeshGeometry extends NodeGeometry {
|
|
994
|
+
#boundingBox;
|
|
995
|
+
#boundingSphere;
|
|
996
|
+
#barycenter;
|
|
997
|
+
/** Gets or sets the centroid of {@link positions}; computed on first access if not explicitly set. */
|
|
998
|
+
get barycenter() {
|
|
999
|
+
return this.#barycenter ??= NodeGeometry.barycenter(this.positions);
|
|
1000
|
+
}
|
|
1001
|
+
set barycenter(point) {
|
|
1002
|
+
this.#barycenter = point;
|
|
1003
|
+
}
|
|
1004
|
+
/** Gets or sets the axis-aligned bounding box; computed from {@link positions} on first access if not explicitly set. */
|
|
1005
|
+
get boundingBox() {
|
|
1006
|
+
return this.#boundingBox ??= NodeGeometry.boundingBox(this.positions);
|
|
1007
|
+
}
|
|
1008
|
+
set boundingBox(bbox) {
|
|
1009
|
+
this.#boundingBox = bbox;
|
|
1010
|
+
}
|
|
1011
|
+
/** Gets or sets the bounding sphere. */
|
|
1012
|
+
get boundingSphere() {
|
|
1013
|
+
return this.#boundingSphere;
|
|
1014
|
+
}
|
|
1015
|
+
set boundingSphere(sphere) {
|
|
1016
|
+
this.#boundingSphere = sphere;
|
|
1017
|
+
}
|
|
1018
|
+
constructor(positions, triangleIndices, textureCoordinates = [], normals = []) {
|
|
1019
|
+
super(positions);
|
|
1020
|
+
this.triangleIndices = triangleIndices;
|
|
1021
|
+
this.textureCoordinates = textureCoordinates;
|
|
1022
|
+
this.normals = normals;
|
|
964
1023
|
}
|
|
965
1024
|
}
|
|
1025
|
+
__decorate$j([
|
|
1026
|
+
NotifyChange(setSelfAsDirty)
|
|
1027
|
+
], MeshGeometry.prototype, "positions", void 0);
|
|
1028
|
+
__decorate$j([
|
|
1029
|
+
NotifyChange(setSelfAsDirty)
|
|
1030
|
+
], MeshGeometry.prototype, "triangleIndices", void 0);
|
|
1031
|
+
__decorate$j([
|
|
1032
|
+
NotifyChange(setSelfAsDirty)
|
|
1033
|
+
], MeshGeometry.prototype, "textureCoordinates", void 0);
|
|
1034
|
+
__decorate$j([
|
|
1035
|
+
NotifyChange(setSelfAsDirty)
|
|
1036
|
+
], MeshGeometry.prototype, "normals", void 0);
|
|
966
1037
|
|
|
967
|
-
var __decorate$
|
|
1038
|
+
var __decorate$i = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
968
1039
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
969
1040
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
970
1041
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1054,50 +1125,280 @@
|
|
|
1054
1125
|
}
|
|
1055
1126
|
}
|
|
1056
1127
|
}
|
|
1057
|
-
viewActivatedCallback() {
|
|
1058
|
-
super.viewActivatedCallback();
|
|
1059
|
-
this.updateMaterial();
|
|
1060
|
-
}
|
|
1061
|
-
/** Recomputes {@link material} via {@link createMaterial}, flagging it as {@link StalePropertyFlag.Material}. */
|
|
1062
|
-
updateMaterial() {
|
|
1063
|
-
this.createMaterial().then(m => {
|
|
1064
|
-
this.material = pacemCore.Utils.extend(m, { flags: [StalePropertyFlag.Material] });
|
|
1065
|
-
});
|
|
1128
|
+
viewActivatedCallback() {
|
|
1129
|
+
super.viewActivatedCallback();
|
|
1130
|
+
this.updateMaterial();
|
|
1131
|
+
}
|
|
1132
|
+
/** Recomputes {@link material} via {@link createMaterial}, flagging it as {@link StalePropertyFlag.Material}. */
|
|
1133
|
+
updateMaterial() {
|
|
1134
|
+
this.createMaterial().then(m => {
|
|
1135
|
+
this.material = pacemCore.Utils.extend(m, { flags: [StalePropertyFlag.Material] });
|
|
1136
|
+
});
|
|
1137
|
+
}
|
|
1138
|
+
/** Builds the base {@link Material} out of the shared watched attributes (`opacity`, `wireframe`, `color`, `hide`, `map`); overridden by subclasses to add their shader-specific properties. */
|
|
1139
|
+
async createMaterial() {
|
|
1140
|
+
return {
|
|
1141
|
+
opacity: this.opacity ?? 1.0,
|
|
1142
|
+
wireframe: this.wireframe ?? false,
|
|
1143
|
+
color: this.color || pacemCore.Utils.Css.getVariableValue(`--${pacemCore.PCSS}-color-primary`),
|
|
1144
|
+
visible: !(this.hide ?? false),
|
|
1145
|
+
map: this.map,
|
|
1146
|
+
texture: await this._loadMap(this.map),
|
|
1147
|
+
shader: this.shader,
|
|
1148
|
+
flags: [],
|
|
1149
|
+
};
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
__decorate$i([
|
|
1153
|
+
pacemCore.Watch()
|
|
1154
|
+
], MaterialElement.prototype, "material", void 0);
|
|
1155
|
+
__decorate$i([
|
|
1156
|
+
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1157
|
+
], MaterialElement.prototype, "opacity", void 0);
|
|
1158
|
+
__decorate$i([
|
|
1159
|
+
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1160
|
+
], MaterialElement.prototype, "wireframe", void 0);
|
|
1161
|
+
__decorate$i([
|
|
1162
|
+
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1163
|
+
], MaterialElement.prototype, "color", void 0);
|
|
1164
|
+
__decorate$i([
|
|
1165
|
+
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1166
|
+
], MaterialElement.prototype, "hide", void 0);
|
|
1167
|
+
__decorate$i([
|
|
1168
|
+
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1169
|
+
], MaterialElement.prototype, "map", void 0);
|
|
1170
|
+
|
|
1171
|
+
var __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1172
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1173
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1174
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1175
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1176
|
+
};
|
|
1177
|
+
//namespace Pacem.Drawing3D {
|
|
1178
|
+
/** Parses the text content of a Wavefront `.obj` file into a {@link MeshGeometry} (vertices, triangle indices, UVs and normals). */
|
|
1179
|
+
class OBJParser {
|
|
1180
|
+
/**
|
|
1181
|
+
* Parses `v` (vertex), `vt` (texture coordinate), `vn` (normal) and `f` (face) records out of `content`,
|
|
1182
|
+
* triangulating any face with more than 3 vertices (fan triangulation).
|
|
1183
|
+
*/
|
|
1184
|
+
static parse(content) {
|
|
1185
|
+
// vertices
|
|
1186
|
+
const vertices = [];
|
|
1187
|
+
const vParser = /^v((\s+-?[\d\.]+){3})/gm;
|
|
1188
|
+
let arr = vParser.exec(content);
|
|
1189
|
+
while (arr && arr.length) {
|
|
1190
|
+
vertices.push(Point3DConverter.convert(arr[1]));
|
|
1191
|
+
arr = vParser.exec(content);
|
|
1192
|
+
}
|
|
1193
|
+
// uvmap
|
|
1194
|
+
const vt = [];
|
|
1195
|
+
const tParser = /^vt((\s+-?[\d\.]+){2})/gm;
|
|
1196
|
+
arr = tParser.exec(content);
|
|
1197
|
+
while (arr && arr.length) {
|
|
1198
|
+
vt.push(pacemFoundation.Point.parse(arr[1]));
|
|
1199
|
+
arr = tParser.exec(content);
|
|
1200
|
+
}
|
|
1201
|
+
// normals
|
|
1202
|
+
const vn = [];
|
|
1203
|
+
const nParser = /^vn((\s+-?[\d\.]+){3})/gm;
|
|
1204
|
+
arr = nParser.exec(content);
|
|
1205
|
+
while (arr && arr.length) {
|
|
1206
|
+
vn.push(Point3DConverter.convert(arr[1]));
|
|
1207
|
+
arr = nParser.exec(content);
|
|
1208
|
+
}
|
|
1209
|
+
const normals = [];
|
|
1210
|
+
const uv = [];
|
|
1211
|
+
const positions = [];
|
|
1212
|
+
const fParser = /^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;
|
|
1213
|
+
arr = fParser.exec(content);
|
|
1214
|
+
while (arr && arr.length) {
|
|
1215
|
+
const fjParser = /([\d]+)\/([\d]+)\/([\d]+)/g;
|
|
1216
|
+
const face = arr[1];
|
|
1217
|
+
let jArr = fjParser.exec(face);
|
|
1218
|
+
let jIndex = 0;
|
|
1219
|
+
var vIndex0, tIndex0, nIndex0;
|
|
1220
|
+
var vIndex, tIndex, nIndex;
|
|
1221
|
+
while (jArr && jArr.length) {
|
|
1222
|
+
if (jIndex > 2) {
|
|
1223
|
+
// 4+ vertex-face
|
|
1224
|
+
// but mesh only allows triangluar faces
|
|
1225
|
+
// re-add(0)
|
|
1226
|
+
positions.push(vIndex0);
|
|
1227
|
+
uv.push(vt[tIndex0]);
|
|
1228
|
+
normals.push(vn[nIndex0]);
|
|
1229
|
+
// re-add(last)
|
|
1230
|
+
positions.push(vIndex);
|
|
1231
|
+
uv.push(vt[tIndex]);
|
|
1232
|
+
normals.push(vn[nIndex]);
|
|
1233
|
+
}
|
|
1234
|
+
// OBJ indexes are 1-based
|
|
1235
|
+
vIndex = parseInt(jArr[1]) - 1;
|
|
1236
|
+
tIndex = parseInt(jArr[2]) - 1;
|
|
1237
|
+
nIndex = parseInt(jArr[3]) - 1;
|
|
1238
|
+
positions.push(vIndex);
|
|
1239
|
+
uv.push(vt[tIndex]);
|
|
1240
|
+
normals.push(vn[nIndex]);
|
|
1241
|
+
if (jIndex === 0) {
|
|
1242
|
+
vIndex0 = vIndex;
|
|
1243
|
+
tIndex0 = tIndex;
|
|
1244
|
+
nIndex0 = nIndex;
|
|
1245
|
+
}
|
|
1246
|
+
jIndex++;
|
|
1247
|
+
jArr = fjParser.exec(face);
|
|
1248
|
+
}
|
|
1249
|
+
// loop
|
|
1250
|
+
arr = fParser.exec(content);
|
|
1251
|
+
}
|
|
1252
|
+
// faces
|
|
1253
|
+
return new MeshGeometry(vertices, positions, uv, normals);
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
/** Model-file parsing entry point, registered as the `parse3D` markup transformer for converting raw asset text into a {@link NodeGeometry} or {@link Material}. */
|
|
1257
|
+
class Parser3D {
|
|
1258
|
+
/**
|
|
1259
|
+
* Parses `content` according to `type` into a {@link NodeGeometry} (currently only the `'obj'` Wavefront format,
|
|
1260
|
+
* via {@link OBJParser}) or a {@link Material}. Throws for any other/unsupported `type` (e.g. `'mtl'`, not yet implemented).
|
|
1261
|
+
*/
|
|
1262
|
+
static parseGeometry(content, type) {
|
|
1263
|
+
switch (type.toLowerCase()) {
|
|
1264
|
+
case 'obj':
|
|
1265
|
+
return OBJParser.parse(content);
|
|
1266
|
+
default:
|
|
1267
|
+
throw new Error(`Type '${type}' is not supported.`);
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
__decorate$h([
|
|
1272
|
+
pacemCore.Transformer('parse3D')
|
|
1273
|
+
], Parser3D, "parseGeometry", null);
|
|
1274
|
+
|
|
1275
|
+
var indexDrawing3d = /*#__PURE__*/Object.freeze({
|
|
1276
|
+
__proto__: null,
|
|
1277
|
+
BooleanOrNumberConverter: BooleanOrNumberConverter,
|
|
1278
|
+
DragEvent: DragEvent,
|
|
1279
|
+
get KnownShader () { return KnownShader; },
|
|
1280
|
+
LineGeometry: LineGeometry,
|
|
1281
|
+
MaterialElement: MaterialElement,
|
|
1282
|
+
MeshGeometry: MeshGeometry,
|
|
1283
|
+
NodeGeometry: NodeGeometry,
|
|
1284
|
+
NotifyChange: NotifyChange,
|
|
1285
|
+
Pacem3DAdapterElement: Pacem3DAdapterElement,
|
|
1286
|
+
Pacem3DCameraElement: Pacem3DCameraElement,
|
|
1287
|
+
get Pacem3DGroupElement () { return Pacem3DGroupElement; },
|
|
1288
|
+
get Pacem3DLightElement () { return Pacem3DLightElement; },
|
|
1289
|
+
get Pacem3DMeshElement () { return Pacem3DMeshElement; },
|
|
1290
|
+
get Pacem3DObjectElement () { return Pacem3DObjectElement; },
|
|
1291
|
+
get Pacem3DOrthographicCameraElement () { return Pacem3DOrthographicCameraElement; },
|
|
1292
|
+
get Pacem3DPerspectiveCameraElement () { return Pacem3DPerspectiveCameraElement; },
|
|
1293
|
+
Point3DConverter: Point3DConverter,
|
|
1294
|
+
Point3DOrNumberConverter: Point3DOrNumberConverter,
|
|
1295
|
+
QuaternionConverter: QuaternionConverter,
|
|
1296
|
+
RenderableElement: RenderableElement,
|
|
1297
|
+
RenderableEvent: RenderableEvent,
|
|
1298
|
+
get StalePropertyFlag () { return StalePropertyFlag; },
|
|
1299
|
+
UI3DEvent: UI3DEvent,
|
|
1300
|
+
Ui3DElement: Ui3DElement,
|
|
1301
|
+
computePlaneNormal: computePlaneNormal,
|
|
1302
|
+
computeSharpVertexNormals: computeSharpVertexNormals,
|
|
1303
|
+
isBasicMaterial: isBasicMaterial,
|
|
1304
|
+
isCamera: isCamera,
|
|
1305
|
+
isGeometry: isGeometry,
|
|
1306
|
+
isGroup: isGroup,
|
|
1307
|
+
isInteraction: isInteraction,
|
|
1308
|
+
isLambertMaterial: isLambertMaterial,
|
|
1309
|
+
isLight: isLight,
|
|
1310
|
+
isLineMaterial: isLineMaterial,
|
|
1311
|
+
isMaterial: isMaterial,
|
|
1312
|
+
isMesh: isMesh,
|
|
1313
|
+
isMeshGeometry: isMeshGeometry,
|
|
1314
|
+
isOrthographicCamera: isOrthographicCamera,
|
|
1315
|
+
isPerspectiveCamera: isPerspectiveCamera,
|
|
1316
|
+
isPhongMaterial: isPhongMaterial,
|
|
1317
|
+
isRenderable: isRenderable,
|
|
1318
|
+
isShaderMaterial: isShaderMaterial,
|
|
1319
|
+
isStage: isStage,
|
|
1320
|
+
isStandardMaterial: isStandardMaterial,
|
|
1321
|
+
isUi3DObject: isUi3DObject
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
//namespace Pacem.Components.Drawing3D {
|
|
1325
|
+
/** @deprecated*/
|
|
1326
|
+
class Pacem3DDetector {
|
|
1327
|
+
/** Probes the browser for WebGL support by attempting to create a rendering context, populating {@link info} and {@link supported}. */
|
|
1328
|
+
constructor() {
|
|
1329
|
+
this._detected = {
|
|
1330
|
+
supported: false, info: {}
|
|
1331
|
+
};
|
|
1332
|
+
let cvs = document.createElement('canvas');
|
|
1333
|
+
let contextNames = ['webgl', 'experimental-webgl', 'moz-webgl', 'webkit-3d'];
|
|
1334
|
+
let ctx;
|
|
1335
|
+
let getParam = function (str) {
|
|
1336
|
+
if (!str)
|
|
1337
|
+
return undefined;
|
|
1338
|
+
return ctx.getParameter(str);
|
|
1339
|
+
};
|
|
1340
|
+
// addLine
|
|
1341
|
+
let addLine = (section, name, value) => {
|
|
1342
|
+
let detected = this._detected;
|
|
1343
|
+
var info = detected.info[section] = detected.info[section] || {};
|
|
1344
|
+
name = name.replace(/[^\w]+/g, '');
|
|
1345
|
+
name = name.substring(0, 1).toLowerCase() + name.substring(1);
|
|
1346
|
+
info[name] = value;
|
|
1347
|
+
};
|
|
1348
|
+
if (navigator.userAgent.indexOf('MSIE') >= 0) {
|
|
1349
|
+
try {
|
|
1350
|
+
ctx = window['WebGLHelper'].CreateGLContext(cvs, 'canvas');
|
|
1351
|
+
}
|
|
1352
|
+
catch (e) { }
|
|
1353
|
+
}
|
|
1354
|
+
else {
|
|
1355
|
+
for (var i = 0; i < contextNames.length; i++) {
|
|
1356
|
+
try {
|
|
1357
|
+
ctx = cvs.getContext(contextNames[i]);
|
|
1358
|
+
if (ctx) {
|
|
1359
|
+
addLine('main', 'Context Name', contextNames[i]);
|
|
1360
|
+
break;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
catch (e) { }
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
this._detected.supported = !!ctx;
|
|
1367
|
+
addLine('main', 'Platform', navigator.platform);
|
|
1368
|
+
addLine('main', 'Agent', navigator.userAgent);
|
|
1369
|
+
if (ctx) {
|
|
1370
|
+
addLine('main', 'Vendor', getParam(ctx.VENDOR));
|
|
1371
|
+
addLine('main', 'Version', getParam(ctx.VERSION));
|
|
1372
|
+
addLine('main', 'Renderer', getParam(ctx.RENDERER));
|
|
1373
|
+
addLine('main', 'Shading Language Version', getParam(ctx.SHADING_LANGUAGE_VERSION));
|
|
1374
|
+
addLine('bits', 'Rgba Bits', getParam(ctx.RED_BITS) + ', ' + getParam(ctx.GREEN_BITS) + ', ' + getParam(ctx.BLUE_BITS) + ', ' + getParam(ctx.ALPHA_BITS));
|
|
1375
|
+
addLine('bits', 'Depth Bits', getParam(ctx.DEPTH_BITS));
|
|
1376
|
+
addLine('shader', 'Max Vertex Attribs', getParam(ctx.MAX_VERTEX_ATTRIBS));
|
|
1377
|
+
addLine('shader', 'Max Vertex Texture Image Units', getParam(ctx.MAX_VERTEX_TEXTURE_IMAGE_UNITS));
|
|
1378
|
+
addLine('shader', 'Max Varying Vectors', getParam(ctx.MAX_VARYING_VECTORS));
|
|
1379
|
+
addLine('shader', 'Max Uniform Vectors', getParam(ctx.MAX_VERTEX_UNIFORM_VECTORS));
|
|
1380
|
+
addLine('tex', 'Max Combined Texture Image Units', getParam(ctx.MAX_COMBINED_TEXTURE_IMAGE_UNITS));
|
|
1381
|
+
addLine('tex', 'Max Texture Size', getParam(ctx.MAX_TEXTURE_SIZE));
|
|
1382
|
+
addLine('tex', 'Max Cube Map Texture Size', getParam(ctx.MAX_CUBE_MAP_TEXTURE_SIZE));
|
|
1383
|
+
addLine('tex', 'Num. Compressed Texture Formats', getParam(ctx.COMPRESSED_TEXTURE_FORMATS));
|
|
1384
|
+
addLine('misc', 'Max Render Buffer Size', getParam(ctx.MAX_RENDERBUFFER_SIZE));
|
|
1385
|
+
addLine('misc', 'Max Viewport Dimensions', getParam(ctx.MAX_VIEWPORT_DIMS));
|
|
1386
|
+
addLine('misc', 'Aliased Line Width Range', getParam(ctx.ALIASED_LINE_WIDTH_RANGE));
|
|
1387
|
+
addLine('misc', 'Aliased Point Size Range', getParam(ctx.ALIASED_POINT_SIZE_RANGE));
|
|
1388
|
+
addLine('misc', 'Supported Extensions', ctx.getSupportedExtensions() || []);
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
/** @readonly Gets the detected WebGL capabilities/limits, grouped by section (`main`, `bits`, `shader`, `tex`, `misc`). */
|
|
1392
|
+
get info() {
|
|
1393
|
+
return this._detected.info;
|
|
1066
1394
|
}
|
|
1067
|
-
/**
|
|
1068
|
-
|
|
1069
|
-
return
|
|
1070
|
-
opacity: this.opacity ?? 1.0,
|
|
1071
|
-
wireframe: this.wireframe ?? false,
|
|
1072
|
-
color: this.color || pacemCore.Utils.Css.getVariableValue(`--${pacemCore.PCSS}-color-primary`),
|
|
1073
|
-
visible: !(this.hide ?? false),
|
|
1074
|
-
map: this.map,
|
|
1075
|
-
texture: await this._loadMap(this.map),
|
|
1076
|
-
shader: this.shader,
|
|
1077
|
-
flags: [],
|
|
1078
|
-
};
|
|
1395
|
+
/** @readonly Gets whether a WebGL rendering context could be created on this browser/device. */
|
|
1396
|
+
get supported() {
|
|
1397
|
+
return this._detected.supported;
|
|
1079
1398
|
}
|
|
1080
1399
|
}
|
|
1081
|
-
__decorate$j([
|
|
1082
|
-
pacemCore.Watch()
|
|
1083
|
-
], MaterialElement.prototype, "material", void 0);
|
|
1084
|
-
__decorate$j([
|
|
1085
|
-
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1086
|
-
], MaterialElement.prototype, "opacity", void 0);
|
|
1087
|
-
__decorate$j([
|
|
1088
|
-
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1089
|
-
], MaterialElement.prototype, "wireframe", void 0);
|
|
1090
|
-
__decorate$j([
|
|
1091
|
-
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1092
|
-
], MaterialElement.prototype, "color", void 0);
|
|
1093
|
-
__decorate$j([
|
|
1094
|
-
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1095
|
-
], MaterialElement.prototype, "hide", void 0);
|
|
1096
|
-
__decorate$j([
|
|
1097
|
-
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1098
|
-
], MaterialElement.prototype, "map", void 0);
|
|
1099
1400
|
|
|
1100
|
-
var __decorate$
|
|
1401
|
+
var __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1101
1402
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1102
1403
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1103
1404
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1110,11 +1411,11 @@
|
|
|
1110
1411
|
super(KnownShader.Basic);
|
|
1111
1412
|
}
|
|
1112
1413
|
};
|
|
1113
|
-
BasicMaterialElement = __decorate$
|
|
1414
|
+
BasicMaterialElement = __decorate$g([
|
|
1114
1415
|
pacemCore.CustomElement({ tagName: `${pacemCore.P}-${TAG_MIDDLE_NAME}-material-basic` })
|
|
1115
1416
|
], BasicMaterialElement);
|
|
1116
1417
|
|
|
1117
|
-
var __decorate$
|
|
1418
|
+
var __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1118
1419
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1119
1420
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1120
1421
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1147,20 +1448,20 @@
|
|
|
1147
1448
|
}
|
|
1148
1449
|
}
|
|
1149
1450
|
};
|
|
1150
|
-
__decorate$
|
|
1451
|
+
__decorate$f([
|
|
1151
1452
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1152
1453
|
], LambertMaterialElement.prototype, "emissiveColor", void 0);
|
|
1153
|
-
__decorate$
|
|
1454
|
+
__decorate$f([
|
|
1154
1455
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1155
1456
|
], LambertMaterialElement.prototype, "reflectivity", void 0);
|
|
1156
|
-
__decorate$
|
|
1457
|
+
__decorate$f([
|
|
1157
1458
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1158
1459
|
], LambertMaterialElement.prototype, "refractionRatio", void 0);
|
|
1159
|
-
LambertMaterialElement = __decorate$
|
|
1460
|
+
LambertMaterialElement = __decorate$f([
|
|
1160
1461
|
pacemCore.CustomElement({ tagName: `${pacemCore.P}-${TAG_MIDDLE_NAME}-material-lambert` })
|
|
1161
1462
|
], LambertMaterialElement);
|
|
1162
1463
|
|
|
1163
|
-
var __decorate$
|
|
1464
|
+
var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1164
1465
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1165
1466
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1166
1467
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1195,16 +1496,16 @@
|
|
|
1195
1496
|
}, await super.createMaterial());
|
|
1196
1497
|
}
|
|
1197
1498
|
};
|
|
1198
|
-
__decorate$
|
|
1499
|
+
__decorate$e([
|
|
1199
1500
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1200
1501
|
], LineMaterialElement.prototype, "lineWidth", void 0);
|
|
1201
|
-
__decorate$
|
|
1502
|
+
__decorate$e([
|
|
1202
1503
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1203
1504
|
], LineMaterialElement.prototype, "lineJoin", void 0);
|
|
1204
|
-
__decorate$
|
|
1505
|
+
__decorate$e([
|
|
1205
1506
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1206
1507
|
], LineMaterialElement.prototype, "lineCap", void 0);
|
|
1207
|
-
__decorate$
|
|
1508
|
+
__decorate$e([
|
|
1208
1509
|
pacemCore.Watch({
|
|
1209
1510
|
emit: false, converter: {
|
|
1210
1511
|
convert: (attr) => attr?.split(',').map(i => parseInt(i)).filter(i => !Number.isNaN(i)),
|
|
@@ -1212,11 +1513,11 @@
|
|
|
1212
1513
|
}
|
|
1213
1514
|
})
|
|
1214
1515
|
], LineMaterialElement.prototype, "dashArray", void 0);
|
|
1215
|
-
LineMaterialElement = __decorate$
|
|
1516
|
+
LineMaterialElement = __decorate$e([
|
|
1216
1517
|
pacemCore.CustomElement({ tagName: `${pacemCore.P}-${TAG_MIDDLE_NAME}-material-line` })
|
|
1217
1518
|
], LineMaterialElement);
|
|
1218
1519
|
|
|
1219
|
-
var __decorate$
|
|
1520
|
+
var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1220
1521
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1221
1522
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1222
1523
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1255,29 +1556,29 @@
|
|
|
1255
1556
|
}
|
|
1256
1557
|
}
|
|
1257
1558
|
};
|
|
1258
|
-
__decorate$
|
|
1559
|
+
__decorate$d([
|
|
1259
1560
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1260
1561
|
], PhongMaterialElement.prototype, "emissiveColor", void 0);
|
|
1261
|
-
__decorate$
|
|
1562
|
+
__decorate$d([
|
|
1262
1563
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1263
1564
|
], PhongMaterialElement.prototype, "reflectivity", void 0);
|
|
1264
|
-
__decorate$
|
|
1565
|
+
__decorate$d([
|
|
1265
1566
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1266
1567
|
], PhongMaterialElement.prototype, "refractionRatio", void 0);
|
|
1267
|
-
__decorate$
|
|
1568
|
+
__decorate$d([
|
|
1268
1569
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1269
1570
|
], PhongMaterialElement.prototype, "specularColor", void 0);
|
|
1270
|
-
__decorate$
|
|
1571
|
+
__decorate$d([
|
|
1271
1572
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1272
1573
|
], PhongMaterialElement.prototype, "shininess", void 0);
|
|
1273
|
-
__decorate$
|
|
1574
|
+
__decorate$d([
|
|
1274
1575
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1275
1576
|
], PhongMaterialElement.prototype, "flatShading", void 0);
|
|
1276
|
-
PhongMaterialElement = __decorate$
|
|
1577
|
+
PhongMaterialElement = __decorate$d([
|
|
1277
1578
|
pacemCore.CustomElement({ tagName: `${pacemCore.P}-${TAG_MIDDLE_NAME}-material-phong` })
|
|
1278
1579
|
], PhongMaterialElement);
|
|
1279
1580
|
|
|
1280
|
-
var __decorate$
|
|
1581
|
+
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1281
1582
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1282
1583
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1283
1584
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1314,26 +1615,26 @@
|
|
|
1314
1615
|
}
|
|
1315
1616
|
}
|
|
1316
1617
|
};
|
|
1317
|
-
__decorate$
|
|
1618
|
+
__decorate$c([
|
|
1318
1619
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
1319
1620
|
], StandardMaterialElement.prototype, "emissiveColor", void 0);
|
|
1320
|
-
__decorate$
|
|
1621
|
+
__decorate$c([
|
|
1321
1622
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1322
1623
|
], StandardMaterialElement.prototype, "refractionRatio", void 0);
|
|
1323
|
-
__decorate$
|
|
1624
|
+
__decorate$c([
|
|
1324
1625
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1325
1626
|
], StandardMaterialElement.prototype, "roughness", void 0);
|
|
1326
|
-
__decorate$
|
|
1627
|
+
__decorate$c([
|
|
1327
1628
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1328
1629
|
], StandardMaterialElement.prototype, "metalness", void 0);
|
|
1329
|
-
__decorate$
|
|
1630
|
+
__decorate$c([
|
|
1330
1631
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
1331
1632
|
], StandardMaterialElement.prototype, "flatShading", void 0);
|
|
1332
|
-
StandardMaterialElement = __decorate$
|
|
1633
|
+
StandardMaterialElement = __decorate$c([
|
|
1333
1634
|
pacemCore.CustomElement({ tagName: `${pacemCore.P}-${TAG_MIDDLE_NAME}-material-standard` })
|
|
1334
1635
|
], StandardMaterialElement);
|
|
1335
1636
|
|
|
1336
|
-
var __decorate$
|
|
1637
|
+
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1337
1638
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1338
1639
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1339
1640
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1354,159 +1655,11 @@
|
|
|
1354
1655
|
}
|
|
1355
1656
|
}
|
|
1356
1657
|
}
|
|
1357
|
-
__decorate$
|
|
1658
|
+
__decorate$b([
|
|
1358
1659
|
pacemCore.Watch({ converter: pacemCore.PropertyConverters.Json })
|
|
1359
1660
|
], Pacem3DPrimitiveElement.prototype, "geometry", void 0);
|
|
1360
1661
|
|
|
1361
|
-
|
|
1362
|
-
/**
|
|
1363
|
-
* Property decorator factory that turns the decorated field into an accessor backed by a private field, invoking
|
|
1364
|
-
* `callback` with the property name and old/new values whenever it is set to a different value. Used by
|
|
1365
|
-
* {@link NodeGeometry}/{@link LineGeometry}/{@link MeshGeometry} to flag themselves as dirty ({@link StalePropertyFlag.Geometry})
|
|
1366
|
-
* whenever their vertex data changes.
|
|
1367
|
-
* @param callback Invoked (with `this` bound to the decorated instance) on every effective change of the property.
|
|
1368
|
-
*/
|
|
1369
|
-
function NotifyChange(callback) {
|
|
1370
|
-
return (target, prop, descriptor) => {
|
|
1371
|
-
const backingField = `_${prop}_${pacemCore.Utils.uniqueCode()}_backingField`;
|
|
1372
|
-
function getter() {
|
|
1373
|
-
return this[backingField];
|
|
1374
|
-
}
|
|
1375
|
-
function setter(val) {
|
|
1376
|
-
if (val !== this[backingField]) {
|
|
1377
|
-
const old = this[backingField];
|
|
1378
|
-
this[backingField] = val;
|
|
1379
|
-
callback.call(this, prop, old, val);
|
|
1380
|
-
}
|
|
1381
|
-
}
|
|
1382
|
-
//if (delete target[prop]) {
|
|
1383
|
-
Object.defineProperty(target, prop, {
|
|
1384
|
-
get: function () {
|
|
1385
|
-
return getter.call(this);
|
|
1386
|
-
},
|
|
1387
|
-
set: function (val) {
|
|
1388
|
-
setter.call(this, val);
|
|
1389
|
-
},
|
|
1390
|
-
enumerable: true,
|
|
1391
|
-
configurable: false
|
|
1392
|
-
});
|
|
1393
|
-
//}
|
|
1394
|
-
};
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
var __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1398
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1399
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1400
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1401
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1402
|
-
};
|
|
1403
|
-
/**
|
|
1404
|
-
* Abstract base for the concrete geometry classes ({@link LineGeometry}, {@link MeshGeometry}) that back a
|
|
1405
|
-
* {@link Pacem3DMeshElement}'s `geometry` property, providing shared bounding-volume computation helpers.
|
|
1406
|
-
*/
|
|
1407
|
-
class NodeGeometry {
|
|
1408
|
-
constructor(positions = []) {
|
|
1409
|
-
this.positions = positions;
|
|
1410
|
-
}
|
|
1411
|
-
/** Computes the centroid (average) of the given positions. */
|
|
1412
|
-
static barycenter(positions) {
|
|
1413
|
-
var bary = { x: 0, y: 0, z: 0 };
|
|
1414
|
-
if (!pacemCore.Utils.isNullOrEmpty(positions)) {
|
|
1415
|
-
var count = positions.length;
|
|
1416
|
-
for (var i = 0; i < positions.length; i++) {
|
|
1417
|
-
var pt = positions[i];
|
|
1418
|
-
bary.x += pt.x;
|
|
1419
|
-
bary.y += pt.y;
|
|
1420
|
-
bary.z += pt.z;
|
|
1421
|
-
}
|
|
1422
|
-
var countDbl = 1.0 * count;
|
|
1423
|
-
bary.x /= countDbl;
|
|
1424
|
-
bary.y /= countDbl;
|
|
1425
|
-
bary.z /= countDbl;
|
|
1426
|
-
}
|
|
1427
|
-
return bary;
|
|
1428
|
-
}
|
|
1429
|
-
/** Computes the axis-aligned {@link Box3D} enclosing the given positions. */
|
|
1430
|
-
static boundingBox(positions) {
|
|
1431
|
-
const output = {
|
|
1432
|
-
minX: +Infinity, minY: +Infinity, minZ: +Infinity,
|
|
1433
|
-
maxX: -Infinity, maxY: -Infinity, maxZ: -Infinity
|
|
1434
|
-
};
|
|
1435
|
-
if (!pacemCore.Utils.isNullOrEmpty(positions)) {
|
|
1436
|
-
for (var i = 0; i < positions.length; i++) {
|
|
1437
|
-
var pt = positions[i];
|
|
1438
|
-
output.minX = Math.min(output.minX, pt.x);
|
|
1439
|
-
output.minY = Math.min(output.minY, pt.y);
|
|
1440
|
-
output.minZ = Math.min(output.minZ, pt.z);
|
|
1441
|
-
output.maxX = Math.max(output.maxX, pt.x);
|
|
1442
|
-
output.maxY = Math.max(output.maxY, pt.y);
|
|
1443
|
-
output.maxZ = Math.max(output.maxZ, pt.z);
|
|
1444
|
-
}
|
|
1445
|
-
}
|
|
1446
|
-
return output;
|
|
1447
|
-
}
|
|
1448
|
-
/** Marks the geometry as stale, flagging it with {@link StalePropertyFlag.Geometry} for the next render. */
|
|
1449
|
-
setAsDirty() {
|
|
1450
|
-
setSelfAsDirty.call(this);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
function setSelfAsDirty() {
|
|
1454
|
-
const me = this;
|
|
1455
|
-
me.flags = [/* no further specifications, other than 'geometry' */ StalePropertyFlag.Geometry];
|
|
1456
|
-
}
|
|
1457
|
-
/** A {@link NodeGeometry} rendered as a polyline through its {@link positions} (no faces/triangles). */
|
|
1458
|
-
class LineGeometry extends NodeGeometry {
|
|
1459
|
-
}
|
|
1460
|
-
__decorate$c([
|
|
1461
|
-
NotifyChange(setSelfAsDirty)
|
|
1462
|
-
], LineGeometry.prototype, "positions", void 0);
|
|
1463
|
-
/** A {@link MeshGeometry} implementation with lazily-computed {@link barycenter}/{@link boundingBox} and settable {@link boundingSphere}, used as the `geometry` of a {@link Pacem3DMeshElement}. */
|
|
1464
|
-
class MeshGeometry extends NodeGeometry {
|
|
1465
|
-
#boundingBox;
|
|
1466
|
-
#boundingSphere;
|
|
1467
|
-
#barycenter;
|
|
1468
|
-
/** Gets or sets the centroid of {@link positions}; computed on first access if not explicitly set. */
|
|
1469
|
-
get barycenter() {
|
|
1470
|
-
return this.#barycenter ??= NodeGeometry.barycenter(this.positions);
|
|
1471
|
-
}
|
|
1472
|
-
set barycenter(point) {
|
|
1473
|
-
this.#barycenter = point;
|
|
1474
|
-
}
|
|
1475
|
-
/** Gets or sets the axis-aligned bounding box; computed from {@link positions} on first access if not explicitly set. */
|
|
1476
|
-
get boundingBox() {
|
|
1477
|
-
return this.#boundingBox ??= NodeGeometry.boundingBox(this.positions);
|
|
1478
|
-
}
|
|
1479
|
-
set boundingBox(bbox) {
|
|
1480
|
-
this.#boundingBox = bbox;
|
|
1481
|
-
}
|
|
1482
|
-
/** Gets or sets the bounding sphere. */
|
|
1483
|
-
get boundingSphere() {
|
|
1484
|
-
return this.#boundingSphere;
|
|
1485
|
-
}
|
|
1486
|
-
set boundingSphere(sphere) {
|
|
1487
|
-
this.#boundingSphere = sphere;
|
|
1488
|
-
}
|
|
1489
|
-
constructor(positions, triangleIndices, textureCoordinates = [], normals = []) {
|
|
1490
|
-
super(positions);
|
|
1491
|
-
this.triangleIndices = triangleIndices;
|
|
1492
|
-
this.textureCoordinates = textureCoordinates;
|
|
1493
|
-
this.normals = normals;
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
__decorate$c([
|
|
1497
|
-
NotifyChange(setSelfAsDirty)
|
|
1498
|
-
], MeshGeometry.prototype, "positions", void 0);
|
|
1499
|
-
__decorate$c([
|
|
1500
|
-
NotifyChange(setSelfAsDirty)
|
|
1501
|
-
], MeshGeometry.prototype, "triangleIndices", void 0);
|
|
1502
|
-
__decorate$c([
|
|
1503
|
-
NotifyChange(setSelfAsDirty)
|
|
1504
|
-
], MeshGeometry.prototype, "textureCoordinates", void 0);
|
|
1505
|
-
__decorate$c([
|
|
1506
|
-
NotifyChange(setSelfAsDirty)
|
|
1507
|
-
], MeshGeometry.prototype, "normals", void 0);
|
|
1508
|
-
|
|
1509
|
-
var __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1662
|
+
var __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1510
1663
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1511
1664
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1512
1665
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1708,29 +1861,29 @@
|
|
|
1708
1861
|
}
|
|
1709
1862
|
}
|
|
1710
1863
|
};
|
|
1711
|
-
__decorate$
|
|
1864
|
+
__decorate$a([
|
|
1712
1865
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1713
1866
|
], PacemBoxElement.prototype, "width", void 0);
|
|
1714
|
-
__decorate$
|
|
1867
|
+
__decorate$a([
|
|
1715
1868
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1716
1869
|
], PacemBoxElement.prototype, "height", void 0);
|
|
1717
|
-
__decorate$
|
|
1870
|
+
__decorate$a([
|
|
1718
1871
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1719
1872
|
], PacemBoxElement.prototype, "depth", void 0);
|
|
1720
|
-
__decorate$
|
|
1873
|
+
__decorate$a([
|
|
1721
1874
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1722
1875
|
], PacemBoxElement.prototype, "widthSegments", void 0);
|
|
1723
|
-
__decorate$
|
|
1876
|
+
__decorate$a([
|
|
1724
1877
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1725
1878
|
], PacemBoxElement.prototype, "heightSegments", void 0);
|
|
1726
|
-
__decorate$
|
|
1879
|
+
__decorate$a([
|
|
1727
1880
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1728
1881
|
], PacemBoxElement.prototype, "depthSegments", void 0);
|
|
1729
|
-
PacemBoxElement = PacemBoxElement_1 = __decorate$
|
|
1882
|
+
PacemBoxElement = PacemBoxElement_1 = __decorate$a([
|
|
1730
1883
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-box' })
|
|
1731
1884
|
], PacemBoxElement);
|
|
1732
1885
|
|
|
1733
|
-
var __decorate$
|
|
1886
|
+
var __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1734
1887
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1735
1888
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1736
1889
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -1868,26 +2021,26 @@
|
|
|
1868
2021
|
}
|
|
1869
2022
|
}
|
|
1870
2023
|
};
|
|
1871
|
-
__decorate$
|
|
2024
|
+
__decorate$9([
|
|
1872
2025
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1873
2026
|
], PacemConeElement.prototype, "radius", void 0);
|
|
1874
|
-
__decorate$
|
|
2027
|
+
__decorate$9([
|
|
1875
2028
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1876
2029
|
], PacemConeElement.prototype, "height", void 0);
|
|
1877
|
-
__decorate$
|
|
2030
|
+
__decorate$9([
|
|
1878
2031
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1879
2032
|
], PacemConeElement.prototype, "sides", void 0);
|
|
1880
|
-
__decorate$
|
|
2033
|
+
__decorate$9([
|
|
1881
2034
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1882
2035
|
], PacemConeElement.prototype, "heightSegments", void 0);
|
|
1883
|
-
__decorate$
|
|
2036
|
+
__decorate$9([
|
|
1884
2037
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
1885
2038
|
], PacemConeElement.prototype, "capSegments", void 0);
|
|
1886
|
-
PacemConeElement = PacemConeElement_1 = __decorate$
|
|
2039
|
+
PacemConeElement = PacemConeElement_1 = __decorate$9([
|
|
1887
2040
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-cone' })
|
|
1888
2041
|
], PacemConeElement);
|
|
1889
2042
|
|
|
1890
|
-
var __decorate$
|
|
2043
|
+
var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
1891
2044
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1892
2045
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1893
2046
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2071,26 +2224,26 @@
|
|
|
2071
2224
|
}
|
|
2072
2225
|
}
|
|
2073
2226
|
};
|
|
2074
|
-
__decorate$
|
|
2227
|
+
__decorate$8([
|
|
2075
2228
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2076
2229
|
], PacemCylinderElement.prototype, "radius", void 0);
|
|
2077
|
-
__decorate$
|
|
2230
|
+
__decorate$8([
|
|
2078
2231
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2079
2232
|
], PacemCylinderElement.prototype, "height", void 0);
|
|
2080
|
-
__decorate$
|
|
2233
|
+
__decorate$8([
|
|
2081
2234
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2082
2235
|
], PacemCylinderElement.prototype, "sides", void 0);
|
|
2083
|
-
__decorate$
|
|
2236
|
+
__decorate$8([
|
|
2084
2237
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2085
2238
|
], PacemCylinderElement.prototype, "heightSegments", void 0);
|
|
2086
|
-
__decorate$
|
|
2239
|
+
__decorate$8([
|
|
2087
2240
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2088
2241
|
], PacemCylinderElement.prototype, "capSegments", void 0);
|
|
2089
|
-
PacemCylinderElement = PacemCylinderElement_1 = __decorate$
|
|
2242
|
+
PacemCylinderElement = PacemCylinderElement_1 = __decorate$8([
|
|
2090
2243
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-cylinder' })
|
|
2091
2244
|
], PacemCylinderElement);
|
|
2092
2245
|
|
|
2093
|
-
var __decorate$
|
|
2246
|
+
var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2094
2247
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2095
2248
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2096
2249
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2118,14 +2271,14 @@
|
|
|
2118
2271
|
}
|
|
2119
2272
|
}
|
|
2120
2273
|
};
|
|
2121
|
-
__decorate$
|
|
2274
|
+
__decorate$7([
|
|
2122
2275
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Json })
|
|
2123
2276
|
], PacemLineElement.prototype, "positions", void 0);
|
|
2124
|
-
PacemLineElement = PacemLineElement_1 = __decorate$
|
|
2277
|
+
PacemLineElement = PacemLineElement_1 = __decorate$7([
|
|
2125
2278
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-line' })
|
|
2126
2279
|
], PacemLineElement);
|
|
2127
2280
|
|
|
2128
|
-
var __decorate$
|
|
2281
|
+
var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2129
2282
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2130
2283
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2131
2284
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2196,23 +2349,23 @@
|
|
|
2196
2349
|
}
|
|
2197
2350
|
}
|
|
2198
2351
|
};
|
|
2199
|
-
__decorate$
|
|
2352
|
+
__decorate$6([
|
|
2200
2353
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2201
2354
|
], PacemPlaneElement.prototype, "width", void 0);
|
|
2202
|
-
__decorate$
|
|
2355
|
+
__decorate$6([
|
|
2203
2356
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2204
2357
|
], PacemPlaneElement.prototype, "length", void 0);
|
|
2205
|
-
__decorate$
|
|
2358
|
+
__decorate$6([
|
|
2206
2359
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2207
2360
|
], PacemPlaneElement.prototype, "widthSegments", void 0);
|
|
2208
|
-
__decorate$
|
|
2361
|
+
__decorate$6([
|
|
2209
2362
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2210
2363
|
], PacemPlaneElement.prototype, "lengthSegments", void 0);
|
|
2211
|
-
PacemPlaneElement = PacemPlaneElement_1 = __decorate$
|
|
2364
|
+
PacemPlaneElement = PacemPlaneElement_1 = __decorate$6([
|
|
2212
2365
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-plane' })
|
|
2213
2366
|
], PacemPlaneElement);
|
|
2214
2367
|
|
|
2215
|
-
var __decorate$
|
|
2368
|
+
var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2216
2369
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2217
2370
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2218
2371
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2257,7 +2410,7 @@
|
|
|
2257
2410
|
return this.createMeshGeometry(1.0);
|
|
2258
2411
|
}
|
|
2259
2412
|
}
|
|
2260
|
-
__decorate$
|
|
2413
|
+
__decorate$5([
|
|
2261
2414
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2262
2415
|
], PolyhedronElement.prototype, "radius", void 0);
|
|
2263
2416
|
// #region Tetrahedron
|
|
@@ -2295,7 +2448,7 @@
|
|
|
2295
2448
|
return PacemTetrahedronElement_1.createMeshGeometry(radius);
|
|
2296
2449
|
}
|
|
2297
2450
|
};
|
|
2298
|
-
PacemTetrahedronElement = PacemTetrahedronElement_1 = __decorate$
|
|
2451
|
+
PacemTetrahedronElement = PacemTetrahedronElement_1 = __decorate$5([
|
|
2299
2452
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-tetrahedron' })
|
|
2300
2453
|
], PacemTetrahedronElement);
|
|
2301
2454
|
// #endregion
|
|
@@ -2336,7 +2489,7 @@
|
|
|
2336
2489
|
return PacemOctahedronElement_1.createMeshGeometry(radius);
|
|
2337
2490
|
}
|
|
2338
2491
|
};
|
|
2339
|
-
PacemOctahedronElement = PacemOctahedronElement_1 = __decorate$
|
|
2492
|
+
PacemOctahedronElement = PacemOctahedronElement_1 = __decorate$5([
|
|
2340
2493
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-octahedron' })
|
|
2341
2494
|
], PacemOctahedronElement);
|
|
2342
2495
|
// #endregion
|
|
@@ -2356,7 +2509,7 @@
|
|
|
2356
2509
|
return PacemHexahedronElement_1.createMeshGeometry(radius);
|
|
2357
2510
|
}
|
|
2358
2511
|
};
|
|
2359
|
-
PacemHexahedronElement = PacemHexahedronElement_1 = __decorate$
|
|
2512
|
+
PacemHexahedronElement = PacemHexahedronElement_1 = __decorate$5([
|
|
2360
2513
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-hexahedron' })
|
|
2361
2514
|
], PacemHexahedronElement);
|
|
2362
2515
|
// #endregion
|
|
@@ -2418,7 +2571,7 @@
|
|
|
2418
2571
|
return PacemIcosahedronElement_1.createMeshGeometry(radius);
|
|
2419
2572
|
}
|
|
2420
2573
|
};
|
|
2421
|
-
PacemIcosahedronElement = PacemIcosahedronElement_1 = __decorate$
|
|
2574
|
+
PacemIcosahedronElement = PacemIcosahedronElement_1 = __decorate$5([
|
|
2422
2575
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-icosahedron' })
|
|
2423
2576
|
], PacemIcosahedronElement);
|
|
2424
2577
|
// #endregion
|
|
@@ -2537,12 +2690,12 @@
|
|
|
2537
2690
|
return PacemDodecahedronElement_1.createMeshGeometry(radius);
|
|
2538
2691
|
}
|
|
2539
2692
|
};
|
|
2540
|
-
PacemDodecahedronElement = PacemDodecahedronElement_1 = __decorate$
|
|
2693
|
+
PacemDodecahedronElement = PacemDodecahedronElement_1 = __decorate$5([
|
|
2541
2694
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-dodecahedron' })
|
|
2542
2695
|
], PacemDodecahedronElement);
|
|
2543
2696
|
// #endregion
|
|
2544
2697
|
|
|
2545
|
-
var __decorate$
|
|
2698
|
+
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2546
2699
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2547
2700
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2548
2701
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2648,17 +2801,17 @@
|
|
|
2648
2801
|
}
|
|
2649
2802
|
}
|
|
2650
2803
|
};
|
|
2651
|
-
__decorate$
|
|
2804
|
+
__decorate$4([
|
|
2652
2805
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2653
2806
|
], PacemSphereElement.prototype, "radius", void 0);
|
|
2654
|
-
__decorate$
|
|
2807
|
+
__decorate$4([
|
|
2655
2808
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2656
2809
|
], PacemSphereElement.prototype, "segments", void 0);
|
|
2657
|
-
PacemSphereElement = PacemSphereElement_1 = __decorate$
|
|
2810
|
+
PacemSphereElement = PacemSphereElement_1 = __decorate$4([
|
|
2658
2811
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-sphere' })
|
|
2659
2812
|
], PacemSphereElement);
|
|
2660
2813
|
|
|
2661
|
-
var __decorate$
|
|
2814
|
+
var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2662
2815
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2663
2816
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2664
2817
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -2735,19 +2888,19 @@
|
|
|
2735
2888
|
}
|
|
2736
2889
|
}
|
|
2737
2890
|
};
|
|
2738
|
-
__decorate$
|
|
2891
|
+
__decorate$3([
|
|
2739
2892
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2740
2893
|
], PacemTorusElement.prototype, "radius", void 0);
|
|
2741
|
-
__decorate$
|
|
2894
|
+
__decorate$3([
|
|
2742
2895
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2743
2896
|
], PacemTorusElement.prototype, "innerRadius", void 0);
|
|
2744
|
-
__decorate$
|
|
2897
|
+
__decorate$3([
|
|
2745
2898
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2746
2899
|
], PacemTorusElement.prototype, "segments", void 0);
|
|
2747
|
-
__decorate$
|
|
2900
|
+
__decorate$3([
|
|
2748
2901
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
2749
2902
|
], PacemTorusElement.prototype, "sides", void 0);
|
|
2750
|
-
PacemTorusElement = PacemTorusElement_1 = __decorate$
|
|
2903
|
+
PacemTorusElement = PacemTorusElement_1 = __decorate$3([
|
|
2751
2904
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-primitive-torus' })
|
|
2752
2905
|
], PacemTorusElement);
|
|
2753
2906
|
|
|
@@ -2820,7 +2973,7 @@
|
|
|
2820
2973
|
}
|
|
2821
2974
|
}
|
|
2822
2975
|
|
|
2823
|
-
var __decorate$
|
|
2976
|
+
var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
2824
2977
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2825
2978
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2826
2979
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -3479,10 +3632,10 @@
|
|
|
3479
3632
|
}
|
|
3480
3633
|
}
|
|
3481
3634
|
};
|
|
3482
|
-
__decorate$
|
|
3635
|
+
__decorate$2([
|
|
3483
3636
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
3484
3637
|
], Pacem3DThreeAdapterElement.prototype, "orbit", void 0);
|
|
3485
|
-
Pacem3DThreeAdapterElement = __decorate$
|
|
3638
|
+
Pacem3DThreeAdapterElement = __decorate$2([
|
|
3486
3639
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-3d-three-adapter' })
|
|
3487
3640
|
], Pacem3DThreeAdapterElement);
|
|
3488
3641
|
|
|
@@ -7448,7 +7601,7 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
|
|
|
7448
7601
|
}
|
|
7449
7602
|
}
|
|
7450
7603
|
|
|
7451
|
-
var __decorate$
|
|
7604
|
+
var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7452
7605
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7453
7606
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7454
7607
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -7498,13 +7651,13 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
|
|
|
7498
7651
|
super.disconnectedCallback();
|
|
7499
7652
|
}
|
|
7500
7653
|
};
|
|
7501
|
-
__decorate$
|
|
7654
|
+
__decorate$1([
|
|
7502
7655
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
7503
7656
|
], Pacem3DWgslScriptElement.prototype, "type", void 0);
|
|
7504
|
-
__decorate$
|
|
7657
|
+
__decorate$1([
|
|
7505
7658
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.String })
|
|
7506
7659
|
], Pacem3DWgslScriptElement.prototype, "wgsl", void 0);
|
|
7507
|
-
Pacem3DWgslScriptElement = __decorate$
|
|
7660
|
+
Pacem3DWgslScriptElement = __decorate$1([
|
|
7508
7661
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-3d-wgsl-script' })
|
|
7509
7662
|
], Pacem3DWgslScriptElement);
|
|
7510
7663
|
/**
|
|
@@ -7757,20 +7910,20 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
|
|
|
7757
7910
|
return stage;
|
|
7758
7911
|
}
|
|
7759
7912
|
};
|
|
7760
|
-
__decorate$
|
|
7913
|
+
__decorate$1([
|
|
7761
7914
|
pacemCore.Debounce(100)
|
|
7762
7915
|
], Pacem3DWebgpuAdapterElement.prototype, "_parseWgslModifiers", null);
|
|
7763
|
-
__decorate$
|
|
7916
|
+
__decorate$1([
|
|
7764
7917
|
pacemCore.Watch({ emit: false })
|
|
7765
7918
|
], Pacem3DWebgpuAdapterElement.prototype, "modifiers", void 0);
|
|
7766
|
-
__decorate$
|
|
7919
|
+
__decorate$1([
|
|
7767
7920
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Boolean })
|
|
7768
7921
|
], Pacem3DWebgpuAdapterElement.prototype, "enableValidation", void 0);
|
|
7769
|
-
Pacem3DWebgpuAdapterElement = __decorate$
|
|
7922
|
+
Pacem3DWebgpuAdapterElement = __decorate$1([
|
|
7770
7923
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-3d-webgpu-adapter' })
|
|
7771
7924
|
], Pacem3DWebgpuAdapterElement);
|
|
7772
7925
|
|
|
7773
|
-
var __decorate
|
|
7926
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
7774
7927
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
7775
7928
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
7776
7929
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
@@ -8111,31 +8264,31 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
|
|
|
8111
8264
|
}
|
|
8112
8265
|
}
|
|
8113
8266
|
};
|
|
8114
|
-
__decorate
|
|
8267
|
+
__decorate([
|
|
8115
8268
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8116
8269
|
], PacemOrbitCameraBehaviorElement.prototype, "maxAzimuth", void 0);
|
|
8117
|
-
__decorate
|
|
8270
|
+
__decorate([
|
|
8118
8271
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8119
8272
|
], PacemOrbitCameraBehaviorElement.prototype, "maxPolar", void 0);
|
|
8120
|
-
__decorate
|
|
8273
|
+
__decorate([
|
|
8121
8274
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8122
8275
|
], PacemOrbitCameraBehaviorElement.prototype, "minAzimuth", void 0);
|
|
8123
|
-
__decorate
|
|
8276
|
+
__decorate([
|
|
8124
8277
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8125
8278
|
], PacemOrbitCameraBehaviorElement.prototype, "minPolar", void 0);
|
|
8126
|
-
__decorate
|
|
8279
|
+
__decorate([
|
|
8127
8280
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8128
8281
|
], PacemOrbitCameraBehaviorElement.prototype, "zoomControl", void 0);
|
|
8129
|
-
__decorate
|
|
8282
|
+
__decorate([
|
|
8130
8283
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8131
8284
|
], PacemOrbitCameraBehaviorElement.prototype, "rotationControl", void 0);
|
|
8132
|
-
__decorate
|
|
8285
|
+
__decorate([
|
|
8133
8286
|
pacemCore.Watch({ emit: false, converter: pacemCore.PropertyConverters.Number })
|
|
8134
8287
|
], PacemOrbitCameraBehaviorElement.prototype, "panControl", void 0);
|
|
8135
|
-
__decorate
|
|
8288
|
+
__decorate([
|
|
8136
8289
|
pacemCore.Watch({ emit: false, converter: BooleanOrNumberConverter })
|
|
8137
8290
|
], PacemOrbitCameraBehaviorElement.prototype, "inertia", void 0);
|
|
8138
|
-
PacemOrbitCameraBehaviorElement = __decorate
|
|
8291
|
+
PacemOrbitCameraBehaviorElement = __decorate([
|
|
8139
8292
|
pacemCore.CustomElement({ tagName: pacemCore.P + '-' + TAG_MIDDLE_NAME + '-orbit-camera' })
|
|
8140
8293
|
], PacemOrbitCameraBehaviorElement);
|
|
8141
8294
|
|
|
@@ -8212,159 +8365,6 @@ fn computeOffsetPosition(p0: vec4f, p1: vec4f, index: u32) -> vec4f {
|
|
|
8212
8365
|
Drawing3D: indexComponentsDrawing3d
|
|
8213
8366
|
});
|
|
8214
8367
|
|
|
8215
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
8216
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8217
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8218
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
8219
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8220
|
-
};
|
|
8221
|
-
//namespace Pacem.Drawing3D {
|
|
8222
|
-
/** Parses the text content of a Wavefront `.obj` file into a {@link MeshGeometry} (vertices, triangle indices, UVs and normals). */
|
|
8223
|
-
class OBJParser {
|
|
8224
|
-
/**
|
|
8225
|
-
* Parses `v` (vertex), `vt` (texture coordinate), `vn` (normal) and `f` (face) records out of `content`,
|
|
8226
|
-
* triangulating any face with more than 3 vertices (fan triangulation).
|
|
8227
|
-
*/
|
|
8228
|
-
static parse(content) {
|
|
8229
|
-
// vertices
|
|
8230
|
-
const vertices = [];
|
|
8231
|
-
const vParser = /^v((\s+-?[\d\.]+){3})/gm;
|
|
8232
|
-
let arr = vParser.exec(content);
|
|
8233
|
-
while (arr && arr.length) {
|
|
8234
|
-
vertices.push(Point3DConverter.convert(arr[1]));
|
|
8235
|
-
arr = vParser.exec(content);
|
|
8236
|
-
}
|
|
8237
|
-
// uvmap
|
|
8238
|
-
const vt = [];
|
|
8239
|
-
const tParser = /^vt((\s+-?[\d\.]+){2})/gm;
|
|
8240
|
-
arr = tParser.exec(content);
|
|
8241
|
-
while (arr && arr.length) {
|
|
8242
|
-
vt.push(pacemFoundation.Point.parse(arr[1]));
|
|
8243
|
-
arr = tParser.exec(content);
|
|
8244
|
-
}
|
|
8245
|
-
// normals
|
|
8246
|
-
const vn = [];
|
|
8247
|
-
const nParser = /^vn((\s+-?[\d\.]+){3})/gm;
|
|
8248
|
-
arr = nParser.exec(content);
|
|
8249
|
-
while (arr && arr.length) {
|
|
8250
|
-
vn.push(Point3DConverter.convert(arr[1]));
|
|
8251
|
-
arr = nParser.exec(content);
|
|
8252
|
-
}
|
|
8253
|
-
const normals = [];
|
|
8254
|
-
const uv = [];
|
|
8255
|
-
const positions = [];
|
|
8256
|
-
const fParser = /^f((\s+([\d]+\/[\d]+\/[\d]+)){3,})/gm;
|
|
8257
|
-
arr = fParser.exec(content);
|
|
8258
|
-
while (arr && arr.length) {
|
|
8259
|
-
const fjParser = /([\d]+)\/([\d]+)\/([\d]+)/g;
|
|
8260
|
-
const face = arr[1];
|
|
8261
|
-
let jArr = fjParser.exec(face);
|
|
8262
|
-
let jIndex = 0;
|
|
8263
|
-
var vIndex0, tIndex0, nIndex0;
|
|
8264
|
-
var vIndex, tIndex, nIndex;
|
|
8265
|
-
while (jArr && jArr.length) {
|
|
8266
|
-
if (jIndex > 2) {
|
|
8267
|
-
// 4+ vertex-face
|
|
8268
|
-
// but mesh only allows triangluar faces
|
|
8269
|
-
// re-add(0)
|
|
8270
|
-
positions.push(vIndex0);
|
|
8271
|
-
uv.push(vt[tIndex0]);
|
|
8272
|
-
normals.push(vn[nIndex0]);
|
|
8273
|
-
// re-add(last)
|
|
8274
|
-
positions.push(vIndex);
|
|
8275
|
-
uv.push(vt[tIndex]);
|
|
8276
|
-
normals.push(vn[nIndex]);
|
|
8277
|
-
}
|
|
8278
|
-
// OBJ indexes are 1-based
|
|
8279
|
-
vIndex = parseInt(jArr[1]) - 1;
|
|
8280
|
-
tIndex = parseInt(jArr[2]) - 1;
|
|
8281
|
-
nIndex = parseInt(jArr[3]) - 1;
|
|
8282
|
-
positions.push(vIndex);
|
|
8283
|
-
uv.push(vt[tIndex]);
|
|
8284
|
-
normals.push(vn[nIndex]);
|
|
8285
|
-
if (jIndex === 0) {
|
|
8286
|
-
vIndex0 = vIndex;
|
|
8287
|
-
tIndex0 = tIndex;
|
|
8288
|
-
nIndex0 = nIndex;
|
|
8289
|
-
}
|
|
8290
|
-
jIndex++;
|
|
8291
|
-
jArr = fjParser.exec(face);
|
|
8292
|
-
}
|
|
8293
|
-
// loop
|
|
8294
|
-
arr = fParser.exec(content);
|
|
8295
|
-
}
|
|
8296
|
-
// faces
|
|
8297
|
-
return new MeshGeometry(vertices, positions, uv, normals);
|
|
8298
|
-
}
|
|
8299
|
-
}
|
|
8300
|
-
/** Model-file parsing entry point, registered as the `parse3D` markup transformer for converting raw asset text into a {@link NodeGeometry} or {@link Material}. */
|
|
8301
|
-
class Parser3D {
|
|
8302
|
-
/**
|
|
8303
|
-
* Parses `content` according to `type` into a {@link NodeGeometry} (currently only the `'obj'` Wavefront format,
|
|
8304
|
-
* via {@link OBJParser}) or a {@link Material}. Throws for any other/unsupported `type` (e.g. `'mtl'`, not yet implemented).
|
|
8305
|
-
*/
|
|
8306
|
-
static parseGeometry(content, type) {
|
|
8307
|
-
switch (type.toLowerCase()) {
|
|
8308
|
-
case 'obj':
|
|
8309
|
-
return OBJParser.parse(content);
|
|
8310
|
-
default:
|
|
8311
|
-
throw new Error(`Type '${type}' is not supported.`);
|
|
8312
|
-
}
|
|
8313
|
-
}
|
|
8314
|
-
}
|
|
8315
|
-
__decorate([
|
|
8316
|
-
pacemCore.Transformer('parse3D')
|
|
8317
|
-
], Parser3D, "parseGeometry", null);
|
|
8318
|
-
|
|
8319
|
-
var indexDrawing3d = /*#__PURE__*/Object.freeze({
|
|
8320
|
-
__proto__: null,
|
|
8321
|
-
BooleanOrNumberConverter: BooleanOrNumberConverter,
|
|
8322
|
-
DragEvent: DragEvent,
|
|
8323
|
-
get KnownShader () { return KnownShader; },
|
|
8324
|
-
LineGeometry: LineGeometry,
|
|
8325
|
-
MaterialElement: MaterialElement,
|
|
8326
|
-
MeshGeometry: MeshGeometry,
|
|
8327
|
-
NodeGeometry: NodeGeometry,
|
|
8328
|
-
NotifyChange: NotifyChange,
|
|
8329
|
-
Pacem3DAdapterElement: Pacem3DAdapterElement,
|
|
8330
|
-
Pacem3DCameraElement: Pacem3DCameraElement,
|
|
8331
|
-
get Pacem3DGroupElement () { return Pacem3DGroupElement; },
|
|
8332
|
-
get Pacem3DLightElement () { return Pacem3DLightElement; },
|
|
8333
|
-
get Pacem3DMeshElement () { return Pacem3DMeshElement; },
|
|
8334
|
-
get Pacem3DObjectElement () { return Pacem3DObjectElement; },
|
|
8335
|
-
get Pacem3DOrthographicCameraElement () { return Pacem3DOrthographicCameraElement; },
|
|
8336
|
-
get Pacem3DPerspectiveCameraElement () { return Pacem3DPerspectiveCameraElement; },
|
|
8337
|
-
Point3DConverter: Point3DConverter,
|
|
8338
|
-
Point3DOrNumberConverter: Point3DOrNumberConverter,
|
|
8339
|
-
QuaternionConverter: QuaternionConverter,
|
|
8340
|
-
RenderableElement: RenderableElement,
|
|
8341
|
-
RenderableEvent: RenderableEvent,
|
|
8342
|
-
get StalePropertyFlag () { return StalePropertyFlag; },
|
|
8343
|
-
UI3DEvent: UI3DEvent,
|
|
8344
|
-
Ui3DElement: Ui3DElement,
|
|
8345
|
-
computePlaneNormal: computePlaneNormal,
|
|
8346
|
-
computeSharpVertexNormals: computeSharpVertexNormals,
|
|
8347
|
-
isBasicMaterial: isBasicMaterial,
|
|
8348
|
-
isCamera: isCamera,
|
|
8349
|
-
isGeometry: isGeometry,
|
|
8350
|
-
isGroup: isGroup,
|
|
8351
|
-
isInteraction: isInteraction,
|
|
8352
|
-
isLambertMaterial: isLambertMaterial,
|
|
8353
|
-
isLight: isLight,
|
|
8354
|
-
isLineMaterial: isLineMaterial,
|
|
8355
|
-
isMaterial: isMaterial,
|
|
8356
|
-
isMesh: isMesh,
|
|
8357
|
-
isMeshGeometry: isMeshGeometry,
|
|
8358
|
-
isOrthographicCamera: isOrthographicCamera,
|
|
8359
|
-
isPerspectiveCamera: isPerspectiveCamera,
|
|
8360
|
-
isPhongMaterial: isPhongMaterial,
|
|
8361
|
-
isRenderable: isRenderable,
|
|
8362
|
-
isShaderMaterial: isShaderMaterial,
|
|
8363
|
-
isStage: isStage,
|
|
8364
|
-
isStandardMaterial: isStandardMaterial,
|
|
8365
|
-
isUi3DObject: isUi3DObject
|
|
8366
|
-
});
|
|
8367
|
-
|
|
8368
8368
|
var Output = /*#__PURE__*/Object.freeze({
|
|
8369
8369
|
__proto__: null,
|
|
8370
8370
|
Components: indexComponents,
|