@relu-interactives/spatial-ecs 0.2.4 → 0.2.5
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/{System-BTyYvKVH.d.cts → System-CIiWteft.d.cts} +2 -2
- package/dist/{System-BTyYvKVH.d.ts → System-CIiWteft.d.ts} +2 -2
- package/dist/{Video-D2H5H-K3.d.cts → Video-ChVFs9Tl.d.cts} +139 -75
- package/dist/{Video-BWhbvVPg.d.ts → Video-DCMCLInA.d.ts} +139 -75
- package/dist/{chunk-XWIEEJ7Z.js → chunk-4A66FSFT.js} +128 -82
- package/dist/chunk-4A66FSFT.js.map +1 -0
- package/dist/{chunk-AYEF3X2P.js → chunk-CRP3W2GK.js} +3 -3
- package/dist/chunk-CRP3W2GK.js.map +1 -0
- package/dist/{chunk-MAWBTMCG.js → chunk-KRZLEPRI.js} +156 -88
- package/dist/chunk-KRZLEPRI.js.map +1 -0
- package/dist/{chunk-NFDTIYR4.js → chunk-NB6I5JJN.js} +17 -2
- package/dist/chunk-NB6I5JJN.js.map +1 -0
- package/dist/{chunk-P2YDX5DB.js → chunk-RXCUHGRB.js} +124 -5
- package/dist/chunk-RXCUHGRB.js.map +1 -0
- package/dist/components/index.cjs +161 -93
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/factories/index.cjs +217 -105
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +9 -3
- package/dist/factories/index.d.ts +9 -3
- package/dist/factories/index.js +3 -3
- package/dist/{index-KdEzEZox.d.cts → index-D1I5L7bA.d.cts} +8 -3
- package/dist/{index-Dm6zF1MY.d.ts → index-DGZDgt3p.d.ts} +8 -3
- package/dist/index.cjs +468 -179
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +51 -12
- package/dist/index.js.map +1 -1
- package/dist/systems/index.cjs +248 -63
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +15 -3
- package/dist/systems/index.d.ts +15 -3
- package/dist/systems/index.js +3 -3
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/worldSnapshotUtils.cjs +15 -0
- package/dist/worldSnapshotUtils.cjs.map +1 -1
- package/dist/worldSnapshotUtils.d.cts +1 -1
- package/dist/worldSnapshotUtils.d.ts +1 -1
- package/dist/worldSnapshotUtils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AYEF3X2P.js.map +0 -1
- package/dist/chunk-MAWBTMCG.js.map +0 -1
- package/dist/chunk-NFDTIYR4.js.map +0 -1
- package/dist/chunk-P2YDX5DB.js.map +0 -1
- package/dist/chunk-XWIEEJ7Z.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __export, __name, Component } from './chunk-OY7ZODZP.js';
|
|
2
|
-
import * as
|
|
2
|
+
import * as THREE5 from 'three';
|
|
3
3
|
import { Vector3, Euler, Quaternion } from 'three';
|
|
4
4
|
|
|
5
5
|
// core/components/index.ts
|
|
@@ -10,6 +10,8 @@ __export(components_exports, {
|
|
|
10
10
|
CameraComponent: () => CameraComponent,
|
|
11
11
|
DEFAULT_COLLIDER_STATE: () => DEFAULT_COLLIDER_STATE,
|
|
12
12
|
DEFAULT_ENVIRONMENT_STATE: () => DEFAULT_ENVIRONMENT_STATE,
|
|
13
|
+
DEFAULT_INSTANCED_MESH_PARAMETERS: () => DEFAULT_INSTANCED_MESH_PARAMETERS,
|
|
14
|
+
DEFAULT_INSTANCE_TRANSFORM: () => DEFAULT_INSTANCE_TRANSFORM,
|
|
13
15
|
DEFAULT_MESH_GEOMETRY_PARAMETERS: () => DEFAULT_MESH_GEOMETRY_PARAMETERS,
|
|
14
16
|
DEFAULT_PHYSICS_STATE: () => DEFAULT_PHYSICS_STATE,
|
|
15
17
|
DEFAULT_POSTPROCESSING_STATE: () => DEFAULT_POSTPROCESSING_STATE,
|
|
@@ -19,6 +21,7 @@ __export(components_exports, {
|
|
|
19
21
|
ImageComponent: () => ImageComponent,
|
|
20
22
|
ImageTarget: () => ImageTarget,
|
|
21
23
|
ImageTargetAnchor: () => ImageTargetAnchor,
|
|
24
|
+
InstancedMeshComponent: () => InstancedMeshComponent,
|
|
22
25
|
LightComponent: () => LightComponent,
|
|
23
26
|
MaterialComponent: () => MaterialComponent,
|
|
24
27
|
MeshComponent: () => MeshComponent,
|
|
@@ -300,14 +303,14 @@ var _AnimationComponent = class _AnimationComponent extends Component {
|
|
|
300
303
|
return;
|
|
301
304
|
}
|
|
302
305
|
this.importedClips = clips.map((entry) => {
|
|
303
|
-
if (entry instanceof
|
|
306
|
+
if (entry instanceof THREE5.AnimationClip) {
|
|
304
307
|
return { clip: entry, sourceUrl: null };
|
|
305
308
|
}
|
|
306
309
|
if (!entry || typeof entry !== "object") {
|
|
307
310
|
return null;
|
|
308
311
|
}
|
|
309
312
|
const candidate = entry;
|
|
310
|
-
if (!(candidate.clip instanceof
|
|
313
|
+
if (!(candidate.clip instanceof THREE5.AnimationClip)) {
|
|
311
314
|
return null;
|
|
312
315
|
}
|
|
313
316
|
return {
|
|
@@ -441,7 +444,7 @@ var DEFAULT_ORTHO_TOP = 5;
|
|
|
441
444
|
var DEFAULT_ORTHO_BOTTOM = -5;
|
|
442
445
|
var DEFAULT_ZOOM = 1;
|
|
443
446
|
function inferProjection(camera) {
|
|
444
|
-
if (camera instanceof
|
|
447
|
+
if (camera instanceof THREE5.OrthographicCamera) {
|
|
445
448
|
return "orthographic";
|
|
446
449
|
}
|
|
447
450
|
return "perspective";
|
|
@@ -462,7 +465,7 @@ function readCameraFar(camera) {
|
|
|
462
465
|
}
|
|
463
466
|
__name(readCameraFar, "readCameraFar");
|
|
464
467
|
function inferFov(camera) {
|
|
465
|
-
if (camera instanceof
|
|
468
|
+
if (camera instanceof THREE5.PerspectiveCamera && Number.isFinite(camera.fov)) {
|
|
466
469
|
return camera.fov;
|
|
467
470
|
}
|
|
468
471
|
return DEFAULT_FOV;
|
|
@@ -485,28 +488,28 @@ function inferFar(camera) {
|
|
|
485
488
|
}
|
|
486
489
|
__name(inferFar, "inferFar");
|
|
487
490
|
function inferOrthoLeft(camera) {
|
|
488
|
-
if (camera instanceof
|
|
491
|
+
if (camera instanceof THREE5.OrthographicCamera && Number.isFinite(camera.left)) {
|
|
489
492
|
return camera.left;
|
|
490
493
|
}
|
|
491
494
|
return DEFAULT_ORTHO_LEFT;
|
|
492
495
|
}
|
|
493
496
|
__name(inferOrthoLeft, "inferOrthoLeft");
|
|
494
497
|
function inferOrthoRight(camera) {
|
|
495
|
-
if (camera instanceof
|
|
498
|
+
if (camera instanceof THREE5.OrthographicCamera && Number.isFinite(camera.right)) {
|
|
496
499
|
return camera.right;
|
|
497
500
|
}
|
|
498
501
|
return DEFAULT_ORTHO_RIGHT;
|
|
499
502
|
}
|
|
500
503
|
__name(inferOrthoRight, "inferOrthoRight");
|
|
501
504
|
function inferOrthoTop(camera) {
|
|
502
|
-
if (camera instanceof
|
|
505
|
+
if (camera instanceof THREE5.OrthographicCamera && Number.isFinite(camera.top)) {
|
|
503
506
|
return camera.top;
|
|
504
507
|
}
|
|
505
508
|
return DEFAULT_ORTHO_TOP;
|
|
506
509
|
}
|
|
507
510
|
__name(inferOrthoTop, "inferOrthoTop");
|
|
508
511
|
function inferOrthoBottom(camera) {
|
|
509
|
-
if (camera instanceof
|
|
512
|
+
if (camera instanceof THREE5.OrthographicCamera && Number.isFinite(camera.bottom)) {
|
|
510
513
|
return camera.bottom;
|
|
511
514
|
}
|
|
512
515
|
return DEFAULT_ORTHO_BOTTOM;
|
|
@@ -522,7 +525,7 @@ __name(inferZoom, "inferZoom");
|
|
|
522
525
|
var _CameraComponent = class _CameraComponent extends Component {
|
|
523
526
|
constructor(payload = {}) {
|
|
524
527
|
super();
|
|
525
|
-
this.camera = payload.camera ?? new
|
|
528
|
+
this.camera = payload.camera ?? new THREE5.PerspectiveCamera();
|
|
526
529
|
this.type = payload.type ?? "3d";
|
|
527
530
|
this.isDefault = typeof payload.isDefault === "boolean" ? payload.isDefault : false;
|
|
528
531
|
this.projection = payload.projection ?? inferProjection(payload.camera);
|
|
@@ -957,6 +960,135 @@ var _Postprocessing = class _Postprocessing extends Component {
|
|
|
957
960
|
};
|
|
958
961
|
__name(_Postprocessing, "Postprocessing");
|
|
959
962
|
var Postprocessing = _Postprocessing;
|
|
963
|
+
var DEFAULT_MESH_GEOMETRY_PARAMETERS = {
|
|
964
|
+
capsule: { radius: 0.5, height: 1 },
|
|
965
|
+
cube: { width: 1, height: 1, depth: 1 },
|
|
966
|
+
cylinder: { radius: 0.5, height: 1 },
|
|
967
|
+
model: {},
|
|
968
|
+
plane: { width: 100, height: 100 },
|
|
969
|
+
sphere: { radius: 0.5 }
|
|
970
|
+
};
|
|
971
|
+
var GEOMETRY_TYPE_BY_KIND = {
|
|
972
|
+
capsule: "CapsuleGeometry",
|
|
973
|
+
cube: "BoxGeometry",
|
|
974
|
+
cylinder: "CylinderGeometry",
|
|
975
|
+
model: "Model",
|
|
976
|
+
plane: "PlaneGeometry",
|
|
977
|
+
sphere: "SphereGeometry"
|
|
978
|
+
};
|
|
979
|
+
var _MeshGeometryComponent = class _MeshGeometryComponent extends Component {
|
|
980
|
+
constructor(kind, object, parameters, options) {
|
|
981
|
+
super();
|
|
982
|
+
this.kind = kind;
|
|
983
|
+
this.geometryType = GEOMETRY_TYPE_BY_KIND[kind];
|
|
984
|
+
this.object = object;
|
|
985
|
+
this.modelName = options?.modelName ?? "";
|
|
986
|
+
this.castShadow = options?.castShadow ?? false;
|
|
987
|
+
this.receiveShadow = options?.receiveShadow ?? false;
|
|
988
|
+
switch (kind) {
|
|
989
|
+
case "cube":
|
|
990
|
+
this.parameters = {
|
|
991
|
+
...DEFAULT_MESH_GEOMETRY_PARAMETERS.cube,
|
|
992
|
+
...parameters
|
|
993
|
+
};
|
|
994
|
+
break;
|
|
995
|
+
case "plane":
|
|
996
|
+
this.parameters = {
|
|
997
|
+
...DEFAULT_MESH_GEOMETRY_PARAMETERS.plane,
|
|
998
|
+
...parameters
|
|
999
|
+
};
|
|
1000
|
+
break;
|
|
1001
|
+
case "sphere":
|
|
1002
|
+
this.parameters = {
|
|
1003
|
+
...DEFAULT_MESH_GEOMETRY_PARAMETERS.sphere,
|
|
1004
|
+
...parameters
|
|
1005
|
+
};
|
|
1006
|
+
break;
|
|
1007
|
+
case "cylinder":
|
|
1008
|
+
this.parameters = {
|
|
1009
|
+
...DEFAULT_MESH_GEOMETRY_PARAMETERS.cylinder,
|
|
1010
|
+
...parameters
|
|
1011
|
+
};
|
|
1012
|
+
break;
|
|
1013
|
+
case "capsule":
|
|
1014
|
+
this.parameters = {
|
|
1015
|
+
...DEFAULT_MESH_GEOMETRY_PARAMETERS.capsule,
|
|
1016
|
+
...parameters
|
|
1017
|
+
};
|
|
1018
|
+
break;
|
|
1019
|
+
case "model":
|
|
1020
|
+
this.parameters = {};
|
|
1021
|
+
break;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
};
|
|
1025
|
+
__name(_MeshGeometryComponent, "MeshGeometryComponent");
|
|
1026
|
+
var MeshGeometryComponent = _MeshGeometryComponent;
|
|
1027
|
+
|
|
1028
|
+
// core/components/InstancedMesh.ts
|
|
1029
|
+
var DEFAULT_INSTANCE_TRANSFORM = {
|
|
1030
|
+
position: { x: 0, y: 0, z: 0 },
|
|
1031
|
+
rotation: { x: 0, y: 0, z: 0 },
|
|
1032
|
+
scale: { x: 1, y: 1, z: 1 }
|
|
1033
|
+
};
|
|
1034
|
+
var DEFAULT_INSTANCED_MESH_PARAMETERS = {
|
|
1035
|
+
capsule: DEFAULT_MESH_GEOMETRY_PARAMETERS.capsule,
|
|
1036
|
+
cube: DEFAULT_MESH_GEOMETRY_PARAMETERS.cube,
|
|
1037
|
+
cylinder: DEFAULT_MESH_GEOMETRY_PARAMETERS.cylinder,
|
|
1038
|
+
plane: DEFAULT_MESH_GEOMETRY_PARAMETERS.plane,
|
|
1039
|
+
sphere: DEFAULT_MESH_GEOMETRY_PARAMETERS.sphere
|
|
1040
|
+
};
|
|
1041
|
+
var _InstancedMeshComponent = class _InstancedMeshComponent extends Component {
|
|
1042
|
+
constructor(meshKind = "cube", meshParameters, options) {
|
|
1043
|
+
super();
|
|
1044
|
+
this.meshKind = meshKind;
|
|
1045
|
+
this.meshParameters = {
|
|
1046
|
+
...DEFAULT_INSTANCED_MESH_PARAMETERS[meshKind],
|
|
1047
|
+
...meshParameters ?? {}
|
|
1048
|
+
};
|
|
1049
|
+
this.castShadow = options?.castShadow ?? false;
|
|
1050
|
+
this.receiveShadow = options?.receiveShadow ?? false;
|
|
1051
|
+
this.instances = options?.instances && options.instances.length > 0 ? options.instances : [{ ...DEFAULT_INSTANCE_TRANSFORM }];
|
|
1052
|
+
this.instancedMesh = null;
|
|
1053
|
+
}
|
|
1054
|
+
/** Sanitize and return a copy of the current mesh parameters with valid values. */
|
|
1055
|
+
getSanitizedParameters() {
|
|
1056
|
+
const MIN_DIM = 0.01;
|
|
1057
|
+
const MIN_RAD = 1e-3;
|
|
1058
|
+
const sanitize = /* @__PURE__ */ __name((v, min) => Number.isFinite(v) ? Math.max(min, v) : min, "sanitize");
|
|
1059
|
+
switch (this.meshKind) {
|
|
1060
|
+
case "cube": {
|
|
1061
|
+
const p = this.meshParameters;
|
|
1062
|
+
return {
|
|
1063
|
+
width: sanitize(p.width, MIN_DIM),
|
|
1064
|
+
height: sanitize(p.height, MIN_DIM),
|
|
1065
|
+
depth: sanitize(p.depth, MIN_DIM)
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
case "plane": {
|
|
1069
|
+
const p = this.meshParameters;
|
|
1070
|
+
return {
|
|
1071
|
+
width: sanitize(p.width, MIN_DIM),
|
|
1072
|
+
height: sanitize(p.height, MIN_DIM)
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
case "sphere": {
|
|
1076
|
+
const p = this.meshParameters;
|
|
1077
|
+
return { radius: sanitize(p.radius, MIN_RAD) };
|
|
1078
|
+
}
|
|
1079
|
+
case "cylinder":
|
|
1080
|
+
case "capsule": {
|
|
1081
|
+
const p = this.meshParameters;
|
|
1082
|
+
return {
|
|
1083
|
+
radius: sanitize(p.radius, MIN_RAD),
|
|
1084
|
+
height: sanitize(p.height, MIN_DIM)
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
};
|
|
1090
|
+
__name(_InstancedMeshComponent, "InstancedMeshComponent");
|
|
1091
|
+
var InstancedMeshComponent = _InstancedMeshComponent;
|
|
960
1092
|
|
|
961
1093
|
// core/components/Physics.ts
|
|
962
1094
|
var DEFAULT_RIGIDBODY_STATE = {
|
|
@@ -1216,15 +1348,15 @@ function createValueState(light) {
|
|
|
1216
1348
|
castShadow: light.castShadow ?? false,
|
|
1217
1349
|
frustumCulling: light.frustumCulled
|
|
1218
1350
|
};
|
|
1219
|
-
if (light instanceof
|
|
1351
|
+
if (light instanceof THREE5.PointLight) {
|
|
1220
1352
|
base.distance = light.distance;
|
|
1221
1353
|
base.decay = light.decay;
|
|
1222
|
-
} else if (light instanceof
|
|
1354
|
+
} else if (light instanceof THREE5.SpotLight) {
|
|
1223
1355
|
base.distance = light.distance;
|
|
1224
1356
|
base.decay = light.decay;
|
|
1225
1357
|
base.angle = light.angle;
|
|
1226
1358
|
base.penumbra = light.penumbra;
|
|
1227
|
-
} else if (light instanceof
|
|
1359
|
+
} else if (light instanceof THREE5.RectAreaLight) {
|
|
1228
1360
|
base.width = light.width;
|
|
1229
1361
|
base.height = light.height;
|
|
1230
1362
|
}
|
|
@@ -1259,13 +1391,13 @@ function toHexColor2(value, fallback) {
|
|
|
1259
1391
|
}
|
|
1260
1392
|
__name(toHexColor2, "toHexColor");
|
|
1261
1393
|
function getMaterialType(material) {
|
|
1262
|
-
if (material instanceof
|
|
1394
|
+
if (material instanceof THREE5.MeshPhysicalMaterial) {
|
|
1263
1395
|
return "physical";
|
|
1264
1396
|
}
|
|
1265
|
-
if (material instanceof
|
|
1397
|
+
if (material instanceof THREE5.MeshPhongMaterial) {
|
|
1266
1398
|
return "phong";
|
|
1267
1399
|
}
|
|
1268
|
-
if (material instanceof
|
|
1400
|
+
if (material instanceof THREE5.MeshBasicMaterial) {
|
|
1269
1401
|
return "basic";
|
|
1270
1402
|
}
|
|
1271
1403
|
return "standard";
|
|
@@ -1284,8 +1416,8 @@ function createMaterialValue(material) {
|
|
|
1284
1416
|
opacity: typeof materialRecord.opacity === "number" ? materialRecord.opacity : 1,
|
|
1285
1417
|
emissive: toHexColor2(materialRecord.emissive, "#000000"),
|
|
1286
1418
|
emissiveIntensity: typeof materialRecord.emissiveIntensity === "number" ? materialRecord.emissiveIntensity : 0,
|
|
1287
|
-
side: typeof materialRecord.side === "number" ? materialRecord.side :
|
|
1288
|
-
blending: typeof materialRecord.blending === "number" ? materialRecord.blending :
|
|
1419
|
+
side: typeof materialRecord.side === "number" ? materialRecord.side : THREE5.FrontSide,
|
|
1420
|
+
blending: typeof materialRecord.blending === "number" ? materialRecord.blending : THREE5.NormalBlending,
|
|
1289
1421
|
depthTest: materialRecord.depthTest !== false,
|
|
1290
1422
|
depthWrite: materialRecord.depthWrite !== false,
|
|
1291
1423
|
wireframe: Boolean(materialRecord.wireframe),
|
|
@@ -1301,7 +1433,7 @@ function createMaterialValue(material) {
|
|
|
1301
1433
|
displacementMap: materialRecord.displacementMap?.image?.src,
|
|
1302
1434
|
lightMap: materialRecord.lightMap?.image?.src,
|
|
1303
1435
|
envMap: materialRecord.envMap?.image?.src,
|
|
1304
|
-
textureFiltering: map?.magFilter ===
|
|
1436
|
+
textureFiltering: map?.magFilter === THREE5.NearestFilter ? "sharp" : "smooth",
|
|
1305
1437
|
useMipmaps: map?.generateMipmaps !== false
|
|
1306
1438
|
};
|
|
1307
1439
|
}
|
|
@@ -1316,8 +1448,8 @@ function defaultMaterialValue() {
|
|
|
1316
1448
|
opacity: 1,
|
|
1317
1449
|
emissive: "#000000",
|
|
1318
1450
|
emissiveIntensity: 0,
|
|
1319
|
-
side:
|
|
1320
|
-
blending:
|
|
1451
|
+
side: THREE5.FrontSide,
|
|
1452
|
+
blending: THREE5.NormalBlending,
|
|
1321
1453
|
depthTest: true,
|
|
1322
1454
|
depthWrite: true,
|
|
1323
1455
|
wireframe: false,
|
|
@@ -1387,70 +1519,6 @@ var _MeshComponent = class _MeshComponent extends Component {
|
|
|
1387
1519
|
};
|
|
1388
1520
|
__name(_MeshComponent, "MeshComponent");
|
|
1389
1521
|
var MeshComponent = _MeshComponent;
|
|
1390
|
-
var DEFAULT_MESH_GEOMETRY_PARAMETERS = {
|
|
1391
|
-
capsule: { radius: 0.5, height: 1 },
|
|
1392
|
-
cube: { width: 1, height: 1, depth: 1 },
|
|
1393
|
-
cylinder: { radius: 0.5, height: 1 },
|
|
1394
|
-
model: {},
|
|
1395
|
-
plane: { width: 100, height: 100 },
|
|
1396
|
-
sphere: { radius: 0.5 }
|
|
1397
|
-
};
|
|
1398
|
-
var GEOMETRY_TYPE_BY_KIND = {
|
|
1399
|
-
capsule: "CapsuleGeometry",
|
|
1400
|
-
cube: "BoxGeometry",
|
|
1401
|
-
cylinder: "CylinderGeometry",
|
|
1402
|
-
model: "Model",
|
|
1403
|
-
plane: "PlaneGeometry",
|
|
1404
|
-
sphere: "SphereGeometry"
|
|
1405
|
-
};
|
|
1406
|
-
var _MeshGeometryComponent = class _MeshGeometryComponent extends Component {
|
|
1407
|
-
constructor(kind, object, parameters, options) {
|
|
1408
|
-
super();
|
|
1409
|
-
this.kind = kind;
|
|
1410
|
-
this.geometryType = GEOMETRY_TYPE_BY_KIND[kind];
|
|
1411
|
-
this.object = object;
|
|
1412
|
-
this.modelName = options?.modelName ?? "";
|
|
1413
|
-
this.castShadow = options?.castShadow ?? false;
|
|
1414
|
-
this.receiveShadow = options?.receiveShadow ?? false;
|
|
1415
|
-
switch (kind) {
|
|
1416
|
-
case "cube":
|
|
1417
|
-
this.parameters = {
|
|
1418
|
-
...DEFAULT_MESH_GEOMETRY_PARAMETERS.cube,
|
|
1419
|
-
...parameters
|
|
1420
|
-
};
|
|
1421
|
-
break;
|
|
1422
|
-
case "plane":
|
|
1423
|
-
this.parameters = {
|
|
1424
|
-
...DEFAULT_MESH_GEOMETRY_PARAMETERS.plane,
|
|
1425
|
-
...parameters
|
|
1426
|
-
};
|
|
1427
|
-
break;
|
|
1428
|
-
case "sphere":
|
|
1429
|
-
this.parameters = {
|
|
1430
|
-
...DEFAULT_MESH_GEOMETRY_PARAMETERS.sphere,
|
|
1431
|
-
...parameters
|
|
1432
|
-
};
|
|
1433
|
-
break;
|
|
1434
|
-
case "cylinder":
|
|
1435
|
-
this.parameters = {
|
|
1436
|
-
...DEFAULT_MESH_GEOMETRY_PARAMETERS.cylinder,
|
|
1437
|
-
...parameters
|
|
1438
|
-
};
|
|
1439
|
-
break;
|
|
1440
|
-
case "capsule":
|
|
1441
|
-
this.parameters = {
|
|
1442
|
-
...DEFAULT_MESH_GEOMETRY_PARAMETERS.capsule,
|
|
1443
|
-
...parameters
|
|
1444
|
-
};
|
|
1445
|
-
break;
|
|
1446
|
-
case "model":
|
|
1447
|
-
this.parameters = {};
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
};
|
|
1452
|
-
__name(_MeshGeometryComponent, "MeshGeometryComponent");
|
|
1453
|
-
var MeshGeometryComponent = _MeshGeometryComponent;
|
|
1454
1522
|
|
|
1455
1523
|
// core/components/Model.ts
|
|
1456
1524
|
var _ModelComponent = class _ModelComponent extends Component {
|
|
@@ -1717,6 +1785,6 @@ var _VideoComponent = class _VideoComponent extends Component {
|
|
|
1717
1785
|
__name(_VideoComponent, "VideoComponent");
|
|
1718
1786
|
var VideoComponent = _VideoComponent;
|
|
1719
1787
|
|
|
1720
|
-
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, ImageComponent, ImageTarget, ImageTargetAnchor, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, ScriptComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, components_exports, normalizePhysicsState };
|
|
1721
|
-
//# sourceMappingURL=chunk-
|
|
1722
|
-
//# sourceMappingURL=chunk-
|
|
1788
|
+
export { AnimationComponent, AnimationStateMachine, AnimationStateManager, AudioComponent, CameraComponent, DEFAULT_COLLIDER_STATE, DEFAULT_ENVIRONMENT_STATE, DEFAULT_INSTANCED_MESH_PARAMETERS, DEFAULT_INSTANCE_TRANSFORM, DEFAULT_MESH_GEOMETRY_PARAMETERS, DEFAULT_PHYSICS_STATE, DEFAULT_POSTPROCESSING_STATE, DEFAULT_RIGIDBODY_STATE, EntityType, Environment, ImageComponent, ImageTarget, ImageTargetAnchor, InstancedMeshComponent, LightComponent, MaterialComponent, MeshComponent, MeshGeometryComponent, ModelComponent, Name, Object3DRef, ParentId, PhysicsComponent, Postprocessing, ScriptComponent, Selectable, SelectionTransformState, SpriteComponent, TransformComponent, VideoComponent, components_exports, normalizePhysicsState };
|
|
1789
|
+
//# sourceMappingURL=chunk-KRZLEPRI.js.map
|
|
1790
|
+
//# sourceMappingURL=chunk-KRZLEPRI.js.map
|