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

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

451. 关于下拉列表 [ 93%]

...拉列表 真的,真是服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

452. laya中的截屏在WebGL下为什么无效呢? [ 93%]

...如些简单,且行之有效。 以下是 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

453. Sprite-旋转缩放 [ 93%]

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

454. 摄像机不在原点的时候3D空间转2D空间会失效? [ 93%]

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

455. 事件函数作用域问题 [ 93%]

事件函数作用域问题 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

456. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 93%]

...背景色 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

457. 3d文字在浏览器能正常运行,打包后使用时会报错 [ 93%]

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

458. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 93%]

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

459. ide跑没问题,安卓包跑报错 [ 93%]

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

460. timer.loop里面修改Text.text在微信小程序上用iPhone打开出现闪屏 [ 93%]

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