大约有 4,000 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0085 秒)
Laya_社区(3251) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_api(94) Laya3.0_文档(86) Laya2.0_api(9) laya_api(6)
...ap; private sp:Laya.Sprite; constructor(){ console.info("start"); this.init(); } init():void{ Laya.init(800, 700, Laya.WebGL); Laya.loader.load("res/atlas/images.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } onLoaded(){ console.info("onLoaded"); th...
来源: Laya_社区 发布时间: 20171125
...,可以使用局部变量来保存它: ```typescript foo() { var prop=this.target.prop; //使用prop this.process1(prop); this.process2(prop); this.process3(prop); } ``` ### 二、计时器 LayaAir提供两种计时器循环来执行代码块。 1. `Laya.timer.frameLoop`执行频率依赖于帧...
来源: Laya2.0_文档 发布时间: 20210714
...er.png", "res/ui/vslider$bar.png"); Laya.loader.load(skins, Handler.create(this, this.onLoadComplete)); } onLoadComplete() { this.placeHSlider(); this.placeVSlider(); } placeHSlider() { const HSlider = Laya.HSlider, Handler = Laya.Handler; let hs = new HSlider("res/ui/hslider.png"); Laya.stage.addCh...
来源: Laya2.0_示例 发布时间: 20241002
...play(); chrome 调试: addChild(node) { if (!node || this.destroyed || node === this) return node; if (node._zOrder) this._setBit(Const.HAS_ZORDER, true); if (node._parent === this) { ...
来源: Laya_社区 发布时间: 20191203
..., "../../res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, onCheckBoxSkinLoaded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; L...
来源: Laya_示例 发布时间: 20241002
...拉列表 真的,真是服LAYA,哎,搞了我一晚上,真心不行 this.small_map.selectHandler = new Laya.Handler(this, onSelect_small); this.big_map.selectHandler = new Laya.Handler(this, onSelect_big); function onSelect_small(e) { Laya.big_switch = 0 Laya.maptype = "small" this.now_map.te...
来源: Laya_社区 发布时间: 20180719
...如些简单,且行之有效。 以下是 egret中截屏的关键代码 this._bmpSnap = new egret.Bitmap; this._bmpSnap.x = L.GAP_UNIFIED; this._bmpSnap.y = this._contMotion.y + L.H_CLIP + L.GAP_UNIFIED; this.addChild( this._bmpSnap ); /// 快照特效 this._shapeSnapEffect = new egret.Shape; this...
来源: Laya_社区 发布时间: 20170618
...ya.stage.width / 2; ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1, this, animate); } function animate(e) { ape.rotation += 2; //心跳缩放 scaleDelta += 0.02; var scaleValue = Math.sin(scaleDelta); ape.scale(scaleValue, scaleValue); } })();module laya { import Sprite = Laya.Sprite; import ...
来源: Laya_示例 发布时间: 20241002
...3D空间转2D空间”实现了一下3D坐标转2D坐标,过程如下: this.point.elements[0] = Laya.stage.mouseX; this.point.elements[1] = Laya.stage.mouseY; this.camera.viewportPointToRay(this.point, this.ray); Laya.Physics.rayCast(this.ray, this._outHitInfo) 然后: this.camera.viewport.pro...
来源: Laya_社区 发布时间: 20180613
事件函数作用域问题 1. this.btn_Login.on(Laya.Event.CLICK, null, ()=>{ if (this.loginDig) { this.loginDig.removeSelf(); this.loginDig.destroy(); } 2.this.btn_ok.on(Laya.Event.RIGHT_CLICK, this, this.OnBut_Open); OnBut_Open() : void { this.removeSelf(); this.destroy(); } 就是这两个...
来源: Laya_社区 发布时间: 20161202