TresObjects are "large data structures". Each one typically holds a reference to context, which contains scene, renderer, etc.
After a rough regex search for \bref\b, it appears that the Tres docs and playgrounds have 100+ occurrences of ref(TresObject). Many of those can be converted to shallowRef(TresObject) with no loss of intent/functionality.
Meta
Discussed among the core team on Discord
Suggested solution
Convert ref(TresObject) to shallowRef(TresObject) in the docs and playgrounds.
Description
To nudge users and contributors to use
shallowRef
overref
, convertref(TresObject)
toshallowRef(TresObject)
in the docs and playgrounds.Context
According to the Vue docs:
https://vuejs.org/api/reactivity-advanced.html
TresObject
s are "large data structures". Each one typically holds a reference tocontext
, which containsscene
,renderer
, etc.After a rough regex search for
\bref\b
, it appears that the Tres docs and playgrounds have 100+ occurrences ofref(TresObject)
. Many of those can be converted toshallowRef(TresObject)
with no loss of intent/functionality.Meta
Discussed among the core team on Discord
Suggested solution
Convert ref(TresObject) to shallowRef(TresObject) in the docs and playgrounds.
Alternative
Leave as is.
Additional context
No response
Validations