---
title: "getTransformationMatrix | 3D JS | JavaScript maps SDK"
description: "Documentation for 3D objects"
---

> 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 getTransformationMatrix

-   getTransformationMatrix(  
        scale: \[number, number, number\],  
        heading: number,  
        orientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/),  
    ): Matrix4[](#gettransformationmatrix)
    
    Helper function to create a transformation matrix for model and we can apply in single operation.
    
    #### Parameters
    
    -   scale: \[number, number, number\]
    -   heading: number
    -   orientation: [SourceOrientation](https://docs.maptiler.com/sdk-js/modules/3d/api/enums/SourceOrientation/)
    
    #### Returns Matrix4
    
    -   Defined in [src/utils.ts:35](https://github.com/maptiler/maptiler-3d-js/blob/d1455de4164bd626ae604b498181010b0ec9ac4b/src/utils.ts#L35)
