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

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

1. 一个关于getPixels的问题 [ 100%]

一个关于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

2. native2.0压缩纹理如何使用 [ 95%]

....loader.load("res/1.pkm", Handler.create(null, function():void {     var spr:Sprite = new Sprite();     spr.loadImage("res/1.pkm");     spr.pos(100, 100);     Laya.stage.addChild(spr); }), null, Loader.IMAGE); 附件就是tp转的图片,这个是加载的代码 1.zip 2018-12-20 0 0 分享 ...

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

3. 在脚本里自定义IDE属性预制体数组类型获取的结果不对 [ 90%]

...",Handler.create(this,onCar)); public function onCar(obj:Object):void{ var spr:Prefab = new Prafab();              spr.json=obj;             var car:Sprite = Pool.getItemByCreateFun("Car", this.spr.create, this.spr);                          Laya.stage...

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

4. [LayaAir3]节点在加入stage结构前设置2d物理碰撞形状,碰撞不生效 [ 88%]

...动设置applyOwnerColliderComponent为false,您可以修改代码,let Spr = new Laya.Sprite(); Spr.pos(200, 100); let RigidBody = Spr.addComponent(Laya.RigidBody); RigidBody.applyOwnerColliderComponent = false; RigidBody.gravityScale = 0; 先手动设置。在即将推出的3.3.2版本中,我...

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

5. 画了一个封闭的曲线,获取鼠标点击处的像素,为何坐标对不上导致拿不到正确位置的Texture? [ 85%]

...上导致拿不到正确位置的Texture? package { import laya.display.Sprite; import laya.display.Stage; import laya.events.Event; import laya.resource.HTMLCanvas; import laya.resource.Texture; import rain.core.StageReferance; public class Main { private var _view:Sprite; public function Main() ...

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

6. 回调函数传递sprite3D问题 [ 80%]

回调函数传递sprite3D问题 使用 Laya.timer.frameLoop();函数 看了官方API,第四个参数是传一个数组,作为回调函数的入参, var spriteArray = new Array(); spriteArray.push(warehouse1); Laya.timer.frameLoop(1, this, freshBubble,spriteArray); function freshBubble(sprite...

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

7. [LayaAirIDE3]skel骨骼动画播放失败,编辑器预览没问题 [ 63%]

...     if (this.skeleton["_renderType"] !== undefined) {         this.spr_xiaoshan.addChild(this.skeleton);         this.skeleton.pos(0, 0);         this.skeleton.scale(0.3, 0.3);         this.skeleton.play(0, true);     } else {         console.warn("无效的 skeleton, 跳过...

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