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

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

71. import自己写的类,new出来后为什么一片漆黑 [ 72%]

...一个类。代码如下:module npc { export class BaseNPC extends Laya.Sprite { constructor() { super(); this.graphics.drawCircle(0, 0, 10, "#ff0000"); } } }   然后在我的主文件中import,并new出来。代码如下:import BaseNPC = npc.BaseNPC; var npcc:BaseNPC = new BaseNPC(); 只要...

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

72. iphoneX环境下新手引导的抠图透明区域为黑色,其它机型都是正常的。 [ 72%]

...区域为黑色,其它机型都是正常的。 this.guideContainer = new Sprite(); this.guideContainer.cacheAs = "bitmap"; Utils.GuideLayer.addChild(this.guideContainer); this.guideContainer.on(Laya.Event.CLICK, this, this.nextStep); this.mouseEnabled = false; var maskArea: Laya.Sprite = new Laya....

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

73. 绘画圆角矩形的工具,直接用,不用自己去算 [ 72%]

...display.cmd.DrawPathCmd; import laya.display.Graphics; import laya.display.Sprite; /** * ... * @author Kun */ public class GraphicsUtil { /** * 绘画圆角矩形 * @param graghics Graghics对象 * @param x 开始绘制的x轴位置 * @param y 开始绘制的y轴位置 * @param width 矩形宽 * @pa...

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

74. app打包后黑屏 [ 72%]

...this.graphics.save()和this.graphics.restore()试下! 譬如: var sp:Sprite=new Sprite(); sp.graphics.save(); sp.graphics.draw。。。。 sp.graphics.restore(); 2017-02-07 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 jifm 相关...

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

75. 3dsprite模型的隐藏与active [ 71%]

3dsprite模型的隐藏与active 请问3dsprite模型的隐藏该怎么做?我知道之前有人问过,但没人把答案写出来。我知道active设为false是可以隐藏掉,但我想要的是该sprite3D是能接受所有的访问与互动事件操作,包括能接受射线碰撞与及...

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

76. Sprite optimizeScrollRect = true 似乎有问题 [ 71%]

Sprite optimizeScrollRect = true 似乎有问题 this.initMask = function () { this.mask = new Sprite(); this.mask.width = this.width; this.mask.height = this.height; this.mask.scrollRect = new Rectangle(); this.mask.scrollRect.setTo(0, 0, this.width, this.height); this.mask.optimizeScrollRect = tr...

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

77. Laya事件不能添加给多边形吗? [ 71%]

Laya事件不能添加给多边形吗? var clickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100, "#ffffff" ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, function(){ console.log( 'adf' ) } );   我创建一个多边...

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

78. 播放3Dmax导出的lrani动画问题 [ 71%]

...lm和lrani文件等。 以下是代码部分(as3):   var mesh:MeshSprite3D = scene.addChild(Sprite3D.load("aim/aim-aim.lm")); rootAnimations = mesh.addComponent(RigidAnimations) as RigidAnimations; //rootAnimations.url = "aim/aim.lrani"; rootAnimations.templet = AnimationTemplet.load("aim/aim...

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

79. 在LayaAir IDE用组件Rect绘制矩形,在代码中怎么获取这个对象啊 [ 71%]

...相关的链接 提交 3 个回复 sword2015 赞同来自: Rect不是继承Sprite 2017-07-04 0 0 分享 微博 QZONE 微信 cuixueying 赞同来自: Rect本身不是显示对象,如果要显示必须放到一个显示对象容器内部,譬如sprite,然后为sprite声明var即可 2017-07-04 0 0...

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

80. physics3D中使用CharacterController组件如何改变模型朝向 [ 71%]

...tyPlugin 使用须知-版本更新-问题解答(最新版本:1.7.16) sprite3d怎样使用Laya.Tween.to来做缓动呢?比如position或者scale 加载到舞台的3D模型不显示贴图 Tween如何实现无限循环改变alpha? LayaAirIDE下如何使用mask? 使用3D时候,Property 'getC...

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