So I have a slider in my HTML with values ranging from 1 to 2. When I have the slider value set to 1, I want to set the coordinates of my wavefront to the one described by arrayMin and when the slider is set to 2, I want the coordinates of my wavefront to set to one described by arrayMin.
man is the name of the variable that I used to load the obj in threejs using OBJLoader.
function render(time)
{
let valueOfSlider = document.getElementById('mySlider').value
scene.remove(man)
if (valueOfSlider == 1){
console.log("I want arrayMin to be set")
man.children[0].geometry.attributes.position.array=Float32Array.from(arrayMin)
}
else
{
console.log("I want array Max to be set")
man.children[0].geometry.attributes.position.array=Float32Array.from(arrayMax)
}
scene.add(man)
controls.update()
renderer.render(scene,camera)
requestAnimationFrame(render)
}