• <option id="kikm0"><source id="kikm0"></source></option>
  • 金沙娱东城官网

    Crafty.imageWhitelist()

    A list of file extensions that can be loaded as images by Crafty.load

    Example

    // add tif extension to list of supported image files
    Crafty.imageWhitelist.push("tif");
    
    var assets = {
        "sprites": {
            "sprite.tif": {   //set a tif sprite
               "tile": 64,
               "tileh": 32,
               "map": { "sprite_car": [0, 0] }
            }
        },
        "audio": {
            "jump": "jump.mp3";
        }
    };
    
    Crafty.load( assets, // preload the assets
        function() {     //when loaded
            Crafty.audio.play("jump"); //Play the audio file
            Crafty.e('2D, DOM, sprite_car'); // create entity with sprite
        },
    
        function(e) { //progress
        },
    
        function(e) { //uh oh, error loading
        }
    );

    金沙娱东城官网