如何让 PIXI.text 为 Retina 显示器做好准备?
How to make PIXI.text ready for retina displays?
我使用了documents of PIXI 中描述的方法来支持视网膜显示器:
var myRenderer = PIXI.autoDetectRenderer(800, 600, {
resolution:myDisplayResolution
});
@2x
图像工作正常但 PIXI.text
节点仍然模糊,如何使它们在视网膜显示器上看起来清晰?
我认为问题在于 PIXI.Text 有自己的解决方案。因此,您必须在添加到舞台的每个文本节点上相应地进行设置。
尝试这样做,看看是否有效。
var some_text = new PIXI.Text('I\'m so blurry', some_style);
var some_other_text = new PIXI.Text('I\'m so fancy!', some_style);
some_text.x = 50
some_text.y = 50
stage.addChild(some_text);
some_other_text.x = 50
some_other_text.y = 150
some_other_text.resolution = myDisplayResolution;
stage.addChild(some_other_text);
我使用了documents of PIXI 中描述的方法来支持视网膜显示器:
var myRenderer = PIXI.autoDetectRenderer(800, 600, {
resolution:myDisplayResolution
});
@2x
图像工作正常但 PIXI.text
节点仍然模糊,如何使它们在视网膜显示器上看起来清晰?
我认为问题在于 PIXI.Text 有自己的解决方案。因此,您必须在添加到舞台的每个文本节点上相应地进行设置。
尝试这样做,看看是否有效。
var some_text = new PIXI.Text('I\'m so blurry', some_style);
var some_other_text = new PIXI.Text('I\'m so fancy!', some_style);
some_text.x = 50
some_text.y = 50
stage.addChild(some_text);
some_other_text.x = 50
some_other_text.y = 150
some_other_text.resolution = myDisplayResolution;
stage.addChild(some_other_text);