var node = new cc.Node();var sprite = node.addComponent(cc.Sprite);sprite.spriteFrame = new cc.SpriteFrame(tex);cc.director.getScene().addChild(node);