You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Don't use AFRAME.components[payload.component] here, but use this.entity.components[payload.component] so we have the dynamic schema,
44
-
// important for material or geometry components like for example modifying material metalness,
45
-
// otherwise component.schema[payload.property] would be undefined.
41
+
constcomponent=
42
+
this.entity.components[payload.component]??
43
+
AFRAME.components[payload.component];
44
+
// First try to get `this.entity.components[payload.component]` to have the dynamic schema, and fallback to `AFRAME.components[payload.component]` if not found.
45
+
// This is to properly stringify some properties that uses for example vec2 or vec3 on material component.
46
+
// This is important to fallback to `AFRAME.components[payload.component]` for primitive components position rotation and scale
47
+
// that may not have been created initially on the entity.
0 commit comments