Skip to content

Passthrough of attributes on primitives such as a-sphere seems to be broken in 1.4.0 #5203

@diarmidmackenzie

Description

@diarmidmackenzie

Description:

Example shows a couple of different ways of setting the color & radius of an a-sphere.

      AFRAME.registerComponent('big-blue-1', {
        init() {
          this.el.setAttribute('geometry', 'radius: 0.75')
          this.el.setAttribute('material', 'color: blue')
        }
      })
      AFRAME.registerComponent('big-blue-2', {
        init() {
          this.el.setAttribute('radius', '0.75')
          this.el.setAttribute('color', 'blue')
        }
      })

In 1.3.0 both big-blue-1 and big-blue-2 work as they should.

In 1.4.0, big-blue-1 works OK, but big-blue-2 no longer alters the sphere's color or radius.

Found when updating aframe-physics-system examples to 1.4.0. I haven't yet looked at why this is. For now I am working around by updating my examples to the alternative approach that still works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions