svelthree icon indicating copy to clipboard operation
svelthree copied to clipboard

`.userData` : reconsider current usage / type an interface (?) for data saved in `.userData`

Open vatro opened this issue 3 years ago • 0 comments

Atm various svelthree properties are saved directly in .userData of three.js object instances, but it would be nice to have them more separated and typed (?) in an e.g. userData.svelthree object, though I don't like the length of it. Another possibility would be to add some prefix to currently saved properties. Maybe the prefix should be dynamic, so the user can set it per project / canvas / svelthreeStores[i] like .userData["<dynamic_prefix>_propkey"]? 🤔 Or the name of the object like e.g. userData[dynamic_name].propkey?

This would be a rather major refactor.

vatro avatar Jun 13 '22 09:06 vatro