Move `TresObject.__tres` to a `WeakMap`
andretchen0 opened this issue · comments
andretchen0 commented
Problem
src/core/nodeOps.ts
currently saves data associated with a given THREE
object in the object's userData
. This means it can be modified or deleted by users.
Solution
Move the data to a WeakMap
that's private to nodeOps
.
Additional context
Validations
- I agree to follow this project's Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.