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

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

101. 鼠标交互-Hold [ 89%]

...pePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(this.ape); // 鼠标交互 this.ape.on(Event.MOUSE_DOWN, this, this.onApePress); } onApe...

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

102. Sprite.loadImage();问题 [ 89%]

...       this.mapImg.source = texture;                 this.width = texture.width;                 this.height = texture.height;                 this.pos((Laya.stage.width - this.width)/2, (Laya.stage.height - this.height)/2);             }       ...

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

103. 创建[HTMLDivElement]时遇到错误(手动实例一次本组件可定位错误) [ 89%]

....x = this.contentT.x; this.contentDiv.y = this.contentT.y; this.contentDiv.width = this.contentT.width; this.contentDiv.height = this.contentT.height; this.contentDiv.style.width = this.contentT.width; this.contentDiv.style.height = this.contentT.height; this.contentDiv.style.fontSize = this.content...

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

104. 设置pivot后,精灵位置显示位置不正确 [ 89%]

...背景色 Laya.stage.bgColor = "#ffffff" this.sp = new Laya.Sprite(); let width = 660 let height = 420 this.sp.size(width, height) this.sp.pivot(Math.round(width / 2), Math.round(height / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") this.sp.graphics.drawRect(-this.sp.pivotX, -this.sp.pivotY, ...

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

105. 寻路系统(JavaScript-3D基础(JS)-LayaAir3D之高级应用) [ 89%]

...据计算得到AStar网格 */ createGridFromAStarMap(texture) { var textureWidth = texture.width; var textureHeight = texture.height; //读取图片像素 var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; //像素值为黑色不可通行,白色部分可以通行 for (var w = ...

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

106. 鼠标交互-Hold [ 89%]

...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_示例 发布时间: 20260303

107. 寻路系统(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 89%]

...AStar网格 */ private createGridFromAStarMap(texture):void { var textureWidth = texture.width; var textureHeight = texture.height; //读取图片像素 var pixelsInfo = texture.getPixels(); var aStarArr = []; var index = 0; //像素值为黑色不可通行,白色部分可以通行 for (var w = 0;...

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

108. 分享一个自己做的游戏公告功能,跑马灯效果 [ 89%]

...               </span>" constructor() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this._createBg() this._createView() this.on(Laya.Event.UNDISPLAY,this,this.stop) this.on(Laya.Event.DISPLAY,this,this.play) } /** 创建...

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

109. Sprite-旋转缩放 [ 89%]

...a.Stage; // 不支持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.showApe(); } showApe() { th...

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

110. 动画-图集动画 [ 88%]

... = 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(aniConfPath, Laya.Han...

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