{"id":24429461,"url":"https://github.com/naol-bm/react-model-loader","last_synced_at":"2026-02-12T08:05:03.872Z","repository":{"id":257424611,"uuid":"858221235","full_name":"Naol-bm/react-model-loader","owner":"Naol-bm","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-16T16:15:54.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-08T21:55:25.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/Naol-bm.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-16T14:19:04.000Z","updated_at":"2024-09-16T16:15:58.000Z","dependencies_parsed_at":"2024-09-16T17:19:17.600Z","dependency_job_id":"f7517ba5-82a2-4c36-a91f-cce40cfe55cc","html_url":"https://github.com/Naol-bm/react-model-loader","commit_stats":null,"previous_names":["naol-bm/react-model-loader"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naol-bm%2Freact-model-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naol-bm%2Freact-model-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naol-bm%2Freact-model-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Naol-bm%2Freact-model-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Naol-bm","download_url":"https://codeload.github.com/Naol-bm/react-model-loader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234797442,"owners_count":18888234,"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":[],"created_at":"2025-01-20T13:36:35.294Z","updated_at":"2026-02-12T08:04:58.843Z","avatar_url":"https://github.com/Naol-bm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Model Loader\n\n`react-model-loader` is a React component for loading 3D models with support for OBJ, GLTF, GLB, FBX, and STL formats. This component uses Three.js and `@react-three/fiber` to render 3D models in a React application. You can also customize the background with a color or image.\n\n## Installation\n\nYou can install `react-model-loader` via npm, yarn, or pnpm:\n\n```sh\nnpm install react-model-loader\n```\n\nOr with yarn:\n\n```sh\nyarn add react-model-loader\n```\n\nOr with pnpm:\n\n```sh\npnpm add react-model-loader\n```\n\n## Usage\n\nOnce installed, you can use the `ModelLoader` component in your React application. Here’s an example:\n\n```jsx\nimport React from \"react\";\nimport ModelLoader from \"react-model-loader\";\n\nfunction App() {\n  return (\n    \u003cdiv style={{ height: \"100vh\", width: \"100%\" }}\u003e\n      \u003cModelLoader\n        // Required: URL or local path to your 3D model file\n        modelPath=\"path/to/your/model.glb\"\n        // Optional: Props\n        backgroundColor=\"#f0f0f0\"\n        backgroundImage=\"path/to/your/background.jpg\"\n        className=\"h-full w-full\"\n      /\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default App;\n```\n\n## Props\n\nThe `ModelLoader` component accepts the following props:\n\n- **`modelPath`** (string, required): The URL or local path to the model file. Supported formats include OBJ, GLTF, GLB, FBX, and STL.\n\n- **`backgroundColor`** (string, optional): A hex color code (e.g., `#ffffff`) to set the background color. If not provided, the background will be transparent.\n\n- **`backgroundImage`** (string, optional): A URL to an image that will be used as the background. If provided, it will override the `backgroundColor` prop. If neither is provided, the background will be transparent.\n\n## Development\n\nTo contribute to this project or use it in development mode, clone the repository and run:\n\n```sh\n# Install dependencies\npnpm install\n\n# Start development server\npnpm dev\n```\n\n## Building\n\nTo build the package for production:\n\n```sh\npnpm run build\n```\n\n## Author\n\n[NaolBm](https://twitter.com/NaolBm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaol-bm%2Freact-model-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaol-bm%2Freact-model-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaol-bm%2Freact-model-loader/lists"}