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

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

71. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 70%]

... > 图片的显示是游戏开发基础,本篇从API到示例分别介绍Sprite.loadImage与Graphics.drawTexture两种显示图片的方法。 ## 1、用loadImage方法显示与切换图片 ### 1.1 loadImage API概述 在API文档中搜索laya.display.Sprite,可以找到loadImage()方法,如...

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

72. 可以为线条设置hit(碰撞)区域吗? [ 70%]

可以为线条设置hit(碰撞)区域吗? var sp:Sprite = new Sprite();sp.graphics.clear(); sp.graphics.drawRect(0, 0, 100,100,"#ff0000" ); var hit:HitArea = new HitArea(); hit.hit = sp.graphics; sp.hitArea = hit;   使用上面的方法可以给有填充 sp 添加触发区域!   但是如...

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

73. 骨骼动画-Spine事件 [ 70%]

...t mFactory, mArmature, mStartX = 400, mStartY = 500, mCurrIndex = 0, mLabelSprite; class Skeleton_SpineEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cli...

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

74. laya.d3.core.pixelLine.PixelLineSprite3D [ 70%]

...tationAll Packages | All Classes | Index | Frames No Frames PixelLineSprite3DProperties | Methods | Events Packagelaya.d3.core.pixelLineClasspublic class PixelLineSprite3DInheritancePixelLineSprite3D RenderableSprite3D Sprite3D Node EventDispatcher Object PixelLineSprite3D 类用于像素...

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

75. 渲染性能实例问题 [ 70%]

...oc/?nav=zh-js-3-2-2 从以上找到实例, 这代代码不能跑。我看sprite里面没有addChild 应该怎么做的呢?Sprite 不可以addChild. Laya.init(550,400,Laya.WebGL);Laya.Stat.show();var textBox = new Laya.Sprite();for(var i=0;i<10000;i++){txt=new Text();txt.text=(Math.random()*10...

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

76. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 70%]

... laya123 package huamao.layer.ui { import app.TheGame; import laya.display.Sprite; import laya.maths.Rectangle; public class CdSprite extends Sprite { public static const START:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:...

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

77. Sprite-屏幕截图 [ 70%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_ScreenShot { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nam...

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

78. 图片显示好奇怪 [ 69%]

图片显示好奇怪 我有一个sprite loadImage一个图片 然后 过了几秒钟 我想把这个图片换一下 就 用这个sprte重新loadimg一下另外一个url 这时候发现 好像 两张图片重叠了在一起 而不是替换 2017-05-05 添加评论 免费帖 --> 分享 微博 QZONE ...

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

79. 用drawPie绘制的sprite用于遮罩mask,会出现错乱。 [ 69%]

用drawPie绘制的sprite用于遮罩mask,会出现错乱。 在frameLoop下,每次执行graphics.clear(),graphics.drawPie(...),扇形本身是没有问题的,但用于mask后,会出现显示混乱:抖动、漏线。具体如图: 附件 : --> 2017-03-08 添加评论 免费帖 --> 分...

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

80. [LayaAir3]关于drawToRenderTexture2D绘制后图像模糊问题补充 [ 69%]

... and subtracts the offset of the cache rectangle. When false, it keeps the sprite's original relative position for drawing. * @param flipY Optional. If true, the texture will be flipped vertical. Default is false. * @param clearColor Optional. If provided, the texture will be cleared to this color b...

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