---
title: "Framebuffer | 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 Framebuffer

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[colorAttachment](#colorattachment) [context](#context) [depthAttachment](#depthattachment) [framebuffer](#framebuffer) [height](#height) [width](#width)

### Methods[](#methods)

[destroy](#destroy)

## Constructors[](#constructors-1)

### constructor[](#constructor)

-   new Framebuffer(  
        context: [Context](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Context/),  
        width: number,  
        height: number,  
        hasDepth: boolean,  
        hasStencil: boolean,  
    ): Framebuffer[](#constructorframebuffer)
    
    #### Parameters
    
    -   context: [Context](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Context/)
    -   width: number
    -   height: number
    -   hasDepth: boolean
    -   hasStencil: boolean
    
    #### Returns Framebuffer
    

## Properties[](#properties-1)

### colorAttachment[](#colorattachment)

colorAttachment: [ColorAttachment](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.ColorAttachment/)

### context[](#context)

context: [Context](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Context/)

### depthAttachment[](#depthattachment)

depthAttachment: [DepthAttachment](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.DepthAttachment/)

### framebuffer[](#framebuffer)

framebuffer: [WebGLFramebuffer](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WebGLFramebuffer/)

### height[](#height)

height: number

### width[](#width)

width: number

## Methods[](#methods-1)

### destroy[](#destroy)

-   destroy(): void[](#destroy-1)
    
    #### Returns void
