{"id":18270689,"url":"https://github.com/lukelutman/CCSVG","last_synced_at":"2025-04-05T01:30:46.501Z","repository":{"id":3431524,"uuid":"4483489","full_name":"lukelutman/CCSVG","owner":"lukelutman","description":"Display SVG images on iOS using Cocos2D","archived":false,"fork":false,"pushed_at":"2012-09-12T17:08:23.000Z","size":178,"stargazers_count":58,"open_issues_count":2,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-05T11:53:06.070Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/lukelutman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-29T14:56:46.000Z","updated_at":"2023-08-27T13:54:47.000Z","dependencies_parsed_at":"2022-09-03T11:10:58.148Z","dependency_job_id":null,"html_url":"https://github.com/lukelutman/CCSVG","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukelutman%2FCCSVG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukelutman%2FCCSVG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukelutman%2FCCSVG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukelutman%2FCCSVG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukelutman","download_url":"https://codeload.github.com/lukelutman/CCSVG/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276043,"owners_count":20912286,"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-11-05T11:38:48.679Z","updated_at":"2025-04-05T01:30:46.060Z","avatar_url":"https://github.com/lukelutman.png","language":"Objective-C","readme":"CCSVG - Display SVG images on iOS using Cocos2D\n===============================================\n\n\n## Overview\n\nCCSVG provides an API for loading, displaying and animating SVG images on iOS using Cocos2D. \n\n\n    // load an svg image\n    CCSVGSource *source;\n    source = [CCSVGSource sourceWithFile:@\"player_idle.svg\"];\n\n    // display an svg image\n    CCSVGSprite *sprite;\n    sprite = [CCSVGSprite spriteWithSource:source];\n    sprite.position = ccp(240,160);\n\n    // create an svg animation\n    CCSVGAnimation *animation;\n    animation = [CCSVGAnimation animationWithSourcesNamed:@\"player_walk_%04d.svg\" \n                                                    count:2 \n                                                    delay:1.0/15.0];\n\n    // run the animation on the sprite\n    CCSVGAnimate *animate;\n    animate = [CCSVGAnimate actionWithSVGAnimation:animation];\n    [sprite runAction:[CCRepeatForever actionWithAction:animate]]; \n\n\n## Benefits\n\nSVG images are displayed as vector data, not textures. Each file is tesselated and cached in a vertex buffer object, so the peformance penalty of tesselating and uploading the geometry to OpenGL only happens once when the file is first loaded.\n\n* Resolution-independence.\n* Smaller file size. \n* Smaller memory footprint.\n* Faster load times.\n\n\n## Drawbacks\n\nThere is a significant performance penalty for using images with transparent fills or strokes (drawing them properly means turning on blending in OpenGL). Avoid them where possible.\n\n* Incomplete SVG support (see [what is implemented](https://github.com/micahpearlman/MonkVG/blob/master/README.md#what-is-implemented) in MonkVG).\n* Antialiasing requires multisampling to be enabled, which has a performance penalty.\n\n\n## Installation\n\n    git clone git@github.com:lukelutman/CCSVG.git\n    git submodule init\n    git submodule update\n\n\n## Dependencies\n\n* [cocos2d-iphone v1.1.0-beta2b](https://github.com/cocos2d/cocos2d-iphone)\n* [MonkVG](https://github.com/lukelutman/MonkVG) by [Micah Pearlman](https://github.com/micahpearlman)\n* [MonkSVG](https://github.com/lukelutman/MonkSVG) by [Micah Pearlman](https://github.com/micahpearlman)\n\n## Resources\n\n* [flash2svg Extension](http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail\u0026loc=en_us\u0026extid=2422028) for exporting SVG images from Flash","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukelutman%2FCCSVG","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukelutman%2FCCSVG","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukelutman%2FCCSVG/lists"}