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

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

441. [LayaAir3]关于laya更新到3.1出现射线检测不到的情况 [ 85%]

...是更新后返回的d的数据         var startPoi=new Laya.Vector3(this.Bullet.transform.position.x,this.Bullet.transform.position.y,this.Bullet.transform.position.z-0.5);//起始点         var dir = new Laya.Vector3(0,0,-1);//方向         var ray:Laya.Ray = new Laya.Ray(startPoi,d...

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

442. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 85%]

碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) if(this.outHitInfo.distance < 0)speedX = speedZ = 0;  这个判断中的this.outHitInfo.distance 一直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel...

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

443. Laya api 中可能的bug [官方来看] [ 85%]

...order时是调整不到的__proto.render=function(context,x,y){ var childs=this._childs; this._childs=this._showGridList; _super.prototype.render.call(this,context,x,y); this._childs=childs; }2.core中Sprite的zorder的set方法中 有一行代码有疑似bug,麻烦官方帮忙确认 /**z排序,...

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

444. 文本-Overflow [ 85%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { var t1: Text = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2: Text = this.createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); var t3: Text = th...

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

445. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 85%]

...频率依赖于参数指定时间。 ```javascript Laya.timer.frameLoop(1, this, animateFrameRateBased); Laya.stage.on("click", this, dispose); function dispose() { Laya.timer.clear(this, animateFrameRateBased); } ``` 当一个对象的生命周期结束时,记得清除其内部的Timer: ### **...

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

446. 3D+2D场景截屏,在不同浏览器显示效果不一致 [ 85%]

...,报错如图三),代码如下: public drawScreenshot(): void { if (!this.tempTexture2D) { this.tempTexture2D = new Laya.Texture2D(1280,720); } if (!this.tempTexture) { this.tempTexture = new Laya.Texture(this.tempTexture2D); } // Laya.timer.once(110, this, function(){ let cans = Laya.Browser....

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

447. 微信小游戏截图问题 [ 85%]

...ight: canvas.height, destWidth: canvas.width, destHeight: canvas.height }) this.ctx.graphics.loadImage(wxhtmlC, 0, 0,this.ctx.width,this.ctx.height); 然后用drawTextture,很多问题都是有这个,可以带到下面那些东西怎么转成图片呢? var htmlC = Laya.stage.drawToTexture(Laya...

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

448. 请问怎么制作一个layabox js版本的加载效果 [ 85%]

...自: var Loadings=(function(_super) { function Loadings(){ Loadings.super(this); var Stage = Laya.Stage; var ProgressBar = Laya.ProgressBar; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var progressBar; Laya.init(1024, 600,WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = St...

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

449. 跟着老师打地鼠游戏写的代码,JS为什么会出错 [ 85%]

...为什么会出错 var Game=(function(_super){ function Game(){ Game.super(this); this.mole=new Mole() //这里会报错 } Laya.class(Game,"Game",_super); return Game; })(ui.GameUI) var GameUI=(function(_super){ function GameUI(){ this.btn_start=null; this.audio=null; GameUI.__super.call(this); } CL...

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

450. 微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene [ 85%]

...the .lh file root type must be Scene,please use other function to  load  this file.;at api readFile success callback function Error: Scene: the .lh file root type must be Scene,please use other function to  load  this file.     at MyScene.__proto.onAsynLoaded (http://127.0.0.1:59022/game/code....

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