{"id":13571891,"url":"https://github.com/misode/deepslate","last_synced_at":"2025-04-07T08:26:18.732Z","repository":{"id":36982250,"uuid":"326324984","full_name":"misode/deepslate","owner":"misode","description":"Library for rendering and emulating parts of Minecraft","archived":false,"fork":false,"pushed_at":"2024-04-22T18:56:37.000Z","size":6981,"stargazers_count":114,"open_issues_count":2,"forks_count":10,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-07T11:21:39.074Z","etag":null,"topics":["minecraft","nbt","webgl"],"latest_commit_sha":null,"homepage":"https://misode.github.io/deepslate/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/misode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-03T04:13:04.000Z","updated_at":"2024-06-07T21:55:53.576Z","dependencies_parsed_at":"2023-01-17T11:31:20.746Z","dependency_job_id":"3e026861-0c8d-470c-ab97-0d2d38f8b493","html_url":"https://github.com/misode/deepslate","commit_stats":{"total_commits":261,"total_committers":7,"mean_commits":"37.285714285714285","dds":0.06896551724137934,"last_synced_commit":"52c44ba60df838c640c47e9cf1f471d8532ae08f"},"previous_names":["misode/webmc"],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fdeepslate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fdeepslate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fdeepslate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/misode%2Fdeepslate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/misode","download_url":"https://codeload.github.com/misode/deepslate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500464,"owners_count":20948879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minecraft","nbt","webgl"],"created_at":"2024-08-01T14:01:07.911Z","updated_at":"2025-04-07T08:26:18.711Z","avatar_url":"https://github.com/misode.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Deepslate\n\u003e Library for rendering and emulating parts of Minecraft\n\n## Install\n```\nnpm install deepslate\n```\n```html\n\u003cscript src=\"https://unpkg.com/deepslate@0.23.5\"\u003e\u003c/script\u003e\n```\n\n## Quick Examples\n\n### Reading and writing binary NBT files\n```ts\nimport { NbtFile, NbtString } from 'deepslate'\n\nfetch('./example.nbt')\n\t.then(res =\u003e res.arrayBuffer())\n\t.then(data =\u003e {\n\t\tconst file = NbtFile.read(new Uint8Array(data))\n\t\tfile.root.set('Hello', new NbtString('World!'))\n\t\tconst newData = file.write()\n\t\tconsole.log(newData)\n\t})\n```\n\n### Rendering a structure\n```ts\nimport { Structure, StructureRenderer } from 'deepslate'\nimport { mat4 } from 'gl-matrix'\n\nconst structure = new Structure([4, 3, 4])\nstructure.addBlock([0, 0, 3], \"minecraft:stone\")\nstructure.addBlock([0, 1, 3], \"minecraft:cactus\", { \"age\": \"1\" })\n\n// Obtain the WebGL context of a canvas element\nconst gl = canvas.getContext('webgl')\n\n// See the demo on how to create a resources object\nconst renderer = new StructureRenderer(gl, structure, resources)\n\nconst view = mat4.create()\nmat4.translate(view, view, [0, 0, -5])\n\nrenderer.drawStructure(view)\n```\n\n## [Docs](https://misode.github.io/deepslate/)\nA collection of examples showcasing the use cases of deepslate.\n\n#### [Render](https://misode.github.io/deepslate/examples/structurerenderer/)\nRendering a simple structure to a canvas, read from an NBT file.\nIncludes mouse controls and loading of an arbitrary resource pack.\n\n![image](https://user-images.githubusercontent.com/17352009/131235802-ed6c6617-f054-4312-b567-f2692196bfaa.png)\n\n#### [Splines](https://misode.github.io/deepslate/examples/splines/)\n![image](https://user-images.githubusercontent.com/17352009/132134408-e140b1f2-d5df-4f6c-9913-6a8a5c01fd3c.png)\n\n#### [Noise](https://misode.github.io/deepslate/examples/noise/)\n![image](https://user-images.githubusercontent.com/17352009/132598742-7f9fc32c-58b7-45f0-8d4b-ae132a94b2b5.png)\n\n#### [MultiNoise](https://misode.github.io/deepslate/examples/multinoise/) \n![image](https://user-images.githubusercontent.com/17352009/132134430-f21970b6-aaa8-4a95-9aa3-a52ea60bc0b0.png)\n\n#### [Chunk Generator](https://misode.github.io/deepslate/examples/chunkgenerator/)\n![image](https://user-images.githubusercontent.com/17352009/132598866-d2d61f8a-0d82-447d-a74b-97401f1a2425.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisode%2Fdeepslate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmisode%2Fdeepslate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmisode%2Fdeepslate/lists"}