Skip to content

Commit

Permalink
lint fix and run dist
Browse files Browse the repository at this point in the history
  • Loading branch information
kfarr committed Feb 27, 2024
1 parent 96eb7f3 commit 65273e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/aframe-street-component.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/components/svg-extruder.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@ AFRAME.registerComponent('svg-extruder', {
shapes.forEach((shape) => {
const geometry = new THREE.ExtrudeGeometry(shape, extrudeSettings);
shapeGeometryArray.push(geometry);

});
});

// Merge array of extruded geometries into the mergedGeometry
const mergedGeometry =
THREE.BufferGeometryUtils.mergeBufferGeometries(shapeGeometryArray);

mergedGeometry.computeBoundingBox();
mergedGeometry.computeVertexNormals();
mergedGeometry.center();
mergedGeometry.rotateX(Math.PI / 2);
mergedGeometry.scale(0.05,0.05,0.05)
mergedGeometry.scale(0.05, 0.05, 0.05);

const linesGeometry = new THREE.EdgesGeometry(mergedGeometry);
const lines = new THREE.LineSegments(linesGeometry, this.stokeMaterial);
Expand All @@ -62,12 +61,11 @@ AFRAME.registerComponent('svg-extruder', {
// remove existing mesh from entity
el.removeObject3D('mesh');
el.setObject3D('mesh', mergedMesh);

},
update: function (oldData) {
// If `oldData` is empty, then this means we're in the initialization process.
// No need to update.
//if (Object.keys(oldData).length === 0) { return; }
// if (Object.keys(oldData).length === 0) { return; }

const el = this.el;
const svgString = this.data.svgString;
Expand Down

0 comments on commit 65273e1

Please sign in to comment.