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

大约有 4,111 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0105 秒)

1121. 动画状态脚本(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 86%]

... _text:Laya.Text; constructor() { super(); } get text():Laya.Text { return this._text; } set text(value) { this._text = value; } /** * 动画状态开始时执行。 */ onStateEnter() { console.log("动画开始播放了"); this._text.text = "动画状态:动画开始播放"; } /** * 动画状态...

来源: Laya2.0_文档 发布时间: 20210715

1122. 升级2.0以后,部分浏览器的兼容性很差 [ 86%]

...ne { constructor() { super(); } createChildren() { super.createChildren(); this.loadScene("test/TestScene"); } } UC指这行报错,这个都是编译后的代码 addScore(value = 1) { this._score += value; this.scoreLbl.changeText("分数:" + this._score); if (this._control.c...

来源: Laya_社区 发布时间: 20190828

1123. Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 [ 86%]

...FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 this.textinput_message.on(Laya.Event.CLICK,this,()=>{ console.log("CLICK>>>"); }) this.textinput_message.on(Laya.Event.MOUSE_DOWN,this,()=>{ console.log("MOUSE_DOWN>>>"); }) this.textinput_message.on(Lay...

来源: Laya_社区 发布时间: 20190315

1124. [LayaAir3]clickHandler只会执行一次,之后点击不再触发 laya.3.0.9 [ 86%]

...);                  let btn:Laya.Button = LayaUtil.GetChildByPath(this.owner, "CreatePanel/BtnCreate");                 btn.clickHandler = Laya.Handler.create(this, this.onClickCreate)                 this.drawGrid();     }      onClickCreate()     {         // ()...

来源: Laya_社区 发布时间: 20231221

1125. 一个修复Laya1.8.3中的粒子销毁时报错黑屏问题的思路 [ 86%]

...ver.beginFlush; Laya.RunDriver.beginFlush = function () { $beginFlush.call(this); let attrs = Laya.Buffer._enableAtributes; if (attrs) { attrs.forEach((buffer, index) => { if (buffer && buffer.deleted) { Laya.WebGL.mainContext.disableVertexAttribArray(index); attrs[index] = null; } }); wh...

来源: Laya_社区 发布时间: 20200708

1126. Dialog中编辑的动画如何控制? [ 86%]

...同来自: function TestUI() { var Event = laya.events.Event; TestUI.super(this); this.ani1.play(15);//play的第一个参数是从第几帧开始播放 Laya.stage.on(Laya.Event.CLICK,this,onClick); } Laya.class(TestUI, "TestUI", TestPageUI); function onClick() { this.ani1.stop();//停止播放 this...

来源: Laya_社区 发布时间: 20170526

1127. HTMLDivElement下划线换行时,下划线颜色错误 [ 86%]

...Line) graphic.drawLine(startWord.x,lineY,lastWords.x+lastWords.width,lineY,this.color,1); var hitRec=HTMLHitRect.create(); hitRec.rec.setTo(startWord.x,lastWords.y,lastWords.x+lastWords.width-startWord.x,lastWords.height); hitRec.href=this.href; recList.push(hitRec); }graphic.drawLine()这里会用...

来源: Laya_社区 发布时间: 20190801

1128. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 86%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

来源: Laya2.0_文档 发布时间: 20210714

1129. 高级应用-实时阴影 [ 86%]

.../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh" ], Laya.Handler.create(this, onComplete)); var _quaternion = new Laya.Quaternion(); Laya.timer.frameLoop(1, null, function () { Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion); var _direction = directionLight.direction; Laya.Vector...

来源: Laya_示例 发布时间: 20260303

1130. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 86%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { var list: List = new List(); list.itemRender = Item; list.repeatX = 1; list.repeatY = 4; list.x = (Laya.stage.width - Item.WID) / 2; list.y = (Laya.stage.height - Item.HEI * list.repeat...

来源: Laya2.0_文档 发布时间: 20210715