bevy_mod_js_scripting icon indicating copy to clipboard operation
bevy_mod_js_scripting copied to clipboard

Proxy Object for Easily Obtaining Component IDs

Open zicklag opened this issue 3 years ago • 0 comments

Currently it's a little bit wordy to get component IDs:

let ballId = world.components.find(info => info.name == "breakout::Ball").id;

It would be cool if we could leverage a JS Proxy to let you do this:

let ballId = world.components.breakout.Ball.id;

zicklag avatar Aug 08 '22 15:08 zicklag