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

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

131. matter中layasprite怎么改变图片大小? [ 79%]

matter中layasprite怎么改变图片大小?   var roleOptions: any = {mass:1, restitution:0.8, layaSprite: sprite}; var role: any = Matter.Bodies.rectangle(180, 450, 334, 522, roleOptions);   代码类似这样的:sprite是我传入的图片,要怎么改变这张图片的大小? 2018-08-...

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

132. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 79%]

...{ constructor() { //初始化引擎 Laya.init(1136,640); var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,this.completeHandler); xhr.once(Laya.Event.ERROR,this,this.errorHandler); xhr.send("res/a.png","","get","arraybuffer"); } private completeHandler(d...

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

133. JS进度条加载问题 [ 79%]

...oLoaded),null,true,true); } function showProgress() { progressBar=new Laya.Sprite(); progressBar.loadImage("comp/BG1.jpg",50,300); progressBar.width=300; progressBar.sizeGrid="5,5,5,5"; progressBar.changeHandler=new Handler(this,onChange); //当progressBar的value值改变时触发 Laya.stage.addChi...

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

134. 关于HTMLCanvas对象的释放问题 [ 79%]

...同来自: 亲,我想问问你最后怎么解决的,我是在同一个sprite多次截图,发现截出来的图会有叠加情况 2018-01-25 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 leoganliang 相关问题 发起问题须知...

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

135. 为什么hitTestPoint始终是false? [ 79%]

为什么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

136. sprite加载图片,如果设置其高固定,宽等比? [ 79%]

sprite加载图片,如果设置其高固定,宽等比? $pic.loadImage(_pic, 14, 192, 0, 0, Handler.create(this, function(){     $pic.height = 246;     $pic.scaleX = $pic.scaleY;     trace("$pic.width:" + $pic.width); })); 这样处理后,图片高度还是100%,并不是246啊 2017-0...

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

137. 问一下这个问题要怎么改啊? [ 79%]

...这个问题要怎么改啊? appPic.as   package { import laya.display.Sprite; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; public class addPic { private var picUrl:String; private var pic:Sprite; private var picX:int; private var picY:int; public function addPic...

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

138. 升级到3.0-beta6无法选择资源了 [ 78%]

... export class NewScript extends Laya.Script {     //declare owner : Laya.Sprite3D;      @property(String)     public text: string = "";      @property(Laya.Image)     public image: Laya.Image = null;      constructor() {         super();     } } 附件 : --> 2023-04-12 添加评...

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

139. laya.ui.Dialog_API3.0 [ 78%]

...: 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

140. QQ玩一玩 获取头像后的数据是 BK.Buffer,需要如何用laya的Image显示出来? [ 78%]

...ght:"+height); var tex = new BK.Texture(buff,width,height); var sp =new BK.Sprite(200,200,tex,0,1,1,1); BK.Director.root.addChild(sp); }else if(openID == openID2){ ... } } BK.MQQ.Account.getHead(openID1, callback); BK.MQQ.Account.getHead(openID2, callback);  ========================================...

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