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

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

721. 灯光-点光 [ 90%]

.../LayaMonkey/LayaMonkey.lh")); layaMonkey.once(Laya.Event.HIERARCHY_LOADED, this, function () { var aniSprite3d = layaMonkey.getChildAt(0); var animator = aniSprite3d.getComponentByType(Laya.Animator); animator.play(null, 1.0, 75, 110); }); var _position = new Laya.Vector3(); var _quaternion = new La...

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

722. 粒子-粒子演示1 [ 90%]

...r = "#232628"; Stat.show(); Laya.loader.load(partPath, Laya.Handler.create(this, this.onAssetsLoaded), null, Loader.JSON); } onAssetsLoaded(settings) { // 当load数组的时候,回调函数传入的参数不再是资源,可以通过以下方法获取资源 // let settings = Laya.loader.getRes(p...

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

723. tween有这个一个bug [ 90%]

...,{x:point.x,y:point.y,alpha:1,update:Laya.Handler.create(point,function(){ this.visible = true; })},800,Laya.Ease.backOut,null,i*400); timeline在一开始还在正常执行, 当有一半左右的ui元素进入到场景时, timeline循环卡住不动了, 等所有ui动画执行完毕, timeline又开...

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

724. 选择压缩混淆 JS发布项目,protobuf解析报错 [ 90%]

...ader.prototype.skipType = function(wireType) { switch (wireType) { case 0: this.skip(); break; case 1: this.skip(8); break; case 2: this.skip(this.uint32()); break; case 3: do { // eslint-disable-line no-constant-condition if ((wireType = this.uint32() & 7) === 4) break; this.skipType(wireType);...

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

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

726. 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_示例 发布时间: 20250225

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

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

729. 我想动态改自定义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

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