• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 8 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0025 秒)

1. UI-Image [ 100%]

...peScript三种开发语言、LayaAirIDE让项目开发更高效。class UI_Image { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV =...

来源: Laya2.0_示例 发布时间: 20241124

2. UI-List [ 94%]

...nst Box = Laya.Box; class Item extends Box { constructor(){ super(); const Image = Laya.Image; this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); } setImg(src) { this.img.skin = src; } } class UI_List { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya...

来源: Laya2.0_示例 发布时间: 20241124

3. UI-Dialog [ 94%]

...onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Image, Button = Laya.Button; let dialog = new Dialog(); let bg = new Image(assets[0]); dialog.addChild(bg); let button = new Button(assets[1]); button.name = Dialog.CLOSE; button.pos(DIALOG_WIDTH - CLOSE_BTN_WIDT...

来源: Laya2.0_示例 发布时间: 20241124

4. UI-Clip [ 90%]

...on(); this.showTotalSeconds(); this.createController(); } showBg() { const Image = Laya.Image; let bg = new Image(bgSkin); bg.size(224, 302); bg.pos(Laya.stage.width - bg.width >> 1, Laya.stage.height - bg.height >> 1); Laya.stage.addChild(bg); } createTimerAnimation() { const Clip = Laya.Clip; this...

来源: Laya2.0_示例 发布时间: 20241124

5. Sprite-屏幕截图 [ 83%]

..."sprite截图","清理"]; this._canvas = null; this.aimSp = null; this.drawImage = null; this.drawSp = null; this.monkeyTexture = null; // 不支持WebGL时自动切换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_...

来源: Laya2.0_示例 发布时间: 20241124

6. UI-RefreshList [ 82%]

...st.mouseHandler = new Handler(this, this.onListMouse); // 提示文字 var image = new Laya.Image("res/ui/refreshList/img_bg05.png"); Laya.stage.addChild(image); image.pos(510, 20); image.width = 484; image.height = 256; var tiptext = new Text(); image.addChild(tiptext); tiptext.text = "操作提示...

来源: Laya2.0_示例 发布时间: 20241124

7. 屏幕适配-屏幕适配 [ 77%]

... Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); //设置适配模式 Laya.stage.scaleMode = "noscale"; //设置横竖屏 Laya.stage.screenMode = Stage.SCREEN_HORIZON...

来源: Laya2.0_示例 发布时间: 20241124

8. UI-FontClip [ 64%]

...odule laya{ import Stage=Laya.Stage; import FontClip=Laya.FontClip; import Image=Laya.Image; import WebGl=Laya.WebGL; export class Font_Clip{ private TestClipNum:string="res/comp/fontClip_num.png"; private _ClipNum:string="res/comp/fontClip_num.png"; private _ClipNum1:string="res/comp/fontClip_num.p...

来源: Laya2.0_示例 发布时间: 20241124