Open weddingdj opened 6 years ago
Thanks @weddingdj , this works great indeed, replacing
roundedRect( roundedRectShape, 0, 0, this.data.width, this.data.height, corners[0], corners[1], corners[2], corners[3] );
by
roundedRect( roundedRectShape, -this.data.width / 2, -this.data.height / 2, this.data.width, this.data.height, corners[0], corners[1], corners[2], corners[3] );
A-rounded is positioned, aligned differently than eg. an a-entity.
I changed line https://github.com/etiennepinchon/aframe-rounded/blob/master/dist/aframe-rounded-component.js#L117 : instead of x=0 and y=0 I used x = -this.data.width/2 and y = -this.data.height/2 and it was alright and aligned like other a-entities.
Otherwise, great component!