Tresjs / tres

Declarative ThreeJS using Vue Components

Home Page:https://tresjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Move `TresObject.__tres` to a `WeakMap`

andretchen0 opened this issue · comments

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

Dicussed here.

Validations