Log in from a computer to take this course

You'll need to log in from a computer to start Learn A-Frame (VR). But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store
Learn

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".

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?