xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.15k stars 264 forks source link

Existing model ids #240

Closed rubydesign closed 3 years ago

rubydesign commented 6 years ago

Another more suggestion than bug. I have collections of similar entities, so..

When i add a entity with an id that has already been taken, xeo ignores it. It would be more helpful if it could make it unique by appending the number that it generates.

That way i could pass the same prefix id into many entities and the ids would come out recognisable (for debugs). I can off course code this, if you accept.

eg: new xeogl.Entity({id: "post"}) -> id = "post" new xeogl.Entity({id: "post"}) -> id = "_1"

preferred: new xeogl.Entity({id: "post"}) -> id = "post" new xeogl.Entity({id: "post"}) -> id = "post_1"