---
title: "DepthMode | 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.

# Class DepthMode

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[func](#func) [mask](#mask) [range](#range) [disabled](#disabled) [ReadOnly](#readonly) [ReadWrite](#readwrite)

## Constructors[](#constructors-1)

### constructor[](#constructor)

-   new DepthMode(  
        depthFunc: [CompareFuncType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CompareFuncType/),  
        depthMask: boolean,  
        depthRange: [DepthRangeType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.DepthRangeType/),  
    ): DepthMode[](#constructordepthmode)
    
    #### Parameters
    
    -   depthFunc: [CompareFuncType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CompareFuncType/)
    -   depthMask: boolean
    -   depthRange: [DepthRangeType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.DepthRangeType/)
    
    #### Returns DepthMode
    

## Properties[](#properties-1)

### func[](#func)

func: [CompareFuncType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.CompareFuncType/)

### mask[](#mask)

mask: boolean

### range[](#range)

range: [DepthRangeType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.DepthRangeType/)

### `Static`disabled[](#disabled)

disabled: [Readonly](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Readonly/)<DepthMode\>

### `Static`ReadOnly[](#readonly)

ReadOnly: boolean

### `Static`ReadWrite[](#readwrite)

ReadWrite: boolean
