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

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

1. 定时器 · LayaAir3.0文档 · LAYABOX [ 100%]

...null, coverBefore: boolean = true, jumpFrame: boolean = false): void { var handler: TimerHandler = this._create(false, true, delay, caller, method, args, coverBefore); if (handler) handler.jumpFrame = jumpFrame; } 使用示例如下: const { regClass } = Laya; import { RuntimeScriptBase } from "./...

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

2. 缓动 · LayaAir3.0文档 · LAYABOX [ 96%]

...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

3. 获取位置信息 · LayaAir3.0文档 · LAYABOX [ 96%]

...BLE和Geolocation.TIMEOUT之一。 */ static getCurrentPosition(onSuccess: Handler, onError: Handler = null): void { Geolocation.navigator.geolocation.getCurrentPosition(function (pos: any): void { Geolocation.position.setPosition(pos); onSuccess.runWith(Geolocation.position); }, function (error: an...

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

4. 事件管理 · LayaAir3.0文档 · LAYABOX [ 94%]

...型 Laya.Event2.2 事件派发 Laya.EventDispatcher2.3 事件处理 Laya.Handler3. 自定义的事件事件管理 1. 认识事件 1.1 什么是事件 事件Event指的是由系统事先设定的、能被对象识别和响应的动作,事件是指对象对于外部动作的响应,当对方发生...

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

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

...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 [ 74%]

...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

7. 场景管理 · LayaAir3.0文档 · LAYABOX [ 67%]

...open(url: string, closeOther: boolean = true, param: any = null, complete: Handler = null, progress: Handler = null): Promise<Scene> { Scene.showLoadingPage(); return Scene.load(url, Handler.create(null, this._onSceneLoaded, [closeOther, complete, param]), progress); } (图2-1) 例如创...

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

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

...图片资源来自“引擎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

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

...图片资源来自“引擎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

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

...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