NOTE: This version of the documentation tracks unstable development happening on A-Frame’s
masterbranch. If you wish to try it out, grab the unstable build. Otherwise, head to the documentation for the current 0.7.0 version
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.
All entities inherently have the scale component.
The example below shrinks the entity in half along the X direction, maintains the same scale factor along the Y direction, and stretches the entity by two-fold along the Z-direction:
If we set any of the scaling factors to 0, then A-Frame will assign instead a negligible value.
|x||Scaling factor in the X direction.||1|
|y||Scaling factor in the Y direction.||1|
|z||Scaling factor in the Z direction.||1|
Scaling factors can be negative, which results in a reflection.
A notable use for this is for sky spheres. Sky spheres contain the entire scene and have a texture mapped on the interior surface. To do this, we can reflect, or invert, the sphere in the Z-direction.
Similar to the rotation and position components, scales are applied in the local coordinate system and multiply in nested entities.