大约有 4,034 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0078 秒)
Laya_社区(3264) Laya2.0_文档(296) Laya_示例(141) Laya2.0_示例(117) Laya3.0_文档(107) Laya3.0_api(94) Laya2.0_api(9) laya_api(6)
...拉列表 真的,真是服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_示例 发布时间: 20250224
...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
...背景色 Laya.stage.bgColor = "#ffffff" Laya.Stat.show() //资源路径 this.Res = "test.png"; this.img = new Laya.Image(); this.img.pos(200, 200) //获取图片资源,绘制到画布 this.img.skin = this.Res //添加到舞台 Laya.stage.addChild(this.img); } private cacheCanvas: Laya.HTMLCanvas ...
来源: Laya_社区 发布时间: 20171211
...ngContext":No function was found that matched the signature provided 在this.texture2D.loadImageSource(this.cav);报错 this.cav = Laya.Browser.createElement("canvas"); this.cav.width = 256; this.cav.height = 256; var cxt = this.cav.getContext("2d"); cxt.fillStyle = 'rgb(' + '220' + ',' + '5...
来源: Laya_社区 发布时间: 20200714
...ui.TextInput; var WID = 373, HEI = 30; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.img.graphics.drawRect(0, 0, WID, HEI - 2, "#eeeeee"); this.label = new Label(); this.addChild(this.label); this.input = new TextInput(); this.a...
来源: Laya_社区 发布时间: 20180312
...:bodyArr: Array<Sprite> = [] 被调用的函数 bodyCheck() { if (this.bodyArr.length <= 0) return; if (this.eatBean >= this.bodyBeanNum && this.bodyArr.length < this.bodyMaxNum) { let addBodyNum = Math.floor(this.eatBean / this.bodyBeanNum) let x = this.bodyArr[this.bodyArr...
来源: Laya_社区 发布时间: 20180601
...改Text.text在微信小程序上用iPhone打开出现闪屏 如题, this.myTest = new Laya.Text() this.myTest.pos(0, 0) this.myTest.size(100, 100) this.myTest.fontSize = 13 this.myTest.color = "#ffffff" this.myTest.align = "center" this.addChild(this.myTest) this.timer.loop(10, this, this.timer...
来源: Laya_社区 发布时间: 20190129