{"id":18271555,"url":"https://github.com/GloryFish/Cocos2D-Iris-Effects","last_synced_at":"2025-04-05T02:30:32.047Z","repository":{"id":136978978,"uuid":"943678","full_name":"GloryFish/Cocos2D-Iris-Effects","owner":"GloryFish","description":"Iris-style effects for use in Cocos2D projects. ","archived":false,"fork":false,"pushed_at":"2011-03-07T20:32:29.000Z","size":464,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-05T11:54:01.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://gloryfish.org","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GloryFish.png","metadata":{"files":{"readme":"README.mdown","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":"2010-09-27T20:36:52.000Z","updated_at":"2019-01-20T03:37:37.000Z","dependencies_parsed_at":"2023-03-15T15:31:02.571Z","dependency_job_id":null,"html_url":"https://github.com/GloryFish/Cocos2D-Iris-Effects","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/GloryFish%2FCocos2D-Iris-Effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GloryFish%2FCocos2D-Iris-Effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GloryFish%2FCocos2D-Iris-Effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GloryFish%2FCocos2D-Iris-Effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GloryFish","download_url":"https://codeload.github.com/GloryFish/Cocos2D-Iris-Effects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279166,"owners_count":20912846,"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:39:22.670Z","updated_at":"2025-04-05T02:30:31.746Z","avatar_url":"https://github.com/GloryFish.png","language":"Objective-C","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"# Cocos2D Iris Effects\n\nThis project contains two classes which provide iris style effects for Cocos2D projects. The classes depend on the gfDrawFilledRect() and gfDrawInvertedCircle() functions contained in GFDrawingPrimitives.h.\n\nThis project has been updated to support Retina displays. (Thanks [snakewa](https://github.com/snakewa)!)\n\n## CCTransitionIris\n\nThis is a scene transition which presents a closing iris over the outgoing scene which subsequently opens on the incoming scene. The iris shape can be customized.\n\n### Basic usage:\n\n\u003cpre\u003e\n   CGPoint center = ccp([CCDirector sharedDirector].winSize.width / 2, \n                        [CCDirector sharedDirector].winSize.height / 2);\n   \n   \n   CCTransition* trans = [CCTransitionIris transitionWithDuration:2.0f \n                                           scene:scene \n                                           irisPosition:center \n                                           radius:0.0f \n                                           color:ccBLACK];\n\n   [[CCDirector sharedDirector] replaceScene:trans];\n\u003c/pre\u003e\n\nIn this case we create a transition which will close over the outgoing scene with a circular shape. The screen will be filled entirely with black and will then open on the incoming scene. \n\nThe total duration of the closing and opening is 2 seconds. \n\nBecause we aren't using a sprite mask the transition draws the entire overlay using OpenGL calls for maximum crispness.\n\n\n\n### Here's a more advanced example:\n\n\u003cpre\u003e\n   CGPoint center = ccp(300, 300);\n   \n   CCTransition* trans = [CCTransitionIris transitionWithDuration:2.0f \n                                           scene:scene \n                                           irisPosition:center \n                                           radius:0.0f \n                                           color:ccRED\n                                           mask:@\"mask-star-128.png\"];\n\n   [[CCDirector sharedDirector] replaceScene:trans];\n\u003c/pre\u003e\n\nHere we use an offset point for the irisPosition. We could use the location of a touch or a character on screen. \n\nThe radius is still 0, however if we wanted the iris to not close completely we could increase that value. This could be used to highlight a particular onscreen element which will carry over from one scene to another.\n\nThe mask parameter is the name of a square sprite which will be used as the opening for the iris. The mask should be fully white at the edges and fully transparent in the center for best results. The sprite will be rendered in the color specified by the color parameter. \n\nYou can supply any size sprite for the mask, however higher resolution sprites will have a crisper edge when enlarged. If you just want a circle, omit the mask parameter and the iris will be drawn using OpenGL and will look much better.\n\n\n## CCSpotlight\n\nTODO: Create spotlight\n\n\n## Other info\n\nThis has been tested with Cocos2D 0.99.5 Beta 3\n\nI'm sure this code can be improved. Can't wait to hear your suggestions and corrections. \n\nLicense: http://www.cocos2d-iphone.org/wiki/doku.php/license (GNU LGPL v3 with an extension)\n\nIf you use this for anything, let me know. I'd be super stoked.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGloryFish%2FCocos2D-Iris-Effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGloryFish%2FCocos2D-Iris-Effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGloryFish%2FCocos2D-Iris-Effects/lists"}