Skip to content

Commit

Permalink
reducing triangles again
Browse files Browse the repository at this point in the history
Reducing the detail in these two spheres saves about 2400 triangles!
  • Loading branch information
stemkoski committed Mar 29, 2022
1 parent 919726b commit 05bd724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/raycaster-extras.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ AFRAME.registerComponent('raycaster-extras', {

this.cursorBorder = document.createElement('a-sphere');
this.cursorBorder.setAttribute("radius", this.data.cursorRadius);
this.cursorBorder.setAttribute("segments-height", 4); // default: 18
this.cursorBorder.setAttribute("segments-width", 8); // default: 36
this.cursorBorder.setAttribute("material", "shader: flat; color: black; side: back;");
this.cursorBorder.setAttribute("overlay", "");
this.cursorEntity.appendChild(this.cursorBorder);

this.cursorCenter = document.createElement('a-sphere');
this.cursorCenter.setAttribute("radius", this.data.cursorRadius * 0.80);
this.cursorCenter.setAttribute("segments-height", 4); // default: 18
this.cursorCenter.setAttribute("segments-width", 8); // default: 36
this.cursorCenter.setAttribute("material", "shader: flat; side: front;");
this.cursorCenter.setAttribute("material", "color", this.data.cursorColor);
this.cursorCenter.setAttribute("overlay", "");
Expand Down

0 comments on commit 05bd724

Please sign in to comment.