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

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

181. 一个关于getPixels的问题 [ 82%]

一个关于getPixels的问题 空工程中代码如下: Main.js: const Sprite = Laya.Sprite; const Text = Laya.Text; const Texture = Laya.Texture;  Laya.init(800, 600);  var txt = new Text(); txt.pos(200, 200); txt.color = "#FFFFFF"; txt.text = "000000"; Laya.stage.addChild(txt);  var spr = n...

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

182. 2D光遮挡器与阴影 · LayaAir3.3 · 引擎文档 · LAYABOX [ 82%]

...) export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resources/bg2.png"; //组件被启用后执行,...

来源: Laya3.0_文档 发布时间: 20251010

183. 鼠标点击穿透问题 [ 81%]

...命!canvas定位后 点击区域偏移,求大大们解答 如何设置Sprite的宽高和点击区域? 关于使用matterjs物理引擎鼠标问题 ui list 里面的元素能点击两次 关于适配采用showAll后留白部分的颜色问题 问题状态 最新活动: 2015-11-02 17:06 浏...

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

184. laya.ui.Dialog_API3.0 [ 81%]

...: boolean = false Inherited from Text._ownGraphics Defined in laya/display/Sprite.ts:252 _scene _scene: Node Inherited from Node._scene Defined in laya/display/Node.ts:641 _scene3D _scene3D: any Inherited from Scene._scene3D Defined in laya/display/Scene.ts:28 _skinBaseUrl _skinBaseUrl: string Inher...

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

185. Laya.Browser获取宽高数值会变化,iphone6第一次加载正确,刷新几次就变大了。 [ 81%]

...一个 private glow: Laya.GlowFilter = new Laya.GlowFilter; 然后给10个sprite用,当点击一个sprite时,在onclick事件中加上glow效果。但是运行就报错,都还没有点。 换个写发,给每个sprite设置滤镜时new 一个glow就可以。 debug 看到方法里面new出来...

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

186. HtmlDivElement宽度设置错误 [ 81%]

...宽度来显示的 示例代码export default class HtmlTest extends Laya.Sprite { constructor() { super(); this.init(); } init() { this.bg = new Laya.Sprite(); this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlTxt.style.fon...

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

187. Laya3d下sprite 显示问题 [ 81%]

Laya3d下sprite 显示问题 相机中的rendertarget转换到图片中显示了 texture = camera.renderTarget as Texture; var sp:Sprite = new Sprite(); sp.x = 800; sp.graphics.drawTexture(texture,0,0,100,100); Laya.stage.addChild(sp); 2017-05-10 添加评论 免费帖 --> 分享 微博 QZONE ...

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

188. 为什么hitTestPoint始终是false? [ 81%]

为什么hitTestPoint始终是false? class TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } priv...

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

189. 分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 [ 81%]

分享:Sprite 转换成3D贴图(Texture2D)的方法,如果有更好的方法,请告诉我。 因为要用到的贴图并是固定的,所以有这样的需求,之前问过,过暂时没有结果:https://ask.layabox.com/question/5622   看太懂官方的源码,所以用...

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

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

WebGL模式下,使用fillTexture填充Sprite,在Sprite移动时,会有间隔线显示并闪烁 使用Sprite作为背景,且用一张小图fillTexture填充显示,当背景移动时,会显示间隔线且会停闪烁  this.mapBg = new Laya.Sprite(); this.mapBg.name = "map"; this.mapBg...

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