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

大约有 1,604 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0064 秒)

411. 加载图片显示为黑屏(附代码),为什么? [ 79%]

... Laya.stage.bgColor = "#CCBBAA"; var panel = new Panel(); Laya.stage.addChild(panel); panel.size(460, 704); rule_ct = new Sprite(); Laya.stage.addChild(rule_ct); rule_ct.loadImage("rule_txt.png", 0, 0, 460, 0, Handler.create(this, function(){ panel.addChild(rule_ct); })); } } }    ...

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

412. 屏幕方向:自动横屏与自动竖屏的设置详解(JavaScript-LayaAir基础篇(JS)-屏幕适配) [ 79%]

...g.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text = new Laya.Label(); text.text = "游戏的水平方向"; text.color = "gray"; text.fontSize = 100; text.centerX = 0; text.centerY = 50; Laya.stage.addChild(text); } Laya.init(0, 0, Laya.WebGL)...

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

413. 3d场景下面有张2d的图片,当鼠标焦点不在该网页时,2d图片为啥会闪动 [ 79%]

...       sprite0.cacheAsBitmap = true;             Laya.stage.addChildAt(sprite0,0);                          var sprite1:Sprite = new Sprite();             sprite1.loadImage("creatRoom/background_bk.png");             sprite1.pos(Laya.stage._width-512...

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

414. 图集动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 79%]

...niUrls("die",6),"dizziness"); roleAni.play(0,true,"dizziness"); Laya.stage.addChild(roleAni); } /** * 创建一组动画的url数组(美术资源地址数组) * @param aniName 动作的名称,用于生成url * @param length 动画最后一帧的索引值, */ private function aniUrls(aniName:...

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

415. 屏幕方向:自动横屏与自动竖屏的设置详解(TypeScript-LayaAir基础篇(TS)-屏幕适配) [ 79%]

...g.centerX = 0; img.centerY = -70; img.skin = "res/monkey2.png"; Laya.stage.addChild(img); //文字 var text:Laya.Label = new Laya.Label(); text.text = "游戏的水平方向"; text.color = "gray"; text.fontSize = 100; text.centerX = 0; text.centerY = 50; Laya.stage.addChild(text); } Laya.init(0, 0, ...

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

416. 为什么laya2.0加载不了.lm文件? [ 79%]

....create(this, this.completeHandler)); completeHandler(): void { Laya.stage.addChild(Laya.loader.getRes("LayaScene_Scene/Scene.ls")); Laya.stage.addChild(Laya.loader.getRes("LayaScene_Scene/Assets/BakerHouse/Models/Baker_house-Baker_house.lm")) } 在第二个addchild的时候报错了!!!! 201...

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

417. 加了两个遮罩后的动画,帧频只有10了,有demo,有项目,有源码 [ 79%]

....WebGL); Laya.Stat.show(); const container = new Laya.Sprite(); Laya.stage.addChild(container); const mask = new Laya.Sprite(); mask.graphics.drawPoly(0, 0, [0, 0, 484, 0, 1483, 950, 0, 950], '#ff0000'); // container.addChild(mask); container.mask = mask; const ani = new Laya.Animation(); container....

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

418. 在微信小游戏中使用list,兼听不到mouseHandler跟selectHandler。 [ 79%]

...Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img);   this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box);   // 主要逻辑代码 var Stage   = Laya.Stage; var List    = Laya.List; var Handler = Laya.Handler; var WebG...

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

419. 报告bug: graphics.drawCircle在layaair调试时,改变外框尺寸,半径未能自适应调整 [ 79%]

...aleMode = "showall"; //添加Sprite var sp = new Laya.Sprite(); Laya.stage.addChild(sp); //将sp移动到横坐标400,纵坐标300的位置 sp.pos(400,300); //绘制两条在sp的原点交叉的直线 sp.graphics.drawLine(-50,0,50,0,'#00ff00',1); sp.graphics.drawLine(0,-50,0,50,'#00ff00',1); //绘...

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

420. 打包app后可以横屏旋转 [ 79%]

...        mainCan = new Sprite();             Laya.stage.addChild(mainCan);                          dialogCan = new Sprite();             Laya.stage.addChild(dialogCan);                          tipCan = new Sprite();  ...

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