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

大约有 1,071 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0048 秒)

291. 屏幕适配-屏幕适配 [ 70%]

..." + "(" + modes[index] + ")"; } function onClick(e) { //输出坐标信息 console.log("mouse:", Laya.stage.mouseX, Laya.stage.mouseY); } function onResize() { //输出当前适配模式下的stage大小 console.log("size:", Laya.stage.width, Laya.stage.height); } })();module laya { import Sprite = ...

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

292. 屏幕适配-屏幕适配 [ 70%]

...配模式" + "(" + modes[index] + ")"; } onClick(e) { //输出坐标信息 console.log("mouse:", Laya.stage.mouseX, Laya.stage.mouseY); } onResize() { //输出当前适配模式下的stage大小 console.log("size:", Laya.stage.width, Laya.stage.height); } } new SmartScale_T();module laya { import Sp...

来源: Laya2.0_示例 发布时间: 20251130

293. HTMLDivElement中图文混排怎么获取实际内容大小 [ 70%]

...MLDivElement(); imageHtml.innerHTML="<img src='res/image/1.png' />"; console.log("size: " + imageHtml.width + ", " + imageHtml.height); console.log("contextSize: " + imageHtml.contextWidth + ", " + imageHtml.contextHeight); Laya.stage.addChild(imageHtml);   上述代码在Laya中运行 正确...

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

294. 物理系统之FixedConstraint(ActionScript-3D基础(AS3)-LayaAir3D之物理系统) [ 70%]

...fixedConstraint.connectedBody.mass = mass+1; //输出当前约束所受力 console.log(this.fixedConstraint.currentForce); //输出当前约束所受的力矩 console.log(this.fixedConstraint.currentTorque); } } override public function onJointBreak() { console.log("break"); } ``` - 4.示例效果...

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

295. 仅在Android微信小游戏下图片错乱 [ 69%]

...nLoaded), null, Loader.IMAGE, 1, true, null, true) } static onLoaded(res){ console.log("public assets inited !!!!") console.log(Laya.loader.getRes("res/ui/share@atlas0.png"))//此处会报循环引用错误,也就Android小游戏会 this.sInited = true }   用的是fairygui,目前已经通过...

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

296. ZipFile类用readFile读取文件内容时,整个界面都会卡住 [ 69%]

...hstr('/' + name); if (window["appcache"].updateFile(fid, 0, buf, false)) { console.log("更新缓存文件" + fid + "成功"); } else { console.log("更新缓存文件" + fid + "失败"); } } }); zip.close();//执行这一步时界面恢复正常 2018-12-28 添加评论 免费帖 --> 分享 微博 Q...

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

297. 纹理截取后内存释放不了 [ 69%]

...awTexture(t, 0, 0); oriDBArr[i] = g; } private function onClear():void { console.log(Laya.loader.getRes(_url)); Loader.clearRes(_url,true); console.log(Laya.loader.getRes(_url)); } 将一个大图截成多个小图纹理以后,截出来纹理内存好像不能释放, 如果强行调用t.dest...

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

298. 关闭指定定时器timer [ 69%]

... }); //转动逻辑 function round(){ tlate.rotation+=roundTurnChange(1); console.log(tlate.rotation); } //转动变量变化 function roundTurnChange(type){ //减速阶段 roundTurn-=0.05; if(roundTurn<=0.3){ console.log("*************************************************88"); Laya.time...

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

299. 为什么这个ui中给这个TextInput组件runtime属性绑定了一个类 [ 69%]

...这个类后, class TextInputEx extends Laya.TextInput constructor() { console.log("执行了"); super() ; } // 获取焦点 onFocus() : void { console.log("焦点进入"); // 是否缓存初始的文本提示字符串和文本颜色. if (!this.initText) { this.initText = this.textField.text ; thi...

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

300. [LayaAirIDE3]如何TextArea屏蔽掉右键的快捷菜单 [ 69%]

...ment.addEventListener('contextmenu', this.preventContextMenu);         console.log('右键菜单已禁用');     }     enableRightClick() {         if (this.preventContextMenu) {             document.removeEventListener('contextmenu', this.preventContextMenu);             con...

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