setScale method

void setScale(
  1. Vec3 scale
)

Implementation

void setScale(Vec3 scale) {
  final wasUniform = this.scale.x == this.scale.y && this.scale.y == this.scale.z;
  final isUniform = scale.x == scale.y && scale.y == scale.z;

  if (!(wasUniform && isUniform)) {
    // Non-uniform scaling. Need to update normals.
    updateNormals();
  }
  this.scale.copy(scale);
  updateAABB();
  updateBoundingSphereRadius();
}