feat: name component
name(name: string) // Since label is for ui
Provides obj.name
Allows assigning a name to an object. This name does not need to be unique. The reason for this component is to have an alternative way to query objects. Currently tags are used, but tags also assign behavior. As in onUpdate("tagged", tagged => {}). It you have a character existing of different parts, and want to animate it with a predefined animation, you need a practical way to reference parts. Using names we can locate pelvis/upper-left-leg/lower-left-leg/left-foot easily.
Hmm, sounds good, a replacement for tags, user still can use "tag as components", but this should be the new way
So get instead of be for get "tags", is for get object with certain comp
It's to be able to get a button with a specific name for example. Now you can do get("button") to get all buttons, but you can't get the "toggle-sound" button. Some people try to use tags for this, but this doesn't work so good.
get({
includes:["button"],
name:"sound-mute"
})
Will give you the button with name sound-toggle. Names, unlike tags, will support wildcards. So "sound-*" can give you all sound related objects, if you have named them so.
Will not break original get()?
No, the original get(string | [string]) will only work with tags. The new get(GetOpt) will work with new features like names.