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

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

271. 屏幕适配-自动竖屏 [ 80%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } } new SmartScale_Portrait();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; exp...

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

272. 屏幕适配-自动横屏 [ 80%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } } new SmartScale_Landscape();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; ex...

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

273. 和原生Dom交互 · LayaAir3.4 · 引擎文档 · LAYABOX [ 80%]

...现这种效果。 var data = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">' + '<foreignObject width="100%" height="100%">' + '<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' + '<em>I</em> like ' + '<span style="color:white; te...

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

274. Laya.Image怎么获取图片的真实大小 [ 80%]

...r.getRes('../laya/assets/comp/bg.jpg');       console.log([this.bgImage.width,this.bgImage.height]); })); 2018-07-30 1 0 分享 微博 QZONE 微信 Laya_Aaron 赞同来自: width height 不行吗? 2018-07-30 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前...

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

275. 区块地图-带动画的地图 [ 80%]

...edMap/orthogonal-test-movelayer.json", new Laya.Rectangle(0, 0, Laya.stage.width, Laya.stage.height), null); } } new TiledMap_AnimationTile();module laya { import Stage = Laya.Stage; import TiledMap = Laya.TiledMap; import Rectangle = Laya.Rectangle; import WebGL = Laya.WebGL; export class TiledMap_...

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

276. 文本-字数限制 [ 80%]

...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.createInput(); } createInpu...

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

277. Layabox web 复制一段文字到剪贴板 [ 80%]

...position = "absolute"; this.newMask.style.zIndex = "1"; this.newMask.style.width = "100%"; this.newMask.style.height = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) + 100 + "px"; this.newMask.style.top = "0px"; this.newMask.style.left = "0px"; this.newMask.style.backgro...

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

278. 区块地图-等角地图 [ 80%]

...s/tiledMap/isometric_grass_and_water.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this, mapLoaded), null, new Point(1600, 800)); } function onStageClick() { var p = new Point(0, 0); layer.getTilePositionByScreenPos(Laya.stage.mouseX, Laya.stage.mouseY, p); layer.ge...

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

279. 鼠标交互-双指旋转(多点触控) [ 80%]

...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"; setup(); })(); function setup() { createSp...

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

280. drawToCanvas真机资源无法释放 [ 80%]

... var htmc = this.paper.displayObject.drawToCanvas(this.paper.displayObject.width, this.paper.displayObject.height, 0,0); htmc.destroy(); --------》     __proto.destroy=function(){         this._ctx && this._ctx.destroy();         this._ctx=null;     } 在这里,thi...

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