craftyjs / craftyjs.github.com Goto Github PK
View Code? Open in Web Editor NEWHome Page: craftyjs.com
Home Page: craftyjs.com
A component I wrote last year. I reworked it to work with v0.6.2. It also includes 2 demos.
https://github.com/petarov/CraftyMouseFace
Cheers
I think it could be cool to show user submitted games on the frontpage and make a kind of like button next to, then if some of the games gains many likes and are good, they can be promoted with more space.
I think it would be easy to make with Firebase.com, which would also make it realtime and still possible to host at Github.
I am thinking that you have to login. Firebase make it very easy to do that and use Github as Provider https://www.firebase.com/docs/security/simple-login-github.html
What do people think of that idea?
This is a copy of merriam's issue in the Crafty repo:
It's a large repository, and confusing to the new contributor. Use this file for filelist.md: https://gist.github.com/4342310
https://github.com/svenjacobs/crafty-gamepad
I use it, and it works great!
As reported in this forum post, there is a typo in the last example, which uses Fourway
in combination with Gravity
instead of Twoway
.
Until now, we had duplicated demo code in this repository and in craftys/demos.
I have solved this problem for now by introducing a submodule that links to the demos repository.
Any changes to demo files should be directed there.
After you clone the site repo now you won't see any demo files.
You first need to initialize the submodule on your PC and update it so that it fetches all files.
If you don't need the files, or don't want to update the demo files to the newest revision of the demo repo, then you don't need to run any commands. If I understand correctly. the demo files won't be touched on the site repo if you commit & push without any changes to the submodule.
# setup submodule on your PC if it isn't already
$ git submodule init
# fetch all submodule files
$ git submodule update
To update the demos in this repository, you have to update the submodule.
see also Git Submodules: Adding, Using, Removing, Updating
something like this should work
# setup submodule and fetch files
# don't worry, it won't do anything if you done so already
$ git submodule init
$ git submodule update
# change to submodule
$ cd demos/
# you are now in separate git repo belonging to this submodule
# all git commands are directed to this submodule
# update the submodule
$ git checkout master
$ git fetch origin
$ git rebase origin/master
$ cd ..
# you are now main git repo again
# add the HEAD change of the submodule
$ git add demos
# commit now, etc
...
;
Hello, I made a project template that uses browserify and supports ES6(via UglifyJS#harmony). It can also build a minified bundle of your game.
Check it out on pudarida/crafty-template.
Edit:
I decided to ditch TypeScript because I felt that it is a bit of an overkill.
This is a prototype game / demo that uses a modified version of TiledMapBuilder to load Tiled maps. Nothing fancy, just a character sprite moving around different rooms.
https://github.com/petarov/RagingNinjaRabbit
I didn't open a pull request because I'm not sure whether this is suitable for the demos folder. Let me know if you'd like to add it.
Hi there,
I was just tinkering around with your crafty package for possible use in a Holiday eCard for my work. Tried to set up a ceiling and have a block float up to it and stop via the code below:
Crafty.init(300,300, document.getElementById('game'));
Crafty.e('Floor, 2D, Canvas, Color')
.attr({x: 0, y: 250, w: 250, h: 10})
.color('green');
Crafty.e('Ceiling, 2D, Canvas, Color')
.attr({x: 0, y: 0, w: 250, h: 10})
.color('brown');
Crafty.e('Block1, 2D, Canvas, Color, Fourway, Gravity')
.attr({x: 0, y: 0, w: 50, h: 50})
.color('#F00')
.fourway(4)
.gravity('Floor')
.gravityConst(0.2);
Crafty.e('Block2, 2D, Canvas, Color, Fourway, Gravity')
.attr({x: 100, y: 100, w: 50, h: 50})
.color('#F00')
.fourway(4)
.gravity('Ceiling')
.gravityConst(-0.2);
Block2 disappears after reaching the Ceiling, however.
Otherwise looks like a simple package to use in the making of the eCard. Well done
-Joe
Something happened with the CSS for the API documentation. We want list-style: none
in the appropriate style sheet. It might also need the line-height (or the padding, or something) decreased by just a bit; not sure about that, but there seems to be too much space between each element of the list.
This is more of a tool than a component, but I've been working on it recently and plan on putting a good amount more work into it, so I thought it'd be cool to add to the Components list at http://craftyjs.com/components/.
It's a graphical editor for sprite sheets' animations, so you can preview animations selected frame-by-frame from a sprite sheet, adjust animation speed, etc, and then generate a component with those reels and a json object to load that sprite sheet. Still a bit unstable-- no error messages yet, for example, and there's soft limit on sprite sheet size and animation length.
The blockoworld for example gives a 404, so does the driving game.
Also the link for the minified version gives a 404.
Add the special remove
function somewhere in example code (it's only documented for now).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.