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

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

731. WebGL模式下,使用fillTexture填充Sprite,在Sprite移动时,会有间隔线显示并闪烁 [ 90%]

...填充显示,当背景移动时,会显示间隔线且会不停闪烁  this.mapBg = new Laya.Sprite(); this.mapBg.name = "map"; this.mapBg.width = GameMain._width; this.mapBg.height = GameMain._height; this.mapBg.x = 0; this.mapBg.y = 0; this.mapBg.graphics.fillTexture(texture, 0, 0, GameMain._w...

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

732. Sprite-绘制各种形状 [ 90%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.drawSomething(); } drawSomething() { let sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78,...

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

733. TiledMap scale后调用moveViewPort问题 [ 90%]

...rt问题 在设置scale后调用moveViewPort会出现跳位问题,例如 this.tiledMap.scale = 1.1 this.tiledMap.moveViewPort(0,0); 实际的this.tiledMap._viewPortX是50.9,this.tiledMap._viewPortY是39.0,这样的话根本不肯能在继续正常使用moveViewPort了。 看了下代码,在...

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

734. dragonbones换装 [ 90%]

...agonbones换装 当我切换某个卡槽的图片的时候没有效果 if (this.currTexture && Render.isWebGL && this.currDisplayData.type==0 && this.currDisplayData.uvs){ this.currTexture=this.currDisplayData.createTexture(this.currTexture); } 跟代码发现this.currDisplay...

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

735. 我想动态改自定义shader里的值,应该怎么写?? [ 90%]

....js应该怎么写??我这样写set的时候报错 Uncaught TypeError: this._setValue is not a function at CustomMaterial.setAlphaTestValue (CustomMaterial.js:34) at LayaAir3D.js:94CustomMaterial.setAlphaTestValue @ CustomMaterial.js:34 (anonymous) function CustomMaterial() {     CustomMateria...

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

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

...,报错如图三),代码如下: 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

737. 获取相机renderTexture 作为阴影 的UV [ 90%]

...gb);    ts代码设置u_ShadowMapTex     onUpdate(){         this.ShadowCamera.transform.lookAt(new Vector3(0,0,0), new Vector3(0,1,0), false);         let v:Matrix4x4 = this.ShadowCamera.viewMatrix;         let p:Matrix4x4 = this.ShadowCamera.projectionMatrix...

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

738. Warning!,this class[MiniAdpter] already exist: Object {init: } [ 90%]

Warning!,this class[MiniAdpter] already exist: Object {init: } Warning!,this class[MiniAdpter] already exist: Object {init: } 为什么报这个警告 2018-04-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 w11...

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

739. addchild后,怎么去引用? [ 90%]

...引用,应该怎么去引用呢? 代码如下:listP是一个UI页面. 用this.lost1,空对象,但是用this._childs[5]是可以的 var lose1=new Laya.Animation(); lose1.loadAnimation("lose_1.ani"); lose1.x=150; lose1.y=400; lose1.size(100,300); lose1.on(Laya.Event.CLICK,this.listP,this.play1); lose1...

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

740. websocket出错 [ 90%]

...          output=socket.output;         socket.on(Laya.Event.OPEN,this,onSocketOpen);         socket.on(Laya.Event.CLOSE,this,onSocketClose);         socket.on(Laya.Event.MESSAGE,this,onMessageRev);         socket.on(Laya.Event.ERROR,this,onConnectError); 在 socket.on(Laya.Eve...

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