{"id":14964067,"url":"https://github.com/webcaetano/craft","last_synced_at":"2025-07-12T05:05:57.658Z","repository":{"id":58225087,"uuid":"49960299","full_name":"webcaetano/craft","owner":"webcaetano","description":"Phaser Library with utility chainable functions","archived":false,"fork":false,"pushed_at":"2017-11-17T00:31:06.000Z","size":1191,"stargazers_count":29,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-31T05:34:05.414Z","etag":null,"topics":["game-development","phaser","phaser-plugin","phaserjs"],"latest_commit_sha":null,"homepage":"http://webcaetano.github.io/craft","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/webcaetano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-19T15:04:06.000Z","updated_at":"2024-05-29T11:06:44.000Z","dependencies_parsed_at":"2022-08-31T04:10:49.658Z","dependency_job_id":null,"html_url":"https://github.com/webcaetano/craft","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Fcraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Fcraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Fcraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webcaetano%2Fcraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webcaetano","download_url":"https://codeload.github.com/webcaetano/craft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238075314,"owners_count":19412310,"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":["game-development","phaser","phaser-plugin","phaserjs"],"created_at":"2024-09-24T13:32:32.395Z","updated_at":"2025-02-10T07:31:11.794Z","avatar_url":"https://github.com/webcaetano.png","language":"JavaScript","readme":"![File Size][filesize-url]\n[![npm][npm-img]][npm-url]\n![Bower version][bower-url]\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"phaser craft logo\" src=\"http://i.imgur.com/qQTPPu7.png\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e Craft \u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cstrong\u003e\n\t\t\u003csub\u003e\n\t\tPhaser Library with utility chainable functions\u003cbr\u003e\n\t\tExported as a UMD module. (accept global, es6, webpack, browserify)\n\t\t\u003c/sub\u003e\n\t\u003c/strong\u003e\n\u003c/p\u003e\n\n\n## Installation\n\n```\nnpm install phaser-craft\nbower install phaser-craft --save\n```\n\n## Examples \n\n#### Example1 \n\n```javascript\nvar craft = require('phaser-craft')(game); // you also can call craft via global var\n\nvar group = craft.$g(); //create group\n\nvar sprite = craft.$sprite('phaserDude') //create sprite with key\n.$set({ // change attributes\n\tx:100,\n\ty:100\n})\n.$mid() // change anchor to center\n.$tint('#FF0000') // change color\n.$into(group); // insert into group\n\n//You can keep using Phaser\nsprite.x = 150;\n\n//You can use the prototypes without a chain\nsprite.$set({\n\ty:150\n});\n```\n\n#### Example2\n\n```javascript\n// var craft = craft(game); // global\n// import $craft from 'phaser-craft'; var craft = $craft(game); // ES6\nvar craft = require('phaser-craft')(game); // requireJS\n\nvar group = craft.$g(); //create group\n\nvar rect = craft.$rect({ //create rectangle\n\twidth:200,\n\theight:150,\n\tfill:'#9517C5', //setup retancle fill color\n})\n.$align('center','center') // align it to center \n.$into(group) // insert into group \n\n\nvar ball = craft.$circle({ //create circle\n\tfill:'#ffffff',\n\tsize:100 // radius\n}).$set({ // change attributes\n\tx:150,\n\ty:150,\n})\n.$into(group) // insert into group \n\nvar d = craft.$d().$copyPos(ball); // create a dot and copy position of ball\n```\n\n## Documentation \n\n[http://webcaetano.github.io/craft](http://webcaetano.github.io/craft)\n\n## Development \n\nClone the repo `https://github.com/webcaetano/craft-examples`\u003cbr\u003e\nOn craft-examples `npm install` and `gulp`\u003cbr\u003e\nOn craft `npm install` and `npm run start` \u003cbr\u003e\n\nTo create a production version `npm run build`\n\n\u003e Important: Ensure that both repos live at the same depth in your directory structure. For example: /usr/home/web/craft-examples and /usr/home/web/craft. This is so the dev build scripts in the Craft repo can safely copy files to ../craft-examples, and they end up in the correct place.\n\n\n#### See Also\n- [**phaser-utils**](https://github.com/webcaetano/phaser-utils)\n- [**phaser-boilerplate**](https://github.com/webcaetano/phaser-boilerplate)\n- [**phaser-electron**](https://github.com/webcaetano/phaser-electron)\n- [**craft-website**](https://github.com/webcaetano/craft-website)\n- [**craft-examples**](https://github.com/webcaetano/craft-examples)\n\n[npm-url]: https://npmjs.org/package/phaser-craft\n[npm-img]: https://img.shields.io/npm/v/phaser-craft.svg?style=flat-square\n[filesize-url]: https://img.shields.io/github/size/webcaetano/craft/build/phaser-craft.min.js.svg?style=flat-square\u0026color=green\n[bower-url]: https://img.shields.io/bower/v/phaser-craft.svg?style=flat-square\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcaetano%2Fcraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebcaetano%2Fcraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebcaetano%2Fcraft/lists"}