Closed ut112002 closed 8 months ago
Yes. Snappier than earlier version.
@arhik now we are trying to make the circle move , unfortunately changing the vertex data does not move it.
what would be the best way to move the circle without creating new objects.
object.uniformData = translate([sin(time()), 0.4, 0.0]).linear in your example works. you might have to switch to PollEvents.
Also in case you want to track mouse. Our window size is hardcoded to (500, 500). You will have to do this. with y and x flipped and negated.
(y, x) = 2.0.*(mouseState.prevPosition./500.0 .- 0.5) object = mouseState.leftClick ? renderer.scene.objects[2] : renderer.scene.objects[1] object.uniformData = translate([x, -y, 0.0]).linear
@VarLad and I found a better way to tackle the example
please take a look.