{"_id":"@alfiexco/animated-sprite","name":"@alfiexco/animated-sprite","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alfiexco/animated-sprite","version":"0.1.0","description":"A generic autonomous canvas sprite actor for React.","license":"MIT","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"scripts":{"build":"tsup src/index.tsx --format esm,cjs --dts --external react --clean","clean":"node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"","typecheck":"tsc -p tsconfig.json --noEmit"},"peerDependencies":{"react":">=18"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alfredosa/alfies-web-components.git","directory":"packages/animated-sprite"},"_id":"@alfiexco/animated-sprite@0.1.0","gitHead":"90a40b342dc26fd3270eaa1391572be299f2c198","bugs":{"url":"https://github.com/alfredosa/alfies-web-components/issues"},"homepage":"https://github.com/alfredosa/alfies-web-components#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-eTWi3ZQ6t77Ugi1maX4hlVqvjV4YB1MOpSppq4Crd1eAjAlwBkIUTroiXQfww0VHv5jSBGq+m75txA96oijUgQ==","shasum":"e6a673fe8c9c7a4e5e675e88a256b0a34ed8dc6f","tarball":"https://registry.npmjs.org/@alfiexco/animated-sprite/-/animated-sprite-0.1.0.tgz","fileCount":6,"unpackedSize":24499,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alfiexco%2fanimated-sprite@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDVks+NmA1ZzN4yY19TVay+FFyFqL5CCsHWGevMuOcwTAiBDkcSM0gzVsJKZTejaxy/M54XmrVdk0jEOKd03HdGb4g=="}]},"_npmUser":{"name":"alfiexco","email":"alfiexco@proton.me"},"directories":{},"maintainers":[{"name":"alfiexco","email":"alfiexco@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/animated-sprite_0.1.0_1782054399394_0.899509699185276"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T15:06:39.233Z","0.1.0":"2026-06-21T15:06:39.545Z","modified":"2026-06-21T15:06:39.948Z"},"maintainers":[{"name":"alfiexco","email":"alfiexco@proton.me"}],"description":"A generic autonomous canvas sprite actor for React.","homepage":"https://github.com/alfredosa/alfies-web-components#readme","repository":{"type":"git","url":"git+https://github.com/alfredosa/alfies-web-components.git","directory":"packages/animated-sprite"},"bugs":{"url":"https://github.com/alfredosa/alfies-web-components/issues"},"license":"MIT","readme":"# @alfiexco/animated-sprite\n\nGeneric version of the Inksight `Orc` canvas component. The package supplies the\nautonomous idle/walk/action behavior; the host app supplies sprite sheets.\n\n```tsx\nimport { AnimatedSprite } from \"@alfiexco/animated-sprite\";\n\n<AnimatedSprite\n  style={{ height: 280 }}\n  animations={{\n    idle: { src: \"/sprites/Orc_Idle.png\", frames: 6, fps: 8 },\n    walk: { src: \"/sprites/Orc_Walk.png\", frames: 8, fps: 10 },\n    action: { src: \"/sprites/Orc_Attack01.png\", frames: 6, fps: 14 },\n  }}\n/>\n```\n\nAny horizontal sprite sheet works as long as all frames are evenly sized.\n\n## Props\n\n- `animations.idle` is required.\n- `animations.walk` enables autonomous movement between idle periods.\n- `animations.action` enables click-triggered action playback inside the\n  component bounds.\n- `size`, `speedPxPerSecond`, `idleMinMs`, and `idleMaxMs` tune behavior.\n- `mouseAttractionRadius` and `mouseAttractionChance` tune how often the sprite\n  wanders toward the cursor.\n- `onLoadError` receives sprite loading failures.\n\nThe sprite uses the bounds of its parent element, so set a stable height on the\ncomponent or a parent container.\n","readmeFilename":"README.md","_rev":"1-ed77ffc2377d61177e572756f7623a3b"}