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

大约有 441 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0048 秒)

301. 针对2.0.0 beta5 setLoadingPage 做增强 [ 48%]

...ew LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方式 查看效果不同 loadPage.openScene('page2.scene', this.getUserInfo, true, [1, 2, 3]) // loadPage.openScene2('page2.scene', this.getUserInfo, true, [1, 2, 3]) }) } /** ...

来源: Laya_社区 发布时间: 20181124

302. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 48%]

... Laya.timer.frameLoop(1, this, this.animateFrameRateBased); Laya.stage.on("click", this, this.dispose); dispose() { Laya.timer.clear(this, this.animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **三、获取显示对象边界的做法** 在...

来源: Laya2.0_文档 发布时间: 20210714

303. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 48%]

...uideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya.Sprite(); maskArea.alpha = 0.5; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.name = "m...

来源: Laya_社区 发布时间: 20171222

304. LayaBox HelloWorld实战 [ 47%]

...ya.Scene { constructor() { super(); HelloWorld.instance = this; } onBtnShowClick(){ var dialog = new Laya.Dialog(); dialog.width=300; dialog.height=600; //var bg = new Laya.Image('comp/img_bg.png'); //dialog.addChild(bg); var button = new Laya.Button('comp/button.png'); button.label='Hello World!'; ...

来源: Laya_社区 发布时间: 20190117

305. List 组件做的手风琴Demo [ 47%]

...img2 = cell.getChildByName("img2") as Laya.Image;         img1.on("click",this,this.onRefresh,[index])         //当索引相同时 BOX 高度改变         if(this.index_num ==index){             cell.height=80;             cell.y =index*30;     ...

来源: Laya_社区 发布时间: 20190522

306. 动画-旧版骨骼动画 [ 47%]

...ht - 100 * Laya.Browser.pixelRatio); this.changeActionButton.on(Laya.Event.CLICK, this, function (): void { this.playSkinAnimation(this.zombie, ++this.curStateIndex % this.skinAniUrl.length); }); })); } } new SkinAnimation_Old;package animationModule { import laya.ani.AnimationTemplet; import laya.d...

来源: Laya_示例 发布时间: 20251209

307. 布局容器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 47%]

...10,则节点最后的宽度会被设置为30。 Scroll Item To View On Click 勾选后,当点击某个item时,如果这个item处于部分显示状态,那么将会自动滚动到整个item显示完整。 Stretch X 在水平方向上的缩放操作。 None 不使用缩放。这意味item不...

来源: Laya3.0_文档 发布时间: 20251010

308. 加载TiledMap 不显示 [ 46%]

...628";          this.createMap();          Laya.stage.on("click", this, this.onStageClick);     }      private createMap(): void {         this.tiledMap = new TiledMap();         this.tiledMap.createMap("res/tiledMap/t2.json", new Rectangle(0, 0,...

来源: Laya_社区 发布时间: 20201230

309. Clip属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 46%]

..."#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF"; controller.size(84, 30); controller.on('click', this, onClipSwitchState); controller.x = (Laya.stage.width - controller.width) / 2; controller.y = (Laya.stage.height - controller.height) / 2 + 110; Laya.stage.addChild(controller); } function onClipSwitchState() { i...

来源: Laya2.0_文档 发布时间: 20210715

310. laya.display.Sprite_API3.0 [ 46%]

...ild(sprite);//将此 sprite 对象添加到显示列表。 sprite.on(Event.CLICK, this, onClickSprite);//给 sprite 对象添加点击事件侦听。 shape = new Sprite();//创建一个 Sprite 类的实例对象 sprite 。 shape.graphics.drawRect(0, 0, 100, 100, "#ccff00", "#ff0000", 2);//绘制一...

来源: Laya3.0_api 发布时间: 20231115