{"id":15493480,"url":"https://github.com/sinclairzx81/three-instanced-mesh","last_synced_at":"2026-06-11T06:31:07.642Z","repository":{"id":66035008,"uuid":"165975490","full_name":"sinclairzx81/three-instanced-mesh","owner":"sinclairzx81","description":"A reference project enabling geometry instancing for threejs materials","archived":false,"fork":false,"pushed_at":"2019-04-28T15:00:29.000Z","size":384,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-19T11:12:19.806Z","etag":null,"topics":["geometry-instancing","materials","shadow-mapping","three"],"latest_commit_sha":null,"homepage":"","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/sinclairzx81.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":"2019-01-16T04:48:09.000Z","updated_at":"2020-04-01T13:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"862e7918-0024-4fbe-ab6f-3fd3067826fd","html_url":"https://github.com/sinclairzx81/three-instanced-mesh","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"3d4a796948d0ddd7b9d5064b935ee05a2d431e90"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sinclairzx81/three-instanced-mesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fthree-instanced-mesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fthree-instanced-mesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fthree-instanced-mesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fthree-instanced-mesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinclairzx81","download_url":"https://codeload.github.com/sinclairzx81/three-instanced-mesh/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fthree-instanced-mesh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34186384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["geometry-instancing","materials","shadow-mapping","three"],"created_at":"2024-10-02T08:07:04.621Z","updated_at":"2026-06-11T06:31:07.625Z","avatar_url":"https://github.com/sinclairzx81.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# three-instanced-mesh\n\nA reference project enabling geometry instancing for threejs' MeshStandardMaterial.\n\n```typescript\nimport * as THREE from 'three'\nimport { InstancedMesh } from './instanced/mesh'\n\n...\nconst geometry = new THREE.BoxBufferGeometry(1, 1, 1)\nconst material = new THREE.MeshStandardMaterial({\n  color: 0x888888,\n  metalness: 0.1,\n  roughness: 0.4,\n})\n// create 4096 instances of this mesh\nconst mesh = new InstancedMesh(4096, geometry, material)\nfor(const instance of mesh.instances) {\n  instance.position.x = (Math.random() * 16) - 8\n  instance.position.y = (Math.random() * 16) - 8\n  instance.position.z = (Math.random() * 16) - 8\n}\nmesh.updateInstances()\n\n```\n\n### overview\n\nThis project is a small reference project for enabling geometry instancing for threejs and having it integrate with threes existing material and shadow mapping pipeline. This project provides reference `depth`, `distance` and `standard` material shaders and a small demo.\n\nA demo of this project can be found [here](https://codepen.io/anon/pen/wZOrKd)\n\n\n![alt text](./dist/screenshot.png \"screenshot\")\n\n### running locally\n\nEnsure nodejs is installed. Clone this project and run.\n```\nnpm start\n```\nThis will start a watch server on `http://localhost:5000`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinclairzx81%2Fthree-instanced-mesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinclairzx81%2Fthree-instanced-mesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinclairzx81%2Fthree-instanced-mesh/lists"}