【发布时间】:2018-07-12 18:38:19
【问题描述】:
我重新编写了一个 HTML5 游戏(使用 createJS)以匹配 StageGL,但结果所有文本字段都消失了。切换回 Stage 解决了这个特定问题(参见下面的代码示例)。 有人知道解决方法吗?
示例代码:
canvas.width = stageWidth;
canvas.height = stageHeight;
stage = new createjs.StageGL(canvas); // <= text does not work with GL???
stage = new createjs.Stage(canvas); // <= text works fine
var textTest = new createjs.Text("Hello World");
textTest.x = 10;
textTest.y = 20;
stage.addChild(textTest);
提前感谢您的 cmets!
【问题讨论】:
标签: text html5-canvas createjs easeljs