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

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

411. UI-CheckBox [ 94%]

...).png", "res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, this.onCheckBoxSkinLoaded)); } onCheckBoxSkinLoaded() { let cb; for (let i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stag...

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

412. 官方Demo摇杆控制有bug [ 94%]

...或删除一下,Roker.ts里的rockerMove方法里的如下代码:   this._currentMouse.x = Math.round(e.touchPos.x / Laya.stage.clientScaleY); this._currentMouse.y = Math.round(e.touchPos.y / Laya.stage.clientScaleY); this.currRockerbox.globalToLocal(this._currentMouse, false); 改为如下方...

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

413. websocket连接出错 [ 94%]

....init(800,600,Laya.WebGL); // var socket = io.connect('10.10.1.103:8081'); this.byte = new Laya.Byte(); this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socket.connectByUrl("ws://10.10.1.103:8888"); // this...

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

414. 射线检测-放置物体 [ 94%]

...; meshCollider.mesh = plane.meshFilter.sharedMesh; Laya.timer.frameLoop(1, this, checkHit); var ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); var point = new Laya.Vector2(); var _outHitInfo = new Laya.RaycastHit(); function checkHit() { //从屏幕空间生成射线 point...

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

415. 移动Sprite时,边缘闪烁 [ 94%]

... lastTimestamp = 0; var count = 0; var totale = 0; Laya.timer.frameLoop(1, this, function test() { var deltaTime = new Date().getTime() - lastTimestamp; lastTimestamp = new Date().getTime(); count++; totale += deltaTime; this.x += this.speed_x*deltaTime; this.y += this.speed_y*deltaTime; });用以...

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

416. LIST renderHandler的ITEM高度自定义后,设置content变更其内部容器大小不生效 [ 94%]

...大小不生效 ViewActivityLimitedTask.prototype.initComp = function() { this.list_view.vScrollBarSkin = ""; this.list_view.scrollBar.elasticBackTime = ListConst.elasticBackTime; this.list_view.scrollBar.elasticDistance = ListConst.elasticDistance; this.list_view.renderHandler = new Laya.Handler(th...

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

417. 关于3d的碰撞检测 [ 94%]

...检测的结果一直是-1 相关代码:const field: Laya.MeshSprite3D = this.scene.getChildByName("stadium").getChildByName("field") as Laya.MeshSprite3D;//拿到地板 const sprite3d1MeshCollider: Laya.MeshCollider = field.addComponent(Laya.MeshCollider) as Laya.MeshCollider; sprite3d1MeshCollider...

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

418. this.bitmap.activeResource is not a function TypeError: this.bitmap.activeResource is not a function [ 94%]

this.bitmap.activeResource is not a function TypeError: this.bitmap.activeResource is not a function if (bitmap&&bitmap._addReference){ bitmap._addReference(); } 这个代码过滤已经加了,但是会报下面这个错 this.bitmap.activeResource is not a function TypeError: this.bitmap....

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

419. 加载-错误处理和进度 [ 94%]

...fighter.png", "res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, this.onAssetLoaded), Handler.create(this, this.onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, this.onError); } onAssetLoaded(texture) { // 使用texture console.log("加...

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

420. spine动画,微信模拟器正常,真机动画图片颠倒!!!引擎大bug!!! [ 94%]

...模拟器正常。真机如下:   以下是代码: protected onEnter(){ this.img_sample.on(Laya.Event.CLICK, this, this.onImgClick); Laya.loader.load("res/atlas/comp/skeleton.atlas"); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComp...

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