---
title: "getScaling | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Function getScaling

-   getScaling(out: [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/), mat: [ReadonlyMat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyMat4/)): [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/)[](#getscaling)
    
    Returns the scaling factor component of a transformation matrix. If a matrix is built with fromRotationTranslationScale with a normalized Quaternion parameter, the returned vector will be the same as the scaling vector originally supplied.
    
    #### Parameters
    
    -   out: [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/)
        
        Vector to receive scaling factor component
        
    -   mat: [ReadonlyMat4](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.ReadonlyMat4/)
        
        Matrix to be decomposed (input)
        
    
    #### Returns [vec3](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.vec3/)
    
    out
