@liquidcars/atlas 0.1.24 → 0.1.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -213,12 +213,15 @@ Una vez publicado, los consumidores podrán instalarlo con `npm install @liquidc
213
213
  Para probar el paquete sin publicarlo, basta con instalar el tarball generado:
214
214
 
215
215
  ```bash
216
- npm install ./liquidcars-atlas-0.1.24.tgz
216
+ npm install ./liquidcars-atlas-0.1.25.tgz
217
217
  ```
218
218
 
219
219
  ## Estado
220
220
 
221
- `0.1.24` incorpora geometry packs independientes, namespaces, parámetros
221
+ `0.1.25` mantiene el centro como anclaje implícito de toda relación y utiliza
222
+ los puertos de geometrías externas únicamente cuando el modelo los solicita.
223
+ También evita recorrer los materiales de geometrías compuestas en cada frame.
224
+ `0.1.24` incorporó geometry packs independientes, namespaces, parámetros
222
225
  personalizados, paletas locales, anchors e imágenes/iconos declarativos. La
223
226
  versión `0.1.23` añadió desplazamiento lateral de cámara mediante ratón, teclado
224
227
  modificador y gestos táctiles, además de la API pública `panBy()` y `panTo()`.
package/demo/index.html CHANGED
@@ -14,12 +14,12 @@
14
14
  liquidcars-atlas { display: block; width: 100%; max-width: 1480px; margin: 0 auto; }
15
15
  code { color: #85e5d3; }
16
16
  </style>
17
- <script type="module" src="../dist/liquidcars-atlas.js?v=0.1.24"></script>
17
+ <script type="module" src="../dist/liquidcars-atlas.js?v=0.1.25"></script>
18
18
  </head>
19
19
  <body>
20
20
  <header>
21
21
  <h1>LiquidCars Atlas</h1>
22
- <p>Prueba de distribución del componente <code>&lt;liquidcars-atlas&gt;</code> · v0.1.24</p>
22
+ <p>Prueba de distribución del componente <code>&lt;liquidcars-atlas&gt;</code> · v0.1.25</p>
23
23
  </header>
24
24
  <main>
25
25
  <liquidcars-atlas id="atlas" height="720" relation-mode="selected" shell-labels="on"></liquidcars-atlas>
@@ -1,4 +1,4 @@
1
- /*! LiquidCars Atlas 0.1.24 | MIT */
1
+ /*! LiquidCars Atlas 0.1.25 | MIT */
2
2
 
3
3
  // src/three.core.js
4
4
  /**
@@ -30305,8 +30305,12 @@ var LiquidCarsAtlas = class extends HTMLElement {
30305
30305
  try {
30306
30306
  const content = createGeometryContent(definition, entity, this.modelData.palette, () => this.invalidate());
30307
30307
  content.root.scale.multiply(new Vector3().fromArray(entity.s));
30308
+ node.appearanceMaterials = [];
30308
30309
  content.root.traverse((object) => {
30309
- if (object.isMesh) object.userData.node = node;
30310
+ if (!object.isMesh) return;
30311
+ object.userData.node = node;
30312
+ const materials = Array.isArray(object.material) ? object.material : [object.material];
30313
+ node.appearanceMaterials.push(...materials.filter(Boolean));
30310
30314
  });
30311
30315
  node.mesh = content.root;
30312
30316
  node.colorBindings = content.colorBindings;
@@ -30370,7 +30374,10 @@ var LiquidCarsAtlas = class extends HTMLElement {
30370
30374
  const center = this._worldPosition(node);
30371
30375
  const mode = node.anchor || "center";
30372
30376
  const requestedAnchor = relation?.[isSource ? "fromAnchor" : "toAnchor"] || relation?.[isSource ? "from_anchor" : "to_anchor"];
30373
- if (mode === "port" || requestedAnchor || node.geometryDefinition?.anchors) {
30377
+ // Geometry packs may advertise available ports, but their mere presence
30378
+ // must not alter the model. The centre remains the default endpoint;
30379
+ // ports are used only when the entity or relation explicitly requests one.
30380
+ if (mode === "port" || requestedAnchor) {
30374
30381
  const ports = node.ports || {};
30375
30382
  const port = ports[requestedAnchor] || ports[isSource ? "output" : "input"] || ports.default;
30376
30383
  if (Array.isArray(port) && port.length >= 3) {
@@ -30631,12 +30638,12 @@ var LiquidCarsAtlas = class extends HTMLElement {
30631
30638
  node.material.depthWrite = !transparent;
30632
30639
  node.material.emissive?.set(node === this.selected ? node.material.color : 0);
30633
30640
  node.material.emissiveIntensity = node === this.selected ? 0.15 : 0;
30634
- } else {
30635
- node.mesh.traverse((object) => {
30636
- if (!object.isMesh || !object.material) return;
30637
- object.material.emissive?.set(node === this.selected ? object.material.color : 0);
30638
- object.material.emissiveIntensity = node === this.selected ? 0.15 : 0;
30639
- });
30641
+ } else if (node._appearanceSelected !== (node === this.selected)) {
30642
+ for (const material of node.appearanceMaterials || []) {
30643
+ material.emissive?.set(node === this.selected ? material.color : 0);
30644
+ material.emissiveIntensity = node === this.selected ? 0.15 : 0;
30645
+ }
30646
+ node._appearanceSelected = node === this.selected;
30640
30647
  }
30641
30648
  if (node.edge?.material) node.edge.material.opacity = node === this.selected ? 1 : 0.65;
30642
30649
  const opened = node.type === "shell" && this.open.has(node.id);
package/index.html CHANGED
@@ -14,12 +14,12 @@
14
14
  liquidcars-atlas { display: block; width: 100%; max-width: 1480px; margin: 0 auto; }
15
15
  code { color: #85e5d3; }
16
16
  </style>
17
- <script type="module" src="./dist/liquidcars-atlas.js?v=0.1.24"></script>
17
+ <script type="module" src="./dist/liquidcars-atlas.js?v=0.1.25"></script>
18
18
  </head>
19
19
  <body>
20
20
  <header>
21
21
  <h1>LiquidCars Atlas</h1>
22
- <p>Prueba de distribución del componente <code>&lt;liquidcars-atlas&gt;</code> · v0.1.24</p>
22
+ <p>Prueba de distribución del componente <code>&lt;liquidcars-atlas&gt;</code> · v0.1.25</p>
23
23
  </header>
24
24
  <main>
25
25
  <liquidcars-atlas id="atlas" height="720" relation-mode="selected" shell-labels="on"></liquidcars-atlas>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquidcars/atlas",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Reusable 3D conceptual atlas Web Component for LiquidCars-style models",
5
5
  "type": "module",
6
6
  "main": "./dist/liquidcars-atlas.js",