aframe: setAttribute on text geometry not working
When trying to set setAttribute(‘geometry’,{primitive: “plane”, height: “auto”, width: “auto”}); on <a-entity text>
the plane is not being drawn. However if you change the wrap count programaticaly afterwards the plane is showing. The plane will not update it’s width and height if you change the wrap count again.
- A-Frame Version: 0.6.0 master (8d60730)
- Platform / Device: PC
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 23 (18 by maintainers)
Commits related to this issue
- Documentation: replace auto reference by 0 as per https://github.com/aframevr/aframe/issues/2837 'auto' is not acceptable value for geometry width/height. For the time being '0' can be used for havi... — committed to da4throux/aframe by da4throux 4 years ago
- Update text plane size following text mutation (fixes #2764). The plane width/height was being calculated when the text value was first set, but would not update when the text changed. Documentation... — committed to brycethomas/aframe by brycethomas 9 months ago
- Update text plane size following text mutation (fixes #2764). (#5357) The plane width/height was being calculated when the text value was first set, but would not update when the text changed. Do... — committed to aframevr/aframe by brycethomas 8 months ago
How would we go about re-autosizing when the text contents have changed?
setAttribute("geometry", { width: auto})
is indeed parsed as a NaN. Shouldgeometry
be detached and re-attached?