{"id":16332838,"url":"https://github.com/eight04/fumen-svg","last_synced_at":"2025-11-01T16:30:29.496Z","repository":{"id":57242868,"uuid":"228894442","full_name":"eight04/fumen-svg","owner":"eight04","description":"Convert fumen data into animated SVG","archived":false,"fork":false,"pushed_at":"2019-12-20T06:14:20.000Z","size":261,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T04:07:59.904Z","etag":null,"topics":["fumen","svg","tetris"],"latest_commit_sha":null,"homepage":null,"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/eight04.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}},"created_at":"2019-12-18T17:57:55.000Z","updated_at":"2020-09-27T18:54:21.000Z","dependencies_parsed_at":"2022-09-15T00:50:43.069Z","dependency_job_id":null,"html_url":"https://github.com/eight04/fumen-svg","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eight04%2Ffumen-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eight04%2Ffumen-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eight04%2Ffumen-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eight04%2Ffumen-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eight04","download_url":"https://codeload.github.com/eight04/fumen-svg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239302506,"owners_count":19616549,"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":["fumen","svg","tetris"],"created_at":"2024-10-10T23:33:15.131Z","updated_at":"2025-11-01T16:30:29.443Z","avatar_url":"https://github.com/eight04.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"fumen-svg\n==============================\n\n[![Build Status](https://travis-ci.org/eight04/fumen-svg.svg?branch=master)](https://travis-ci.org/eight04/fumen-svg)\n[![codecov](https://codecov.io/gh/eight04/fumen-svg/branch/master/graph/badge.svg)](https://codecov.io/gh/eight04/fumen-svg)\n[![install size](https://packagephobia.now.sh/badge?p=fumen-svg)](https://packagephobia.now.sh/result?p=fumen-svg)\n\nConvert fumen data into animated SVG.\n\n![example](https://raw.githack.com/eight04/fumen-svg/master/example.svg)\n\nInstallation\n------------\n\n```\nnpm install fumen-svg\n```\n\nUsage\n-----\n\n```js\nconst {createSVG} = require(\"fumen-svg\");\n\nconst output = createSVG({\n  data: FUMEN_DATA\n});\n\n// save to the disk\nconst fs = require(\"fs\");\nfs.writeFileSync(\"animated.svg\", output);\n```\n\nAPI\n----\n\nThis module exports following members:\n\n* `createSVG`\n\n### createSVG\n\n```js\ncreateSVG({\n  data: String,\n  index?: Number,\n  delay?: Number,\n  size?: Number,\n  comment?: String\n}) =\u003e output: String\n```\n\n`data` is the fumen data.\n\nIf `index` is specified, create an SVG of the specified frame instead of an animated image.\n\n`delay` controls the delay between each frame. Unit: ms. Default: `500`.\n\n`size` is the width/height of a single tile. Unit: px. Default: `16`.\n\nUse `comment` to control whether to draw the comment box. Available values:\n\n* `\"always\"` - always draw the comment box.\n* `\"none\"` - don't draw the comment box.\n* `\"auto\"` (default) - draw the comment box if there is a comment.\n\nChangelog\n---------\n\n* 0.1.5 (Dec 20, 2019)\n\n  - Fix: reuse comment background.\n  - Change: alter the color of T.\n\n* 0.1.4 (Dec 19, 2019)\n\n  - Fix: lines to be cleared should be lighten.\n\n* 0.1.3 (Dec 19, 2019)\n\n  - Fix: draw background before minos.\n  - Fix: can't fill piece error.\n  - Fix: images height is not an integer.\n  - Fix: remove duplicated comment.\n  - Add: grid to background.\n\n* 0.1.2 (Dec 19, 2019)\n\n  - Add: `comment` option.\n\n* 0.1.1 (Dec 19, 2019)\n\n  - Fix: deps.\n\n* 0.1.0 (Dec 19, 2019)\n\n  - Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feight04%2Ffumen-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feight04%2Ffumen-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feight04%2Ffumen-svg/lists"}