@thatopen/components 2.4.4 → 2.4.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/index.mjs CHANGED
@@ -6293,7 +6293,7 @@ const _Components = class _Components {
6293
6293
  /**
6294
6294
  * The version of the @thatopen/components library.
6295
6295
  */
6296
- __publicField(_Components, "release", "2.4.4");
6296
+ __publicField(_Components, "release", "2.4.5");
6297
6297
  let Components = _Components;
6298
6298
  class SimpleWorld extends Base {
6299
6299
  constructor() {
@@ -12756,6 +12756,9 @@ class ProjectionManager {
12756
12756
  setupOrthoCamera(height, width) {
12757
12757
  this._component.controls.mouseButtons.wheel = CameraControls.ACTION.ZOOM;
12758
12758
  this._component.controls.mouseButtons.middle = CameraControls.ACTION.ZOOM;
12759
+ this._component.controls.touches.two = CameraControls.ACTION.TOUCH_ZOOM_TRUCK;
12760
+ this._component.controls.touches.three = CameraControls.ACTION.TOUCH_ZOOM_TRUCK;
12761
+ this._component.controls.dollySpeed = 5;
12759
12762
  const pCamera = this._component.threePersp;
12760
12763
  const oCamera = this._component.threeOrtho;
12761
12764
  oCamera.zoom = 1;
@@ -12782,6 +12785,9 @@ class ProjectionManager {
12782
12785
  pCamera.position.copy(oCamera.position);
12783
12786
  pCamera.quaternion.copy(oCamera.quaternion);
12784
12787
  this._component.controls.mouseButtons.wheel = CameraControls.ACTION.DOLLY;
12788
+ this._component.controls.touches.two = CameraControls.ACTION.TOUCH_DOLLY_TRUCK;
12789
+ this._component.controls.touches.three = CameraControls.ACTION.TOUCH_DOLLY_TRUCK;
12790
+ this._component.controls.dollySpeed = 5;
12785
12791
  if (this.matchOrthoDistanceEnabled) {
12786
12792
  this._component.controls.distance = this.getDistance();
12787
12793
  } else {
@@ -26734,7 +26740,7 @@ class MiniMap {
26734
26740
  this._camera.left = frustumSize * aspect / -2;
26735
26741
  this._camera.right = frustumSize * aspect / 2;
26736
26742
  this._camera.top = frustumSize / 2;
26737
- this._camera.bottom = -frustumSize / 2;
26743
+ this._camera.bottom = -1 / 2;
26738
26744
  this._camera.updateProjectionMatrix();
26739
26745
  this.onResize.trigger(size);
26740
26746
  }
@@ -27268,12 +27274,12 @@ const getParameterXML = (name, parameter) => {
27268
27274
  if (!parameter)
27269
27275
  return parameterXML;
27270
27276
  if (parameter.type === "simple") {
27271
- parameterXML = `<ids:simpleValue>${parameter.parameter}</ids:simpleValue>`;
27277
+ parameterXML = `<simpleValue>${parameter.parameter}</simpleValue>`;
27272
27278
  }
27273
27279
  if (parameter.type === "enumeration") {
27274
27280
  const value = parameter.parameter;
27275
27281
  parameterXML = `<xs:restriction base="xs:string">
27276
- ${value.map((v) => `<xs:enumeration value="${v}" />`).join("\r\n")}
27282
+ ${value.map((v) => `<xs:enumeration value="${v}" />`).join("\n")}
27277
27283
  </xs:restriction>`;
27278
27284
  }
27279
27285
  if (parameter.type === "pattern") {
@@ -27282,9 +27288,44 @@ const getParameterXML = (name, parameter) => {
27282
27288
  <xs:pattern value="${value}" />
27283
27289
  </xs:restriction>`;
27284
27290
  }
27285
- const xml = `<ids:${name[0].toLowerCase() + name.slice(1)}>
27291
+ if (parameter.type === "bounds") {
27292
+ const { min, minInclusive, max, maxInclusive } = parameter.parameter;
27293
+ let minTag = "";
27294
+ if (min !== void 0) {
27295
+ minTag = `<xs:min${minInclusive ? "Inclusive" : "Exclusive"} value="${min}">`;
27296
+ }
27297
+ let maxTag = "";
27298
+ if (max !== void 0) {
27299
+ maxTag = `<xs:max${maxInclusive ? "Inclusive" : "Exclusive"} value="${max}">`;
27300
+ }
27301
+ parameterXML = `<xs:restriction base="xs:double">
27302
+ ${minTag}
27303
+ ${maxTag}
27304
+ </xs:restriction>`;
27305
+ }
27306
+ if (parameter.type === "length") {
27307
+ const { length, min, max } = parameter.parameter;
27308
+ let lengthTag = "";
27309
+ if (length !== void 0 && min === void 0 && max === void 0) {
27310
+ lengthTag = `<xs:length value="${length}" />`;
27311
+ }
27312
+ let minTag = "";
27313
+ if (min !== void 0 && length === void 0) {
27314
+ minTag = `<xs:minLength value="${min}" />`;
27315
+ }
27316
+ let maxTag = "";
27317
+ if (max !== void 0 && length === void 0) {
27318
+ maxTag = `<xs:maxLength value="${max}" />`;
27319
+ }
27320
+ parameterXML = `<xs:restriction base="xs:string">
27321
+ ${lengthTag}
27322
+ ${minTag}
27323
+ ${maxTag}
27324
+ </xs:restriction>`;
27325
+ }
27326
+ const xml = `<${name[0].toLowerCase() + name.slice(1)}>
27286
27327
  ${parameterXML}
27287
- </ids:${name[0].toLowerCase() + name.slice(1)}>`;
27328
+ </${name[0].toLowerCase() + name.slice(1)}>`;
27288
27329
  return xml;
27289
27330
  };
27290
27331
  class IDSAttribute extends IDSFacet {
@@ -27303,10 +27344,10 @@ class IDSAttribute extends IDSFacet {
27303
27344
  attributes += `cardinality="${this.cardinality}"`;
27304
27345
  attributes += this.instructions ? `instructions="${this.instructions}"` : "";
27305
27346
  }
27306
- return `<ids:attribute ${attributes}>
27347
+ return `<attribute ${attributes}>
27307
27348
  ${nameXML}
27308
27349
  ${valueXML}
27309
- </ids:attribute>`;
27350
+ </attribute>`;
27310
27351
  }
27311
27352
  // This can be very ineficcient as we do not have an easy way to get an entity based on an attribute
27312
27353
  // Right now, all entities must be iterated.
@@ -27442,10 +27483,10 @@ class IDSClassification extends IDSFacet {
27442
27483
  attributes += this.uri ? `uri=${this.uri}` : "";
27443
27484
  attributes += this.instructions ? `instructions="${this.instructions}"` : "";
27444
27485
  }
27445
- return `<ids:classification ${attributes}>
27486
+ return `<classification ${attributes}>
27446
27487
  ${systemXML}
27447
27488
  ${valueXML}
27448
- </ids:classification>`;
27489
+ </classification>`;
27449
27490
  }
27450
27491
  async getEntities(model, collector = {}) {
27451
27492
  var _a;
@@ -27723,10 +27764,10 @@ class IDSEntity extends IDSFacet {
27723
27764
  attributes += `cardinality="${this.cardinality}"`;
27724
27765
  attributes += this.instructions ? `instructions="${this.instructions}"` : "";
27725
27766
  }
27726
- return `<ids:entity ${attributes}>
27767
+ return `<entity ${attributes}>
27727
27768
  ${nameXML}
27728
27769
  ${predefinedTypeXML}
27729
- </ids:entity>`;
27770
+ </entity>`;
27730
27771
  }
27731
27772
  // IFCSURFACESTYLEREFRACTION is not present in the FragmentsGroup
27732
27773
  // IFCSURFACESTYLERENDERING is not present in the FragmentsGroup
@@ -27864,11 +27905,11 @@ class IDSProperty extends IDSFacet {
27864
27905
  attributes += this.uri ? `uri=${this.uri}` : "";
27865
27906
  attributes += this.instructions ? `instructions="${this.instructions}"` : "";
27866
27907
  }
27867
- return `<ids:property ${dataTypeXML} ${attributes}>
27908
+ return `<property ${dataTypeXML} ${attributes}>
27868
27909
  ${propertySetXML}
27869
27910
  ${baseNameXML}
27870
27911
  ${valueXML}
27871
- </ids:property>`;
27912
+ </property>`;
27872
27913
  }
27873
27914
  async getEntities(model, collector = {}) {
27874
27915
  var _a, _b;
@@ -28287,14 +28328,14 @@ class IDSSpecification {
28287
28328
  const identifier = this.identifier ? `identifier="${this.identifier}"` : "";
28288
28329
  const description = this.description ? `description="${this.description}"` : "";
28289
28330
  const instructions = this.instructions ? `instructions="${this.instructions}"` : "";
28290
- const xml = `<ids:specification ifcVersion="${[...this.ifcVersion].join(" ")}" ${name} ${identifier} ${description} ${instructions}>
28291
- <ids:applicability minOccurs="1" maxOccurs="unbounded">
28292
- ${[...this.applicability].map((facet) => facet.serialize("applicability"))}
28293
- </ids:applicability>
28294
- <ids:requirements>
28295
- ${[...this.requirements].map((facet) => facet.serialize("requirement"))}
28296
- </ids:requirements>
28297
- </ids:specification>`;
28331
+ const xml = `<specification ifcVersion="${[...this.ifcVersion].join(" ")}" ${name} ${identifier} ${description} ${instructions}>
28332
+ <applicability minOccurs="1" maxOccurs="unbounded">
28333
+ ${[...this.applicability].map((facet) => facet.serialize("applicability")).join("\n")}
28334
+ </applicability>
28335
+ <requirements>
28336
+ ${[...this.requirements].map((facet) => facet.serialize("requirement")).join("\n")}
28337
+ </requirements>
28338
+ </specification>`;
28298
28339
  return xml;
28299
28340
  }
28300
28341
  }
@@ -28543,22 +28584,22 @@ const _IDSSpecifications = class _IDSSpecifications extends Component {
28543
28584
  */
28544
28585
  export(info, specifications = this.list.values()) {
28545
28586
  const _specifications = specifications ?? this.list;
28546
- const xml = `<ids:ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/1.0/ids.xsd" xmlns:ids="http://standards.buildingsmart.org/IDS">
28587
+ const xml = `<ids xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://standards.buildingsmart.org/IDS http://standards.buildingsmart.org/IDS/1.0/ids.xsd" xmlns:ids="http://standards.buildingsmart.org/IDS">
28547
28588
  <!-- Made with That Open Engine ${Components.release} (https://github.com/thatopen/engine_components) -->
28548
- <ids:info>
28549
- <ids:title>${info.title}</ids:title>
28550
- ${info.copyright ? `<ids:copyright>${info.copyright}</ids:copyright>` : ""}
28551
- ${info.version ? `<ids:version>${info.version}</ids:version>` : ""}
28552
- ${info.description ? `<ids:description>${info.description}</ids:description>` : ""}
28553
- ${info.author ? `<ids:author>${info.author}</ids:author>` : ""}
28554
- ${info.date ? `<ids:date>${info.date.toISOString().split("T")[0]}</ids:date>` : ""}
28555
- ${info.purpose ? `<ids:purpose>${info.purpose}</ids:purpose>` : ""}
28556
- ${info.milestone ? `<ids:milestone>${info.milestone}</ids:milestone>` : ""}
28557
- </ids:info>
28558
- <ids:specifications>
28589
+ <info>
28590
+ <title>${info.title}</title>
28591
+ ${info.copyright ? `<copyright>${info.copyright}</copyright>` : ""}
28592
+ ${info.version ? `<version>${info.version}</version>` : ""}
28593
+ ${info.description ? `<description>${info.description}</description>` : ""}
28594
+ ${info.author ? `<author>${info.author}</author>` : ""}
28595
+ ${info.date ? `<date>${info.date.toISOString().split("T")[0]}</date>` : ""}
28596
+ ${info.purpose ? `<purpose>${info.purpose}</purpose>` : ""}
28597
+ ${info.milestone ? `<milestone>${info.milestone}</milestone>` : ""}
28598
+ </info>
28599
+ <specifications>
28559
28600
  ${[..._specifications].map((spec) => spec.serialize()).join("\n")}
28560
- </ids:specifications>
28561
- </ids:ids>`;
28601
+ </specifications>
28602
+ </ids>`;
28562
28603
  return xml;
28563
28604
  }
28564
28605
  };