你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
cuixueying
赞同来自:
Laya.init(800, 800); Laya.stage.bgColor = "#eeffcc"; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,200,200,"#EEFF00"); var label:Label=new Label(); label.fontSize=60; label.text="666"; label.bold=true; label.color="#000000"; sp.addChild(label); sp.size(200,200); Laya.stage.addChild(sp); Laya.timer.frameLoop(60,this,function():void{ var htmlC:HTMLCanvas=sp.drawToCanvas(200,200,0,0); var texture:Texture=new Texture(htmlC); var sp2:Sprite=new Sprite(); sp2.graphics.drawTexture(texture,100,100,100,100); sp2.pos(300,0); Laya.stage.addChild(sp2); })
要回复问题请先登录
1 个回复
cuixueying
赞同来自: