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

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

151. 人物行走图动画 [ 81%]

....log(ani.index);  var bounds = ani.getGraphicBounds();  ani.pivot(bounds.width / 2, bounds.height / 2);    ani.pos(Laya.stage.width / 2, Laya.stage.height / 2);  console.log(ani.index);  Laya.stage.addChild(ani);  console.log(ani.index); }   json代码如下 {"frames": [ {  "filename": "wal...

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

152. 屏幕适配-缩放-Show All [ 81%]

...d(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_SHOW_ALL { private rect: Sprite; constructor() { Laya.init(550, 400); Laya....

来源: Laya_示例 发布时间: 20250312

153. 屏幕适配-缩放-Extract Fit [ 81%]

...d(rect); updateRectPos(); } function updateRectPos() { rect.x = Laya.stage.width / 2; rect.y = Laya.stage.height / 2; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; constructor() { Laya.init(550, 400); La...

来源: Laya_示例 发布时间: 20250312

154. 文本-自动换行 [ 81%]

...ya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createText(); } createText(...

来源: Laya2.0_示例 发布时间: 20250312

155. 滤镜-模糊滤镜 [ 81%]

... = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler...

来源: Laya2.0_示例 发布时间: 20250312

156. UI-ProgressBar [ 81%]

...progressBar = new ProgressBar("../../res/ui/progressBar.png"); progressBar.width = 400; progressBar.x = (Laya.stage.width - progressBar.width) / 2; progressBar.y = Laya.stage.height / 2; progressBar.sizeGrid = "5,5,5,5"; progressBar.changeHandler = new Handler(this, onChange); Laya.stage.addChild(pr...

来源: Laya_示例 发布时间: 20250312

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

...以通过getbounds获取显示对象图像的实际宽度。</p> */ width: number; /** * <p>显示对象的高度,单位为像素,默认为0。</p> * <p>此高度用于鼠标碰撞检测,并不影响显示对象图像大小。需要对显示对象的图像进行缩放...

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

158. 滤镜-模糊滤镜 [ 81%]

...tion() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(apePath, Handler.create(t...

来源: Laya_示例 发布时间: 20250312

159. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 81%]

...eateFromTexture(this.bgTexture,32*29,0,32,96), 0, 0, 32, 96); this.rightBg.width = 32; this.addChild(this.rightBg); } switch(type){ case 1: this.rightBg.visible = false; this.bg.graphics.drawTexture(this.bgTexture, 0, 0, 960, 96); break; default: //随机计算一个宽度 当然 最小是3倍 以...

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

160. 如何动态获取image的宽高? [ 81%]

如何动态获取image的宽高? var thisp:Point=new Point((this.width*this.scaleX)/2,(this.height*this.scaleY)/2); //thisp=this.globalToLocal(this.localToGlobal(thisp)); //trace(thisp.x,thisp.y,"dddddddd") var tf:Matrix=new Matrix(); tf.translate(-thisp.x,-thisp.y); __jd+=jd; tf.rotate(__jd); t...

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