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

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

1. 缓动 · LayaAir3.0文档 · LAYABOX [ 100%]

...props 变化的属性列表,比如{x:100,y:20,ease:Ease.backOut,complete:Handler.create(this,onComplete),update:new Handler(this,onComplete)}。 * @param duration 花费的时间,单位毫秒。 * @param ease 缓动类型,默认为匀速运动。 * @param complete 结束回调函数。 * @para...

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

2. 使用百度地图 · LayaAir3.0文档 · LAYABOX [ 85%]

...Geolocation.enableHighAccuracy = true; Laya.Geolocation.watchPosition(Laya.Handler.create(this, this.updatePosition), Laya.Handler.create(this, this.onError)); // 绑定convertToBaiduCoord作用域 this.convertToBaiduCoord = this.convertToBaiduCoord.bind(this); } } 由于本例不需要使用LayaAir...

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

3. TiledMap地图 · LayaAir3.0文档 · LAYABOX [ 84%]

...is.tMap.createMap("resources/TiledMap/orthogonal.json", viewRect, new Laya.Handler(this, this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHa...

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

4. 垂直滑动条组件 · LayaAir3.0文档 · LAYABOX [ 78%]

...图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeVSlider)); } private placeVSlider(): void { let vs: Laya.Slider = new Laya.VSlider(); vs.skin = "vslider.png"; vs.height = 300; vs.pos(400, 50); vs.min = 0; vs.max = 100; vs.value = 50; vs.tick ...

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

5. 3D场景环境设置 · LayaAir3.0文档 · LAYABOX [ 78%]

...nderer; //加载相机天空盒材质 Laya.Material.load("sky2.lmat", Laya.Handler.create(null, function(mat: any) { //修改天空盒渲染器的天空盒材质 skyRenderer.material = mat; })); 2.3 IDE中创建天空盒 2.3.1 更改IDE默认的球形天空盒 当我们用IDE场景一个3D场景时...

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

6. 水平滑动条组件 · LayaAir3.0文档 · LAYABOX [ 78%]

...图片资源来自“引擎API使用示例” Laya.loader.load(skins, Laya.Handler.create(this, this.placeHSlider)); } private placeHSlider(): void { let hs: Laya.Slider = new Laya.HSlider(); hs.skin = "hslider.png"; hs.width = 300; hs.pos(50, 500); hs.min = 0; hs.max = 100; hs.value = 50; hs.tick =...

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

7. 列表组件 · LayaAir3.0文档 · LAYABOX [ 75%]

...nce = 50; // 设置是否可以选中 list.selectEnable = true; list.selectHandler = new Laya.Handler(this, this.onSelect); // 单元格渲染处理 list.renderHandler = new Laya.Handler(this, this.updateItem); this.owner.addChild(list); // 设置数据源为对应图片的路径 var data: any[] = [...

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

8. 取色器组件 · LayaAir3.0文档 · LAYABOX [ 74%]

...colorPicker.skin = this.skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Laya.Handler(this, this.onChangeColor, [colorPicker]); this.owner.addChild(colorPicker); this.onChangeColor(colorPicker); } private onChangeColor(colorPicker: Laya.ColorPicker, e: any = null): void { console.log...

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

9. 进度条组件 · LayaAir3.0文档 · LAYABOX [ 68%]

...width = 400; this.progressBar.sizeGrid = "5,5,5,5"; this.progressBar.changeHandler = new Laya.Handler(this, this.onChange); this.owner.addChild(this.progressBar); Laya.timer.loop(100, this, this.changeValue); }); } // 模拟进度条加载 private changeValue(): void { if (this.progressBar.value &gt...

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

10. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 67%]

...x.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stage.addChild(this.qrcodeSp); 编译运行上面的代码,然后点击舞台可以看到,二维码已经显示到了舞台上,可以用手机扫下,发现手机已经...

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