Making a sharp sprite in cocos2d-js
<p>I'm trying to use cocos2d-js to make a canvas webgame that uses pixel graphics.</p>

<p>I have made the canvas and the setDesignResolutionsize to be the size of the viewport.</p>

<p>I can't make a sprite that isn't antialiased. I have tried using        </p>

<pre><code>sprite.getTexture().setAliasTexParameters();
</code></pre>

<p>Although I may be using it wrong. </p>

<pre><code>var canvas = document.getElementById("gameCanvas");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;

cc.game.onStart = function(){

    //load resources
    cc.view.setDesignResolutionSize(canvas.width, canvas.height, cc.ResolutionPolicy.SHOW_ALL);


    cc.LoaderScene.preload(gameResources, function () {
        cc.director.runScene(new MyScene());
    }, this);
};

cc.game.run("gameCanvas");

var MyScene = cc.Scene.extend({
   onEnter:function () {
      this._super();
      var gameLayer = new game();
      gameLayer.init();
      this.addChild(gameLayer);
      }
});

var backgroundLayer;

var game = cc.Layer.extend({
    init:function() {
        this._super();
        var sprite = cc.Sprite.create("assets/ui/title.png");
        sprite.getTexture().setAliasTexParameters();
        this.addChild(sprite,0);
        sprite.setPosition((window.innerWidth/2),(window.innerHeight/2));
        }
});
</code></pre>

<p>This is the results with png for comparison:</p>

<p><a href="http://i.stack.imgur.com/sdVTL.png" rel="nofollow">foreground: title png image, background: rendered sprite</a></p>

<p>Who can help?</p>