Learn
Introduction to A-Frame
Scale

The scale component defines a shrinking, stretching, or skewing transformation of an entity. It takes three scaling factors for the x, y, and z axes.

Here’s the scale component in action:

<a-scene> <a-box color="red" position="0 2 -5" rotation="0 45 45" scale="0.5 2 1"> </a-box> </a-scene>
  • The x-axis value is shrunk by 0.5
  • The y-axis value is stretched by 2
  • The z-axis value is kept the same with 1

All entities inherently have the scale component, so make sure to take advantage of it when designing 3D objects.

Instructions

1.

Give <a-box> a scale of "2 1 2".

Folder Icon

Take this course for free

Already have an account?