{"id":14981286,"url":"https://github.com/activeguild/react-three-animation","last_synced_at":"2025-04-13T23:45:46.796Z","repository":{"id":211249827,"uuid":"728458447","full_name":"activeguild/react-three-animation","owner":"activeguild","description":"A library supports image animation using react-three-fiber. The target files are APNG and GIFfiles.","archived":false,"fork":false,"pushed_at":"2024-01-13T16:13:08.000Z","size":1265,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T00:35:02.554Z","etag":null,"topics":["animation","apng","gif","react","react-three-fiber","texture","threejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/activeguild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","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":"2023-12-07T01:35:09.000Z","updated_at":"2024-07-03T14:01:44.000Z","dependencies_parsed_at":"2023-12-09T07:14:25.367Z","dependency_job_id":"0ca8b366-451f-4c86-9a71-379752a9a348","html_url":"https://github.com/activeguild/react-three-animation","commit_stats":{"total_commits":66,"total_committers":2,"mean_commits":33.0,"dds":"0.045454545454545414","last_synced_commit":"8e00b38fd6925719fd93cea6695e67fc0e8209f9"},"previous_names":["activeguild/animation-texture","activeguild/animationtexture","activeguild/react-three-animation"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeguild%2Freact-three-animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeguild%2Freact-three-animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeguild%2Freact-three-animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/activeguild%2Freact-three-animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/activeguild","download_url":"https://codeload.github.com/activeguild/react-three-animation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799693,"owners_count":21163398,"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":["animation","apng","gif","react","react-three-fiber","texture","threejs"],"created_at":"2024-09-24T14:03:15.695Z","updated_at":"2025-04-13T23:45:46.753Z","avatar_url":"https://github.com/activeguild.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ereact-three-animation ⚡ Welcome 😀\u003c/h1\u003e\n\n\u003cp align=\"left\"\u003e\n  \u003ca href=\"https://github.com/actions/setup-node\"\u003e\u003cimg alt=\"GitHub Actions status\" src=\"https://github.com/activeguild/react-three-animation/workflows/automatic%20release/badge.svg\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# react-three-animation\n\nA library supports image animation using `react-three-fiber`. The target files are `APNG` and `GIF` files. \u003cbr/\u003e\nIf there is only one frame, a still image is displayed.\u003cbr/\u003e\nThe animate, pause, and reset methods can be called from the texture.\n\n## Install\n\n```bash\nnpm i react-three-animation\n```\n\n## Demo\n\n\u003cimg src=\"https://github.com/activeguild/react-three-animation/assets/39351982/00acf5d7-2077-4618-aef3-8a0be4b609d2\" height=\"160\" /\u003e\n\n## Usage\n\n```ts\nimport React, { useRef, useEffect } from \"react\";\nimport * as THREE from \"three\";\nimport { useAnimationTexture } from \"react-three-animation\";\n\ninterface Props {\n  url: string;\n}\n\nexport function Model({ url }: Props) {\n  const { animationTexture } = useAnimationTexture({ url });\n  const meshRef = useRef();\n\n  useEffect(() =\u003e {\n    if (meshRef.current \u0026\u0026 animationTexture) {\n      meshRef.current.material.map = animationTexture;\n      meshRef.current.material.needsUpdate = true;\n    }\n  }, [animationTexture]);\n\n  return (\n    \u003cmesh ref={meshRef} position={new THREE.Vector3(0, 0, 0)}\u003e\n      \u003cplaneGeometry args={[1, 1]} /\u003e\n      \u003cmeshBasicMaterial transparent side={THREE.FrontSide} /\u003e\n    \u003c/mesh\u003e\n  );\n}\n```\n\n#### Pre-load if necessary.\n\n```ts\nimport React from \"react\";\nimport * as THREE from \"three\";\nimport { preLoad } from \"react-three-animation\";\n\nexport default function App() {\n  preLoad('/sample.png');\n  return ...\n}\n\n```\n\n## Principles of conduct\n\nPlease see [the principles of conduct](https://github.com/activeguild/react-three-animation/blob/main/.github/CONTRIBUTING.md) when building a site.\n\n## License\n\nThis library is licensed under the [MIT license](https://github.com/activeguild/react-three-animation/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiveguild%2Freact-three-animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factiveguild%2Freact-three-animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factiveguild%2Freact-three-animation/lists"}