Giter VIP home page Giter VIP logo

craftyjs.github.com's Introduction

Crafty.js Homepage

This repo contains the content and infrastructure for craftyjs.com.
Changes should be directed to the source subdirectory, the pages will be generated from them.

How to build locally

Building the website requires that npm and grunt be installed globally. Then run npm install to download the necessary packages.

  • grunt assemble will build the website, drawing content from the source subdirectory
  • grunt connect will allow you to preview the website locally

How to view and modify demos

The demos subdirectory is realized as a git submodule.
Any changes to the demo files should be directed to the craftyjs/demos repository.

After cloning this site repo, the demo files won't be available immediately. To view them, do

# clone the repo
$ git clone https://github.com/craftyjs/craftyjs.github.com.git
$ cd craftyjs.github.com/
# setup the demo submodule on your PC if it isn't already
$ git submodule init
# fetch the demo submodule files
$ git submodule update

To pull the latest changes from the demos repository, do

# setup submodule and fetch files
# don't worry, it won't do anything if you've 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
...

craftyjs.github.com's People

Contributors

ahilles107 avatar bradengroom avatar brokndodge avatar bryant1410 avatar budda avatar cdosborn avatar chasebro avatar ddeaguiar avatar dkapadia avatar gopalindians avatar jameskbride avatar joeyespo avatar jon-lewis avatar kevinsimper avatar louisstow avatar mkucko avatar mucaho avatar nithinbekal avatar plfstr avatar sad-pixel avatar sebring avatar shabda avatar shashwat986 avatar sorenbs avatar starwed avatar stevensona avatar teddybear06 avatar vxjasonxv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craftyjs.github.com's Issues

feature Animation Editor Component

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.

Link!

Games on frontpage gives 404

The blockoworld for example gives a 404, so does the driving game.

Also the link for the minified version gives a 404.

;

;

Feature user submitted games on the frontpage

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?

Negative Gravity: Ceilings don't stop simple object

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

Demos

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
...

Incorrect list style for API docs

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.