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

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

151. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 86%]

...AStart网格 */ private createGridFromAStarMap(texture): any { var textureWidth = texture.width; var textureHeight = texture.height; var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; for (var w = 0; w < textureWidth; w++) { var colaStarArr = aStarArr[w] = []; for (var h = 0;...

来源: Laya3.0_文档 发布时间: 20230303

152. 无限循环滚动列表 [ 86%]

... middle         var midX = this._list.scrollPane.posX + this._list.viewWidth / 2;         var cnt = this._list.numChildren;         for (var i = 0; i < cnt; i++) {             var obj = this._list.getChildAt(i);             var dist = Math.abs(midX - obj.x - obj.width / 2)...

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

153. 动画-新版骨骼动画 [ 86%]

...er.pixelRatio, Laya.Browser.pixelRatio); changeActionButton.pos(Laya.stage.width / 2 - changeActionButton.width * Laya.Browser.pixelRatio / 2, Laya.stage.height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { //根据名称播放动画 zombieAnimator.pla...

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

154. 【简单跑酷--JS版】---Lv.3 添加地板 [ 86%]

...的速度和移动比背景快一点 this.x -= 5 * 1.2; if((this.x + this.width) < 0){ //判断整个floor是否不在屏幕里面了 如果不在了 移除当前floor Laya.timer.clear(this, this.onLoop); this.visible = false; this.removeSelf(); } } })(); 地板有了 我们打开MapFloor.js 来...

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

155. 动画-图集动画 [ 86%]

...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(AniConfPath, Handler.crea...

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

156. 新人求教!!! [ 86%]

...ics.drawTexture(texture);   //设置纹理宽高   this.img.size(texture.width, texture.height); <!--  我想把加粗部分换成  this.img.graphics.drawTexture(Laya.loader.getRes(imgUrl),100,50,60,60);   为什么就不起作用了,switchImg()只执行了一次,不能实现切换图片 ...

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

157. TiledMap.moveViewPort(x,y) 为嘛要传入负数 [ 86%]

... tmapsp.zOrder=1;         this.tMap.changeViewPort(-((Laya.stage.width-this.tMap.width)/2),-((Laya.stage.height-this.tMap.height)/2),this.tMap.width,this.tMap.height);         this.addChild(this.tMap.mapSprite()); 请问这是什么意思啊 2020-04-20 添加评论 免费帖 --> 分...

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

158. 粒子-粒子演示1 [ 86%]

...t = Laya.Stat; // 不支持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"; Stat.show(); Laya.loader.load(partPath...

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

159. Panel初始化BUG [ 86%]

...设置内容的宽度、高度(以像素为单位)。      * @param width 宽度。      * @param height 高度。      */     private setContentSize(width: number, height: number): void {         var content: Box = this._content;         var rectX = 0;         var rectY =...

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

160. image在相应loaded的时候,无法正确获取高度 [ 86%]

...is.init); } private init():void { console.log("init", this.x, this.y, this.width, this.height, this.scaleX, this.scaleY); var createOption: any = { isStatic: false, }; this.matterBody = Matter.Bodies.rectangle(this.x, this.y, this.width, this.height, createOption); Matter.World.add(GameMain.instance...

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