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

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

121. rigidBody.applyForce 物体不会移动 [ 71%]

....MeshSprite3D = building.getChildByName( "fence15" ) as Laya.MeshSprite3D; console.log("-----"); console.log(building); console.log("-----"); console.log(moveArea); } private playRun(): void { this.animator.play("Running"); this.animator.speed = 1.0; } private playIdle(): void { this.animator.play("...

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

122. Tab组件如何通过js控制选中 [ 71%]

...: 2 人 xdkaka • 2017-12-14 17:38 我就是这么做的,不可以啊,console.log可以出来当前的选项,说明继承没有问题,但是无法更改 class Tab extends TabUI{ constructor() { super() this.zOrder = 1 console.log(this._tab._selectedIndex) //返回1,正常 this._tab._selec...

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

123. 淘宝创意互动发布指南(TypeScript-小游戏适配文档-淘宝创意互动) [ 71%]

...s,a.js 和 b.js ```javascript //a.js 中的内容: var a = function(){ console.log("a") } //b.js 中的内容: var b = function(){ console.log("b") } ``` 然后我们引用 js,调用2个方法,在 H5 上是可以正常输出内容的。 ```javascript require("a.js") require("b.js") a(); //...

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

124. 请问如何监听html的button元件ontouchstart,ontouchend等事件 [ 71%]

...ment.createElement('button'); this.btn_CloseWebiFrame.onclick = () => { console.log("onclick"); };  oncontextmenu也没有问题。this.img_closeWebiFrame.oncontextmenu = () => { console.log("aaa4"); this.img_closeWebiFrame.src = "SlotGameTemplate/phone_public_setting_source/phone_btn_setting...

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

125. [LayaAir3]自定义字体在移动浏览器不起作用 [ 71%]

...ate(this, (obj: object) => { // 第二个参数:成功回调       console.log("预加载字体结束>>>>", obj)       if (config.H_SCREEN) {         this.loadTopBarUI()       } else {         this.loadHomeUI()       }     }), Laya.Handler.create(this, (resProg...

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

126. [LayaAir3]V3.2 | 调试结果不一致,导致无法判断结果? [ 71%]

...  onStart() {     //@ts-ignore     window.camera = this.camera;     console.log("Game start", this.camera._up);     console.log(       "Game start",       this.camera._up.x,       this.camera._up.y,       this.camera._up.z     );   } } 附件 : --> testProject.zip 2024-10-29 ...

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

127. 如何在项目中加载ttf字体? [ 71%]

...plete_FontLoad),null,Laya.Loader.BUFFER); function OnComplete_FontLoad() { console.log("加载字体"); var newFont = Laya.loader.getRes("font/本墨竟圆-常规.ttf"); if(Laya.Browser.window.conch) { console.log("12313131313"); Laya.Browser.window.conch.setFontFaceFromBuffer("本墨竟圆-常规",...

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

128. [LayaAir3]laya3.2.4版本 在ide里测试点击无效 在浏览器里是正常的 [ 71%]

...示不出来的,您可以尝试打印具体的值,例如         console.log(e.currentTarget._gridData.x);         console.log(e.currentTarget._gridData.y); 就可以看到效果了 2025-03-25 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经...

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

129. 请问如何使我的自定义类UIDropBox继承Laya.Sprite? [ 70%]

...his.txt = this.getTextFeild(); this.txt.y = 50; this.txt.text = 'aasassa'; console.log(this.addChild);//undefined console.log(this._super);//undefined this.addChild(this.txt); } Laya.class(UIDropBox, "UIDropBox", Sprite); UIDropBox.prototype = { getTextFeild: function () { var text = new Text(); tex...

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

130. 纹理截取后内存释放不了 [ 70%]

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