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

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

41. 关于video [ 85%]

...像就一直处于底部,这个是什么问题 Laya.init(640,960,Laya.WebGL); Laya.stage.scaleMode = "exactfit"; Laya.stage.alignH = "center"; var Sprite = laya.display.Sprite; var Bg = new Sprite(); Bg.loadImage("../laya/assets/bg_back.png"); Laya.stage.addChild(Bg); Bg.on(Laya.Event.MOUSE_DOWN, ...

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

42. Image.loadImage 方法加载问题 [ 85%]

...Click";   public _publicSpaceData:datasheet.PublicSpaceData;   private bg:Laya.Image;   private btnEnter:Laya.Button;   constructor()   {    super();    this.initUI();   }   private initUI () : void   {    this.bg = new Laya.Image();    this.btnEnter = new Laya.Button(); ...

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

43. [LayaAir3]资源未清理干净 [ 85%]

...s/Box.lh (2) [5, PrefabImpl] loader http://localhost:18090/resources/chest_bg.png (4) [6, Texture, 7, Texture2D] loader http://localhost:18090/atlas/comp/img_bg.png (4) [6, Texture, 7, Texture2D] close --------------------------------gc 6000----------------------------------- loader http://localhost...

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

44. 怎么获取图片的原始宽高 [ 85%]

...请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: this.bg_img.skin = "ui/bg.jpg"; this.bg_img.width = Laya.stage.width; this.bg_img.height = Laya.stage.height; Image使用skin修改显示,改变宽高时,会拉伸显示内容 2018-01-24 0 2 分享 微博 QZONE 微信 为什么...

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

45. 获取Image宽度的问题 [ 84%]

获取Image宽度的问题 当我从代码中创建图片(img_bg.png)添加到场景中时,在代码中获取图片的width就等于0当我提前在场景中放置好一个相同的图片资源(img_bg.png),然后再在代码中创建一个图片(img_bg.png)时,就可以获取到img_bg的width...

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

46. hitArea怎么用 [ 84%]

...   Laya.stage.addChild(container);                       var bg2Sprite =  new Sprite();         bg2Sprite.graphics.drawRect(0,0,640,1136,'#ff0000');         bg2Sprite.size(640,1136)         container.hitArea = bg2Sprite;          container.on(Event.CLICK,this,deskClick...

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

47. "Background is not defined"怎么会没定义呢???求救 [ 84%]

... Game.jsvar Game = (function(){ (function Game(){ Laya.init(600,800); this.bg = new window.Background(); Laya.stage.addChild(this.bg); })(); })();Background.js var Background = (function(_super){ function Background(){ Background.super(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("res/bac...

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

48. 新手,图片加载不进去,没有报错。很疑问 [ 84%]

...nction(_super){ function BackGround(){ BackGround.__super.call(this); this.bg1 = new Laya.Sprite(); this.bg1.loadImage("comp/bg.png"); this.addChild(this.bg1); } Laya.class(BackGround,"BackGround",_super); return BackGround; })(Laya.Sprite)代码我这样写可以正常显示,你试试 2017-02-22 ...

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

49. List滚动条问题 [ 83%]

...es\\common\\BalanceSellDlg\\xiaodou.png",hot:1,orderCount:9} // 背景 var bg_image = new Laya.Image(); bg_image.skin = "res/popupwnd/market_item_bg.png"; bg_image.pos(0, 0); bg_image.size(312, 462); this.addChild(bg_image); // 金豆数 this._goldLabel = new Laya.Label(); this._goldLabel.color = "#...

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

50. Clip属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 83%]

...lip = Laya.Clip; var Image = Laya.Image; var Handler = Laya.Handler; var WebGL = Laya.WebGL; var buttonSkin = "res/ui/button-7.png"; var clipSkin = "res/ui/num0-9.png"; var bgSkin = "res/ui/coutDown.png"; var counter, currFrame, controller; (function() { // 不支持WebGL时自动切换至Canvas Lay...

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