{"id":22859417,"url":"https://github.com/yohn/imgpiecer","last_synced_at":"2025-07-05T00:02:29.655Z","repository":{"id":264462135,"uuid":"893308966","full_name":"Yohn/ImgPiecer","owner":"Yohn","description":"A small vanilla javascript class to impode and explode an image","archived":false,"fork":false,"pushed_at":"2024-12-01T15:56:42.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T12:48:01.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://yohn.github.io/ImgPiecer/index.html","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/Yohn.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":"2024-11-24T04:48:23.000Z","updated_at":"2024-12-01T15:56:46.000Z","dependencies_parsed_at":"2025-02-06T12:41:39.408Z","dependency_job_id":"6d7ff67d-55d1-4799-842e-e3b71c1a4c56","html_url":"https://github.com/Yohn/ImgPiecer","commit_stats":null,"previous_names":["yohn/imgpiecer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FImgPiecer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FImgPiecer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FImgPiecer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yohn%2FImgPiecer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yohn","download_url":"https://codeload.github.com/Yohn/ImgPiecer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436340,"owners_count":20776995,"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":"2024-12-13T09:06:53.541Z","updated_at":"2025-03-31T08:20:21.636Z","avatar_url":"https://github.com/Yohn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ImgPiecer - Dynamic Image Animation Library\n\n## [Check out the Demo](https://yohn.github.io/ImgPiecer/index.html)\n\nA lightweight JavaScript library for creating stunning image animations with customizable piece-by-piece effects.\n\n## Installation\n\n```html\n\u003cscript src=\"ImgPiecer.js\"\u003e\u003c/script\u003e\n```\n\n## Basic Usage\n\n```javascript\nconst container = document.getElementById('animation-container');\nconst piecer = new ImgPiecer(container, {\n    imageUrl: 'path/to/image.jpg',\n    rows: 5,\n    columns: 5,\n    direction: 'spiral'\n});\n```\n\n## Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| imageUrl | string | '' | URL of the image to animate |\n| rows | number | 5 | Number of rows to split the image into |\n| columns | number | 5 | Number of columns to split the image into |\n| animationDuration | number | 1 | Duration of animation in seconds |\n| direction | string | 'top' | Animation effect to use |\n| initialOpacity | number | 0 | Starting opacity of pieces (0-1) |\n| spin | boolean | false | Enable rotation during animation |\n\n## Animation Effects\n\n### Basic Directional Effects\n- `left` - Pieces enter from left\n- `right` - Pieces enter from right\n- `top` - Pieces enter from top\n- `bottom` - Pieces enter from bottom\n\n### Curtain Effects\n- `curtain-left` - Pieces sweep in from left like a curtain\n- `curtain-right` - Pieces sweep in from right like a curtain\n- `curtain-top` - Pieces sweep in from top like a curtain\n- `curtain-bottom` - Pieces sweep in from bottom like a curtain\n\n### Complex Effects\n- `explode` - Pieces explode outward from their positions\n- `implode` - Pieces fly in from outside toward their positions\n- `spiral` - Pieces form a spiral pattern before assembling\n- `wave` - Pieces move in a wave-like motion\n- `grow-in` - Pieces grow from small to full size\n- `grow-out` - Pieces shrink from large to normal size\n- `domino` - Pieces appear in a diagonal cascade\n- `vortex` - Pieces swirl in from the edges\n- `shutter` - Pieces flip in like window shutters\n- `hypno` - Complex spiral motion with 3D rotation\n\n## Effect-Specific Notes\n\n### Spin Option Compatibility\nThe `spin` option works best with:\n- All directional effects (left, right, top, bottom)\n- Implode\n- Vortex\n- Wave\n\nNot recommended with:\n- Shutter (has built-in rotation)\n- Hypno (has complex built-in motion)\n- Grow-in/Grow-out (interferes with scaling)\n\n### Initial Opacity Notes\n- `initialOpacity` has no effect on `explode` (starts fully visible)\n- For best results with `hypno`, keep `initialOpacity` at 0\n\n### Animation Duration\n- `hypno` effect automatically extends duration by 6x for smoother motion\n- `spiral` splits duration into three phases (formation, assembly, expansion)\n- `wave` effect uses duration for each column's movement\n\n## Performance Considerations\n\n1. Image Size\n   - Recommended maximum image size: 1920x1080px\n   - Larger images may cause performance issues on mobile devices\n\n2. Grid Size\n   - Recommended maximum: 10x10 grid (100 pieces)\n   - Complex effects (hypno, spiral) work best with 5x5 to 8x8 grids\n\n3. Browser Support\n   - Requires modern browser with CSS transform support\n   - 3D effects (hypno, shutter) require CSS transform-style: preserve-3d\n\n## Examples\n\n### Basic Animation\n```javascript\nnew ImgPiecer(container, {\n    imageUrl: 'image.jpg',\n    rows: 5,\n    columns: 5,\n    direction: 'spiral'\n});\n```\n\n### Complex Animation with Options\n```javascript\nnew ImgPiecer(container, {\n    imageUrl: 'image.jpg',\n    rows: 8,\n    columns: 8,\n    direction: 'hypno',\n    animationDuration: 2,\n    initialOpacity: 0,\n    spin: false\n});\n```\n\n### Mobile-Optimized Configuration\n```javascript\nnew ImgPiecer(container, {\n    imageUrl: 'image.jpg',\n    rows: 4,\n    columns: 4,\n    direction: 'wave',\n    animationDuration: 1.5,\n    spin: false\n});\n```\n\n## Browser Support\n- Chrome 49+\n- Firefox 52+\n- Safari 10+\n- Edge 79+\n- Opera 36+\n\n## License\nMIT License - feel free to use in personal and commercial projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohn%2Fimgpiecer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyohn%2Fimgpiecer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyohn%2Fimgpiecer/lists"}