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

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

791. laya.display.Text [ 49%]

...值为Sprite对象本身,所以可以使用如下语法:spr.pivot(...).pos(50, 100); Sprite pos(x:Number, y:Number, speedMode:Boolean = false):Sprite 设置坐标位置。相当于分别设置x和y属性。 因为返回值为Sprite对象本身,所以可以使用如下语法:spr.pos(...).sca...

来源: Laya2.0_api 发布时间: 20190513

792. laya.map.TileAniSprite_API3.0 [ 49%]

...rDeserialize onAwake onDestroy onDisable onEnable once parentRepaint pivot pos reCache removeChild removeChildAt removeChildByName removeChildren removeSelf render repaint replaceChild runCallLater scale setChildIndex setGraphics setSelfBounds setTileTextureSet set_anchorX set_anchorY set_height set...

来源: Laya3.0_api 发布时间: 20231115

793. 求救 Laya2.0下的Particle2D问题 [ 49%]

... } if (play) { frame.rotation=frameRotation; sprite.addChild(frame); frame.pos(frameX, frameY); frame.emitter.start(); frame.play(); } else { sprite.removeChildren(); } })); } else { return; } } 2019-07-23 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

794. 官方3D空间转2D空间的demo问题:当3D模型走出视野外后,也投影到屏幕了 [ 49%]

...改下面一行代码就可以复现这个bug。 function animate() { // _position.x = Math.sin(scaleDelta += 0.01); //删除这行代码 _position.z = scaleDelta += 0.01; //加上这行代码:Z轴平移直到移到视野之外 layaMonkey3D.transform.position = _position; camera.viewport.project(l...

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

795. graphics如何实现橡皮擦效果 [ 49%]

...ircle = new Sprite(); circle.graphics.drawCircle(0, 0, 50, "#000"); circle.pos(50, 50); // 设置叠加模式 circle.blendMode = "destination-out"; box.addChild(circle);   实现了擦除red节点的内容擦除  但是无法在擦除后的位置重新绘图  因为被上面有circle的透明区...

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

796. 射线检测-选取物体 [ 49%]

...men/texture/layabox.png"); box.meshRender.material = boxMat; box.transform.position = new Laya.Vector3(1.5, 0.25, 0.5); box.transform.rotate(new Laya.Vector3(0, 30, 0), false, false); var boxCollider1 = box.addComponent(Laya.BoxCollider); boxCollider1.setFromBoundBox(box.meshFilter.sharedMesh.boundi...

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

797. 飞机大战出现的问题注册了类New的时候报错未定义 [ 49%]

...loadImage("war/bc.png"); //更改背景2,放在背景1的上面 this.bg2.pos(0,-852); //把背景2放在容器中 this.addChild(this.bg2);  //创建一个帧循环,更新容器位置 Laya.timer.frameLoop(1,this,this.onLoop); } //注册类 Laya.regClass(BackGround,"BackGround",_super); var _prot...

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

798. [LayaAirIDE3]laya3.3中2D物理旋转时设置位置,会让旋转产生一个极大值 [ 49%]

...a_Fred 赞同来自: 您好,这个问题是由于强制设置Rigidbody的postion,在刚体存在角速度情况下,每帧设置随机位置,在box2D每帧的模拟积分中导致旋转角度模拟出来了极大值,建议您尽量不要做这种操作,您可以通过设置owner的pos或...

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

799. laya.display.Graphics [ 49%]

...更强大,性能会差一些 Graphics  drawTextures(texture:Texture, pos:Array):DrawTexturesCmd 批量绘制同样纹理。 Graphics  drawTriangles(texture:Texture, x:Number, y:Number, vertices:Float32Array, uvs:Float32Array, indices:Uint16Array, matrix:Matrix = null, alpha:Number = 1, color:S...

来源: Laya2.0_api 发布时间: 20190513

800. bug,ChainCollider.points第二次设置,会报错! [ 49%]

....Pool.getItemByCreateFun("bullet", this.bullet.create, this.bullet); flyer.pos(Laya.stage.mouseX, Laya.stage.mouseY); this._gameBox.addChild(flyer); this._chains.points="35,35,80,80";     //****新增代码*****,需增加private _chain; } /**开始游戏,通过激活本脚本方式开始游...

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