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

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

1431. LayaAir下加载阿拉伯TTF字体,手机上显示时左右顺序反了。 [ 46%]

...123"; text.pos(100, 100); text.width = 500; text.height = 500; Laya.stage.addChild(text); }   参考该贴加载字体方式: https://ask.layabox.com/question/332 附件 : --> LayaFontTest.zip 2018-07-05 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请...

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

1432. 关于laya生成的canvas定位问题导致内部事件不正确 [ 46%]

...ar img = new Laya.Sprite(); img.loadImage('images/item_5.png'); Laya.stage.addChild(img); img.on(Laya.Event.MOUSE_DOWN, img, onStartDrag); function onStartDrag(){ console.log(this); clickIndex++; msgDiv.html('图片选中了' + clickIndex + '次'); // img.startDrag(); } // Laya.stage.alignH = Laya.S...

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

1433. 一篇上手LayaAir的3D物理引擎(TypeScript-3D基础(TS)-LayaAir3D之物理系统) [ 45%]

... /* ……省略若干代码 */ //创建盒型MeshSprite3D let box = scene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(sX, sY, sZ))) as Laya.MeshSprite3D; //创建静态碰撞器 let staticCollider:Laya.PhysicsCollider = box.addComponent(Laya.PhysicsCollider); //设置为触发器,...

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

1434. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 45%]

...面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路径,这个worker.js是Laya官方提供的,我们把他拷贝复制到我们自己设置的路径,这个js...

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

1435. 插件开发说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...t btn = IEditor.GUIUtils.createButton(); btn.setPos(150, 180); this._panel.addChild(btn); } accept(asset: IEditor.IAssetInfo): boolean { return asset.ext === "abc"; //应用于扩展名是abc的资源 } async refresh(asset: IEditor.IAssetInfo, render3DCanvas: IEditor.IRender3DCanvas): Promise<voi...

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

1436. 动效模板(JavaScript-LayaAir基础篇(JS)-动画基础) [ 45%]

...化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: ![12](img/12.gif)(图11) ### 4、多个动效模板创建复杂动效 刚刚实现了按钮按下后,从小变大的动画效果,我...

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

1437. 龙骨动画-拖拽-点击区域HitArea设置问题 [ 44%]

...s(400,600); skeleton.on(Laya.Event.MOUSE_DOWN, this, dragFunc); Laya.stage.addChild(skeleton); skeleton.play(0,true); rectangle = skeleton.getBounds(); var hitArea = new Laya.HitArea(); var graphic = new Laya.Graphics(); graphic.drawRect(-rectangle.x, -rectangle.y, rectangle.width, rectangle.height)...

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

1438. Button属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 44%]

... var btn = new Laya.Button(skin); //将Button添加到舞台上 Laya.stage.addChild(btn); //设置Button相关属性 btn.width = 100; btn.height = 50; btn.pos(100,100); btn.label = "按钮"; } ``` 上述代码运行效果如动图2所示: ![动图2](img/2.gif) (动图2) **Tips:** Button 组件的...

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

1439. laya.ui.DialogManager_API3.0 [ 44%]

...m url viewport visible width x y zOrder Methods _initialize _processActive addChild addChildAt addChildren addComponent addComponentInstance bubbleEvent callLater clearTimer close closeAll closeByGroup contains customRender destroy destroyChildren doClose doOpen drawToCanvas drawToTexture drawToText...

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

1440. Native(android)下创建二维码并显示在页面上 [ 44%]

...;             img.pos(100, 300);             Laya.stage.addChild(img);         }     }      // androidplat,创建二维码     createQrCode(url:string, width:number, height:number):string {         return this._bridge.call("createQrCode", url, wi...

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