Recently, I came across a mesmerizing mesh randomization effect in three.js that I really admired. I wanted to replicate it in my own codepen, so I took inspiration from the original source and made some adjustments (refer to line 56 of my codepen). However, despite my efforts, the desired distorted edges didn't come through, and instead, the code broke.
Specifically, this part seems to be causing the issue:
var noise = randomRange(1,5);
for(var i=0; i<Ico.vertices.length; i++){
var v = Ico.vertices[i];
v.x += -noise/2 + Math.random()*noise;
v.y += -noise/2 + Math.random()*noise;
v.z += -noise/2 + Math.random()*noise;
};
I'm at a loss here. Have I overlooked something crucial? Any assistance or pointers would be highly valued.