I have created an html page with an html button and a div canvas.
When I push the html button the function (in .JS file) is activated for the lines between objects.
With the left button I connect the spheres with a line. And it’s ok.
Now,
I would like the function to STOP working with the right click (clicking where there is nothing).
So that I can activate other functions with the left button.
I basically don’t want the “LINES function” to stay active forever.
No. When right clicking somewhere that it not over a mesh, I want no longer to be able to make lines between meshes. I’don’t want to remove the lines but only exit function.
push html button—> Active Function -enabled for lines with left button - OK
2- draw lines between mesh - OK
3- right clich where no over a mesh and exit function - not enabled for lines - KO
You can have a boolean allowMakeLines that is true by default, and when the over-nothing click happen, set it to false.
Then, check the boolean is true before