大约有 1,493 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0157 秒)
Laya_社区(918) Laya2.0_文档(193) Laya_示例(125) Laya2.0_示例(101) Laya3.0_api(79) Laya3.0_文档(73) laya_api(2) Laya2.0_api(2)
...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
...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
... /* ……省略若干代码 */ //创建盒型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
...面 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
...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
...化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: (图11) ### 4、多个动效模板创建复杂动效 刚刚实现了按钮按下后,从小变大的动画效果,我...
来源: Laya2.0_文档 发布时间: 20210715
...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
... 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) **Tips:** Button 组件的...
来源: Laya2.0_文档 发布时间: 20210714
...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
...; 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