# deepslate

> Library for rendering and emulating parts of Minecraft

Latest version **0.27.2** (published 2026-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install deepslate
pnpm add deepslate
yarn add deepslate
bun add deepslate
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.27.2 |
| Published | 2026-09-27 |
| First published | 2021-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 261 |
| Author | Misode |
| Maintainers | misode |

## Links

- npm: https://www.npmjs.com/package/deepslate
- Repository: https://github.com/misode/deepslate
- Homepage: https://github.com/misode/deepslate#readme
- Issues: https://github.com/misode/deepslate/issues
- npm.io page: https://npm.io/package/deepslate

## Dependencies (3)

- [md5](https://npm.io/package/md5.md) ^2.3.0
- [pako](https://npm.io/package/pako.md) ^2.0.3
- [gl-matrix](https://npm.io/package/gl-matrix.md) ^3.3.0

## Recent versions

- 0.27.2 (latest) — 2026-09-27
- 0.27.1 — 2026-09-07
- 0.27.0 — 2026-09-05
- 0.26.2 — 2026-08-23
- 0.26.1 — 2026-08-20
- 0.26.0 — 2026-05-20
- 0.25.1 — 2026-01-03
- 0.25.0 — 2026-01-02
- 0.24.0 — 2025-07-06
- 0.23.6 — 2025-04-12
- 0.23.5 — 2025-02-06
- 0.23.4 — 2024-12-23
- 0.23.4-beta.3 — 2024-12-23
- 0.23.4-beta.2 — 2024-12-23
- 0.23.4-beta.1 — 2024-12-23
- … 90 more at https://npm.io/package/deepslate/versions

## README

# Deepslate
> Library for rendering and emulating parts of Minecraft

## Install
```
npm install deepslate
```
```html
<script src="https://unpkg.com/deepslate@0.27.2"></script>
```

## Quick Examples

### Reading and writing binary NBT files
```ts
import { NbtFile, NbtString } from 'deepslate'

fetch('./example.nbt')
	.then(res => res.arrayBuffer())
	.then(data => {
		const file = NbtFile.read(new Uint8Array(data))
		file.root.set('Hello', new NbtString('World!'))
		const newData = file.write()
		console.log(newData)
	})
```

### Rendering a structure
```ts
import { Structure, StructureRenderer } from 'deepslate'
import { mat4 } from 'gl-matrix'

const structure = new Structure([4, 3, 4])
structure.addBlock([0, 0, 3], "minecraft:stone")
structure.addBlock([0, 1, 3], "minecraft:cactus", { "age": "1" })

// Obtain the WebGL context of a canvas element
const gl = canvas.getContext('webgl')

// See the demo on how to create a resources object
const renderer = new StructureRenderer(gl, structure, resources)

const view = mat4.create()
mat4.translate(view, view, [0, 0, -5])

renderer.drawStructure(view)
```

## [Docs](https://misode.github.io/deepslate/)
A collection of examples showcasing the use cases of deepslate.

#### [Render](https://misode.github.io/deepslate/examples/structurerenderer/)
Rendering a simple structure to a canvas, read from an NBT file.
Includes mouse controls and loading of an arbitrary resource pack.

![image](https://user-images.githubusercontent.com/17352009/131235802-ed6c6617-f054-4312-b567-f2692196bfaa.png)

#### [Splines](https://misode.github.io/deepslate/examples/splines/)
![image](https://user-images.githubusercontent.com/17352009/132134408-e140b1f2-d5df-4f6c-9913-6a8a5c01fd3c.png)

#### [Noise](https://misode.github.io/deepslate/examples/noise/)
![image](https://user-images.githubusercontent.com/17352009/132598742-7f9fc32c-58b7-45f0-8d4b-ae132a94b2b5.png)

#### [MultiNoise](https://misode.github.io/deepslate/examples/multinoise/) 
![image](https://user-images.githubusercontent.com/17352009/132134430-f21970b6-aaa8-4a95-9aa3-a52ea60bc0b0.png)

#### [Chunk Generator](https://misode.github.io/deepslate/examples/chunkgenerator/)
![image](https://user-images.githubusercontent.com/17352009/132598866-d2d61f8a-0d82-447d-a74b-97401f1a2425.png)

---
_Source: https://npm.io/package/deepslate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
