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

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

1531. 导航标签组组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 40%]

...rol 3"; tab.selectedIndex = 1; this.onSelect(tab.selectedIndex); tab.selectHandler = new Laya.Handler(this, this.onSelect); this.owner.addChild(tab); return tab; } private onSelect(index: number): void { console.log("当前选择的标签页索引为 " + index); } } 运行效果如下动图所示:...

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

1532. CheckBox属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 40%]

...执行onLoaded回调方法 Laya.loader.load([this.skin1,this.skin2],Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个CheckBox实例cb1 var cb1:Laya.CheckBox = new Laya.CheckBox(this.skin1); //添加到舞台上显示 Laya.stage.addChild(cb1); //设置checkbox的坐...

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

1533. 报无法找到资源,未升级ide之前不报错 [ 40%]

...load,同时可以加载2D,3D资源 Laya.loader.load(resArr, null, Laya.Handler.create(this, this.onLoading, null, false)).then(() => { // 加载完成后,处理逻辑 this.progress.value = 0.98; console.log("加载结束", this.progress.value); Laya.Scene.open("scenes/Index.ls&...

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

1534. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 40%]

...sh({url:"res/atlas/comp.atlas", type:Loader.ATLAS}); Laya.loader.load(res, Handler.create(null, this.__onLoaded)); } private __onLoaded(): void { Laya.stage.addChild(new Test()); } } new Entry();   Test.ts import Sprite = Laya.Sprite; class Test extends Sprite{ constructor(){ super(); this._initVie...

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

1535. laya.ui.Radio [ 40%]

...直方向中心线的距离(以像素为单位)。 UIComponent clickHandler : Handler 对象的点击事件处理器函数(无默认参数)。 Button customRenderEnable : Boolean[write-only] 设置是否开启自定义渲染,只有开启自定义渲染,才能使用customRender函数渲...

来源: Laya2.0_api 发布时间: 20190513

1536. laya.resource.Texture_API3.0 [ 40%]

... Parameters url: string Returns boolean load load(url: string, complete?: Handler): Promise<void> Defined in laya/resource/Texture.ts:277 加载指定地址的图片。 Parameters url: string 图片地址。 Optional complete: Handler 加载完成回调 Returns Promise<void> off off(type...

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

1537. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 40%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个...

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

1538. laya.media.SoundChannel_API3.0 [ 40%]

...方法。 Hierarchy EventDispatcher SoundChannel Index Properties completeHandler isStopped loops startTime url Accessors duration position volume Methods event hasListener off offAll offAllCaller on once pause play resume stop Properties completeHandler completeHandler: Handler Defined in laya/medi...

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

1539. 分包后, 资源加载问题 [ 40%]

... Example,并添加到舞台显示 Laya.loader.load("js/loading100.js", Handler.create(this, complete), null, Loader.TEXT); } private function complete(data:*):void { trace("ok3") __JS__("window.eval(data)"); //此行报错 var load:* = __JS__('new loading100()'); Laya.stage.addChild(load); trace("...

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

1540. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 40%]

...pFont = new Laya.BitmapFont(); bitmapFont.loadFont("res/vvv.fnt", new Laya.Handler(this, this.onFontLoaded, [bitmapFont])); } /** * 位图字体加载完成后的回调方法 * @param bitmapFont 实例后的位图字体对象 */ onFontLoaded(bitmapFont: Laya.BitmapFont): void { //如果采用系统...

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