大约有 908 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0053 秒)
Laya_社区(631) Laya3.0_api(68) Laya2.0_api(57) laya_api(53) Laya2.0_文档(50) Laya3.0_文档(28) Laya2.0_示例(11) Laya_示例(10)
...age { import laya.display.Sprite; import laya.display.Text; import laya.ui.Image; import laya.webgl.WebGL; public class TTFTest { public function TTFTest() { Laya.init(550,400); var sp:Image=new Image(); sp.loadImage("2.png"); Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text...
来源: Laya_社区 发布时间: 20160514
...显示,实际上我的项目里用的是游戏界面 var snapshot = new Image(); //给个ID方便添加CSS样式 snapshot.id = "snapshot"; //将整个STAGE画到图片里 snapshot.src = Laya.stage.drawToCanvas(1080,1920, 0, 0).getCanvas().toDataURL(); //图片显示在页面中 document.body.appen...
来源: Laya_社区 发布时间: 20180112
...制 file.onload = function(e){ var base64 = e.target.result; var img = new Image();//创建一个图片对象 img.onload = function (){ var canvas = $("#canvas").get(0); var ctx = canvas.getContext("2d"); //使用drawImage显示图片 ctx.drawImage(img,0,0,canvas.width,canvas.height); } //把base64...
来源: Laya_社区 发布时间: 20170111
...建及资源导入相关文档)* 步骤二:在资源面板拖入一个`Image`组件到场景编辑区,如图4所示  (图4) 步骤三:双击进入`Image`组件内部,然后再到组件面板拖入一个`Sprite`组件,如图5所示。  (图5) 步...
来源: Laya2.0_文档 发布时间: 20210715
...增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); button.pos(300, 0); this.r...
来源: Laya_社区 发布时间: 20170920
...pt package { import laya.display.Stage; import laya.ui.Box; import laya.ui.Image; import laya.ui.List; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_List { //列表对应图片的路径 private var data:Array = [ "../../../../res/ui/listskins/1.jpg", "../../../../res/ui/listski...
来源: Laya2.0_文档 发布时间: 20210715
...aya.Handler export class MaskDemo { private Res: string; private img: Laya.Image; constructor() { //Laya.init(400, 640, Laya.WebGL); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; this.img = new Laya.Image(); this.img.pos(200, 200) //获...
来源: Laya_社区 发布时间: 20171211
...定义texture或者layaSprite var roleImg = new Laya.Sprite(); roleImg.loadImage("../xx.png"x,y,width,height);//直接定义roleImg的大小及相对位置 roleImg.zOrder = 2;//还能定义层级,这个层级是与laya直接相关的 role.layaSprite = roleImg; role可以不断传入自定义的lay...
来源: Laya_社区 发布时间: 20180827
...uideHitArea: Laya.HitArea; protected tipContainer: Laya.Image; constructor() { super(); this.init(); } private init() { this.size(Laya.stage.width,Laya.stage....
来源: Laya_社区 发布时间: 20200119
...a.events.Event; import laya.ui.Button; import laya.ui.Clip; import laya.ui.Image; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_Clip { /***控制器按钮资源***/ private var buttonSkin:String = "../../../../res/ui/button-7.png"; /***切片资源***/ private var clipSkin:Stri...
来源: Laya2.0_文档 发布时间: 20210714