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

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

1921. 【laya2.0】加载并且显示图片,并且让该图片居于舞台中央,怎么写? [ 50%]

...e.addChild(logo); logo.loadImage("res/atlas/test.png", Laya.Handler.create(this, function(){ console.log("complete!!"); logo.x= Laya.stage.width/2-logo.width/2; logo.y= Laya.stage.height/2-logo.height/2; //logo.pos(Laya.stage.width/2-logo.width/2,Laya.stage.height/2-logo.height/2); })); 2018-10-10 0...

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

1922. Matter.js物理引擎:麻烦请教下matter.js创建一个刚体对象怎么创建 [ 50%]

...理引擎:麻烦请教下matter.js创建一个刚体对象怎么创建 this.shamBallBody = Matter.Bodies.circle(700, 400, 28, { // x, y, 半径 density: 0.68, // 密度 restitution: 0.8, // 弹性 });   请教下,如果是创建一个空的刚体对象怎么创建。 例如: var sp = new Laya...

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

1923. 本人想做个批量加载json文件,然后等这些文件统一加载完后回调 [ 50%]

...lrom.json", type:Loader.JSON}, ]; Laya.loader.load(altsArr, Handler.create(this, onComplete));   function onComplete():void{      trace("加载完成"); } 2018-05-18 1 1 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: 楼上的回答是正确的,关于重复过滤引擎是有判断的,...

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

1924. 用https://layaair.ldc.layabox.com/demo/?2d&Network&XML 官网例子来测试XmlDom,编译报错 [ 50%]

...子来测试XmlDom,编译报错 如题,错误信息为 warning:XmlDom This variable is not defined. 2017-10-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Monica - 知识达人 赞同来自: mab604790322 ...

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

1925. Image属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 50%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { var dialog: Image = new Image("res/ui/dialog (3).png"); dialog.pos(165, 62.5); Laya.stage.addChild(dialog); } } } new laya.UI_Image(); ```

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

1926. 微信小游戏设置网络动态加载无法显示 [ 50%]

...", type:Laya.Loader.IMAGE });  Laya.loader.load(asset,Laya.Handler.create(this,loadingCallback),null);  用Chrome调试可以显示,用Layaair调试报 [warn]Retry to load: res/atlas/bubbles.atlas [warn]Retry to load: res/atlas/game.atlas [warn]Retry to load: game/bgGame.png在微信开发工具...

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

1927. js怎么主动调用AS定义的静态变量? [ 50%]

...ingleton.loadView=null __static(DataSingleton, ['helper',function(){return this.helper=new Helper();} ]); return DataSingleton; })() 这个是AS编译完成的JS, 那我怎么在别的JS里面引用这个DataSingleton里面的dxMerchantID, 我用Laya.DataSingleton.dxMerchantID 但是报错误

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

1928. laya.display.Node [ 50%]

...。功能同Laya.timer.clearTimer()。 Parameters caller:* — 执行域(this)。  method:Function — 结束时的回调方法。 contains()method  public function contains(node:Node):Boolean 当前容器是否包含指定的 Node 节点对象 。 Parameters node:Node — 指定的 Node 节点对...

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

1929. 阴影太浓怎么变淡?看到说directlight.ambientColor,但这ambientColor属性没有 [ 50%]

...回复 uu4uu 赞同来自: 我将地面 var mat: Laya.StandardMaterial = (this.floor.getChildAt(0) as Sprite3D).meshRender.material as Laya.StandardMaterial; mat.ambientColor = new Vector3(0.5,0.5,0.5); 这样确实阴影变淡了,可地面也变色了。。。怎么办?我只要阴影变淡,...

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

1930. Button属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 50%]

...功后,执行onLoaded回调方法 Laya.loader.load(skin, Handler.create(this, onLoaded)); } private function onLoaded():void { //创建一个Button实例 var btn:Button = new Button(skin); //将Button添加到舞台 Laya.stage.addChild(btn); //设置Button相关的属性 btn.width = 100; btn.heigh...

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