JSFiddle

  • Intro to Crafty - Crafty + Backbone #30 is the latest revision

    Eighth code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    window.Game = Backbone.Model.extend({
        defaults: {
            'width': 600,
            'height': 400,
            'points': 0
        },
    
        initialize: function() {
            this.coins = new CoinCollection();
            coins = this ...
  • Intro to Crafty - Sprites #11 is the latest revision

    Seventh code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300,
        points = 0;
    
    Crafty.init(width, height);
    
    Crafty.sprite(24, "http://i.imgur.com/vQuTM.png ...
  • Intro to Crafty - Animation #12 is the latest revision

    Sixth code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300,
        points = 0;
    
    Crafty.init(width, height);
    
    Crafty.c("Box", {
        init: function() {
          this.addComponent("2D, Canvas ...
  • Intro to Crafty - Collision #36 is the latest revision

    Fifth code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300,
        points = 0;
    
    Crafty.init(width, height);
    
    Crafty.c("Box", {
        init: function() {
          this.addComponent("2D, Canvas ...
  • Intro to Crafty - Extending Classes #4 is the latest revision

    Fourth code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300;
    
    Crafty.init(width, height);
    
    Crafty.c("Box", {
        init: function() {
          this.addComponent("2D, Canvas, Color");
        },
        
        makeBox ...
  • Intro to Crafty - Entity Instances

    Third code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300;
    
    Crafty.init(width, height);
    
    Crafty.c("Box", {
        init: function() {
          this.addComponent("2D, Canvas, Color");
        },
        
        makeBox ...
  • Intro to Crafty - Modules #24 is the latest revision

    Second code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300;
    
    Crafty.init(width, height);
    
    var box = Crafty.e("2D, Canvas, Color, Fourway")
      .attr({ x: 15 ...
  • Intro to Crafty - Initializing Crafty #13 is the latest revision

    First code demo slide from a crafty js presentation: https://github.com/ajacksified/Craftyjs-Presentation

    var width = 400,
        height = 300;
    
    Crafty.init(width, height);
    
    var box = Crafty.e("2D, DOM, Color")
      .attr({ x: 15, y ...