{"id":16153314,"url":"https://github.com/danielesteban/obj-loader","last_synced_at":"2026-02-08T12:04:31.061Z","repository":{"id":43006576,"uuid":"193434649","full_name":"danielesteban/obj-loader","owner":"danielesteban","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-12T04:14:08.000Z","size":11,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-02T11:55:12.154Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danielesteban.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":"2019-06-24T04:39:30.000Z","updated_at":"2019-11-05T23:49:55.000Z","dependencies_parsed_at":"2023-01-22T19:45:36.515Z","dependency_job_id":null,"html_url":"https://github.com/danielesteban/obj-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielesteban/obj-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fobj-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fobj-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fobj-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fobj-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielesteban","download_url":"https://codeload.github.com/danielesteban/obj-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielesteban%2Fobj-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29229386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T12:03:03.049Z","status":"ssl_error","status_checked_at":"2026-02-08T12:02:56.077Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-10T01:11:12.245Z","updated_at":"2026-02-08T12:04:31.026Z","avatar_url":"https://github.com/danielesteban.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"obj-loader\n===\n\n[![dependencies Status](https://david-dm.org/danielesteban/obj-loader/status.svg)](https://david-dm.org/danielesteban/obj-loader)\n[![devDependencies Status](https://david-dm.org/danielesteban/obj-loader/dev-status.svg)](https://david-dm.org/danielesteban/obj-loader?type=dev)\n\n### Webpack config\n\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.obj$/,\n        loader: 'obj-loader',\n      },\n    ],\n  },\n};\n```\n\n### Client usage\n\n```js\nimport pako from 'pako';\nimport Model from '@/models/model.obj';\n\nfunction FetchModel(url) {\n  return fetch(url)\n    .then(res =\u003e res.arrayBuffer())\n    .then((deflated) =\u003e {\n      const { buffer } = pako.inflate(new Uint8Array(deflated));\n      let offset = 0;\n      const indexCount = new Uint16Array(buffer, offset, 1)[0];\n      offset += Uint16Array.BYTES_PER_ELEMENT;\n      const index = new Uint16Array(buffer, offset, indexCount);\n      offset += Uint16Array.BYTES_PER_ELEMENT * indexCount;\n      const vertexCount = new Uint16Array(buffer, offset, 1)[0];\n      offset += Uint16Array.BYTES_PER_ELEMENT;\n      const position = new Float32Array(buffer, offset, vertexCount);\n      offset += Float32Array.BYTES_PER_ELEMENT * vertexCount;\n      const normal = new Float32Array(buffer, offset, vertexCount);\n      return {\n        index,\n        position,\n        normal,\n      };\n    });\n}\n\nFetchModel(Monkey)\n  .then(({ index, position, normal }) =\u003e {\n    const geometry = new BufferGeometry();\n    geometry.setIndex(new BufferAttribute(index, 1));\n    geometry.addAttribute('position', new BufferAttribute(position, 3));\n    geometry.addAttribute('normal', new BufferAttribute(normal, 3));\n  });\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielesteban%2Fobj-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielesteban%2Fobj-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielesteban%2Fobj-loader/lists"}