大约有 7 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0057 秒)
一个关于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
....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
...",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
...动设置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
...上导致拿不到正确位置的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
回调函数传递sprite3D问题 使用 Laya.timer.frameLoop();函数 看了官方API,第四个参数是传一个数组,作为回调函数的入参, var spriteArray = new Array(); spriteArray.push(warehouse1); Laya.timer.frameLoop(1, this, freshBubble,spriteArray); function freshBubble(sprite...
来源: Laya_社区 发布时间: 20180105
... 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