How do you "Overlays"? (First pass at a right lick menu complete)


#1

Hi,

So as the title states im looking for any “documentation” or suggestions people have using the Overlays.
Currenlty I am iteratiing over arrays of overlay ID’s to edit them, and move them every time I want to display the menu.
Has anyone got some simpler examples than “users.js” for using overlays.

Here’s what im working on so far.

Right Click Menu


#2

Right lick menu Freud would have a field day with that


#3

Generally however, there is currently no machine wise ‘simpler’ example for manipulating Overlays, as Array iteration is the most efficient way of doing it.

But I made a library to bind the manipulation of Overlays and Entities into JS Objects in order lessen the amount of code I write.

Not exactly Optional in terms of memory use, but it makes code a bit more legible in my opinion, like this debugger I made to checkout LookAt-RayPick.


#4

Thanks for the suggestion.

I have ended up making a few simple objects to wrap the overlays in.
The menu is now generated from a json file, and finally has working sub menu’s etc

Im going to github the code, its messy and I’d love someone more versed in JS to come slap me for my huge mistakes. XD

Right Click menu video