{"id":15407545,"url":"https://github.com/jarred-sumner/transvoxel-data","last_synced_at":"2026-06-08T13:31:48.968Z","repository":{"id":57379240,"uuid":"312923338","full_name":"Jarred-Sumner/transvoxel-data","owner":"Jarred-Sumner","description":"Transvoxel tables for JavaScript","archived":false,"fork":false,"pushed_at":"2020-11-14T23:59:02.000Z","size":105,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T08:12:04.433Z","etag":null,"topics":["3d","marching-cubes","terrain-rendering","transvoxel","voxel"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jarred-Sumner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-14T23:47:20.000Z","updated_at":"2024-11-12T06:00:09.000Z","dependencies_parsed_at":"2022-09-02T18:22:54.274Z","dependency_job_id":null,"html_url":"https://github.com/Jarred-Sumner/transvoxel-data","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jarred-Sumner%2Ftransvoxel-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jarred-Sumner%2Ftransvoxel-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jarred-Sumner%2Ftransvoxel-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jarred-Sumner%2Ftransvoxel-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jarred-Sumner","download_url":"https://codeload.github.com/Jarred-Sumner/transvoxel-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241139369,"owners_count":19916464,"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":["3d","marching-cubes","terrain-rendering","transvoxel","voxel"],"created_at":"2024-10-01T16:29:03.874Z","updated_at":"2026-06-08T13:31:48.936Z","avatar_url":"https://github.com/Jarred-Sumner.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Transvoxel tables for JavaScript\n\nThis is the data used for the [Transvoxel algorithm](https://transvoxel.org/) exposed as an npm package. All I did was take the `./Transvoxel.h` file and convert it into TypeScript.\n\nThe built package includes `esm`, `iife` and `commonjs` versions as well as type definitions.\n\nThe browser version defaults to `esm`, the Node version defaults to `commonjs`.\n\nOne performance consideration I haven't evaluated yet is whether it's better to make all of the data a single large `ArrayBuffer` instead of classes. One advantage lower level languages have that JavaScript doesn't make easy is structs and inlining. This is likely a case where you'd want to do that. But if its a problem in my usecase, I'll fix it here.\n\nIf you're running in a browser which doesn't support ESM, try using `transvoxel-iife.js`.\n\n### Installation\n\nyarn:\n\n```bash\nyarn add transvoxel-data\n```\n\nnpm:\n\n```bash\nnpm install transvoxel-data\n```\n\n### Usage\n\nThis doesn't implement the Transvoxel algorithm – just the data.\n\nHere's most of what you can `import` or `require` from `transvoxel-data`:\n\n```ts\nexport declare class CellData {\n  geometryCounts: number;\n  vertexIndex: number[] | Uint8Array;\n  vertexCount: number;\n  triangleCount: number;\n  constructor(geometryCounts: number, vertexIndex: Uint8Array);\n  static getVertexCount(geometryCounts: number): number;\n  static getTriangleCount(geometryCounts: number): number;\n}\nexport declare class RegularCellData extends CellData {\n  vertexIndex: VertexIndexList;\n}\nexport declare class TransitionCellData extends CellData {\n  vertexIndex: TransitionVertexIndexList;\n}\nexport declare const regularCellClass: Uint8Array;\nexport declare const regularCellData: RegularCellData[];\nexport declare function getLocalIndexA(edgeCode: number): number;\nexport declare function getLocalIndexB(edgeCode: number): number;\nexport declare const regularVertexData: number[][];\nexport declare const transitionCellClass: number[];\nexport declare const transitionCornerData: number[];\nexport declare const transitionVertexData: number[][];\nexport {};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarred-sumner%2Ftransvoxel-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarred-sumner%2Ftransvoxel-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarred-sumner%2Ftransvoxel-data/lists"}