{"id":18647612,"url":"https://github.com/artcom/react-three-arjs","last_synced_at":"2025-04-06T04:08:58.026Z","repository":{"id":37400309,"uuid":"342262621","full_name":"artcom/react-three-arjs","owner":"artcom","description":"AR.js with react-three-fiber ","archived":false,"fork":false,"pushed_at":"2023-08-22T11:12:39.000Z","size":3451,"stargazers_count":188,"open_issues_count":23,"forks_count":45,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-03-30T03:05:54.236Z","etag":null,"topics":["arjs","react","react-three-fiber","threejs"],"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/artcom.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-02-25T14:00:54.000Z","updated_at":"2025-03-24T01:55:34.000Z","dependencies_parsed_at":"2024-06-20T18:57:50.992Z","dependency_job_id":null,"html_url":"https://github.com/artcom/react-three-arjs","commit_stats":{"total_commits":174,"total_committers":6,"mean_commits":29.0,"dds":"0.26436781609195403","last_synced_commit":"a6112f27b285d583ee21df9b4662db38ac4913d3"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Freact-three-arjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Freact-three-arjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Freact-three-arjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/artcom%2Freact-three-arjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/artcom","download_url":"https://codeload.github.com/artcom/react-three-arjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430868,"owners_count":20937874,"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":["arjs","react","react-three-fiber","threejs"],"created_at":"2024-11-07T06:27:09.793Z","updated_at":"2025-04-06T04:08:58.000Z","avatar_url":"https://github.com/artcom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @artcom/react-three-arjs\r\n\r\nReact components and hooks for creating [AR.js](https://github.com/AR-js-org/AR.js) applications with [react-three-fiber](https://github.com/pmndrs/react-three-fiber)\r\n\r\n\r\n```\r\nnpm i @artcom/react-three-arjs\r\n```\r\n\r\n## Usage\r\n\r\nProvide a [camera_para.dat](./example/data/camera_para.dat) file in your public folder, default path is `data/camera_para.dat`. See the [example](./example).\r\n\r\n```jsx\r\nimport ReactDOM from \"react-dom\"\r\nimport React from \"react\"\r\n\r\nimport { ARCanvas, ARMarker } from \"@artcom/react-three-arjs\"\r\n\r\nReactDOM.render(\r\n  \u003cARCanvas\r\n    camera={ { position: [0, 0, 0] } }\r\n    onCreated={ ({ gl }) =\u003e {\r\n      gl.setSize(window.innerWidth, window.innerHeight)\r\n    } }\u003e\r\n    \u003cambientLight /\u003e\r\n    \u003cpointLight position={ [10, 10, 0] }  /\u003e\r\n    \u003cARMarker\r\n      type={ \"pattern\" }\r\n      patternUrl={ \"data/hiro.patt\" }\u003e\r\n      \u003cmesh\u003e\r\n        \u003cboxBufferGeometry args={ [1, 1, 1] } /\u003e\r\n        \u003cmeshStandardMaterial color={ \"green\" } /\u003e\r\n      \u003c/mesh\u003e\r\n    \u003c/ARMarker\u003e\r\n  \u003c/ARCanvas\u003e,\r\n  document.getElementById(\"root\")\r\n)\r\n\r\n```\r\n### Demo\r\n\u003cimg src=\"https://user-images.githubusercontent.com/4621891/166238675-ba41e5ad-bed9-4b47-9890-b5523377b513.png\" width=\"200\" /\u003e\u0026emsp;\u003cimg src=\"https://user-images.githubusercontent.com/4621891/166239728-ea12ad2a-52b6-4e5a-a23c-d2dc48c48a7c.png\" width=\"200\" /\u003e\r\n\r\n* [CodeSandbox Demo](https://codesandbox.io/s/jolly-hodgkin-ssu33)\r\n\r\n## API\r\n\r\n### ARCanvas\r\n\r\n```jsx\r\n\u003cARCanvas\r\n  children                                        // regular children\r\n  arEnabled                                       // if false, it will render children into \u003cCanvas /\u003e without AR context\r\n  tracking                                        // if false, it will stop tracking\r\n  patternRatio = 0.5                              // passed to arToolkit context ¹\r\n  detectionMode = \"mono_and_matrix\"               // passed to arToolkit context ¹\r\n  cameraParametersUrl = \"data/camera_para.dat\"    // passed to arToolkit context ¹\r\n  matrixCodeType = \"3x3\"                          // passed to arToolkit context ¹\r\n  onCameraStreamReady                             // callback which will be invoked when camera stream starts\r\n  onCameraStreamError                             // callback which will be invoked when camera stream fails, e.g.: permissions\r\n  sourceType = \"webcam\"                           // set camera source type, see ar.js code ²\r\n  ...props                                        // props are passed to the r3f canvas ³\r\n/\u003e                                                \r\n```\r\n\r\n\u003csup\u003e1\u003c/sup\u003e https://ar-js-org.github.io/AR.js-Docs/marker-based/#threejs\r\n\r\n\u003csup\u003e2\u003c/sup\u003e https://github.com/AR-js-org/AR.js/blob/00fc2a92af1a756600eb53a57a84f101a2c0435f/three.js/src/threex/threex-artoolkitsource.js#L11-L26\r\n\r\n\u003csup\u003e3\u003c/sup\u003e https://docs.pmnd.rs/react-three-fiber/api/canvas\r\n\r\n### ARMarker\r\n\r\n```jsx\r\n\u003cARMarker\r\n  children                        // regular children\r\n  type                            // arToolkit marker type, \"barcode\" or \"pattern\"\r\n  barcodeValue                    // if type=\"barcode\", its algorithmic value\r\n  patternUrl                      // if type=\"pattern\", a link to its pattern file\r\n  params                          // object which accepts all marker settings ¹, e.g. params = {{ smooth: true }}\r\n  onMarkerFound                   // callback which will be invoked when marker has been found\r\n  onMarkerLost                    // callback which will be invoked when previously found marker has been lost\r\n/\u003e\r\n```\r\n\r\n\u003csup\u003e1\u003c/sup\u003e https://ar-js-org.github.io/AR.js-Docs/marker-based/#api-reference-for-marker-based\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Freact-three-arjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartcom%2Freact-three-arjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartcom%2Freact-three-arjs/lists"}