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

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

221. 文本对齐与自动换行(TypeScript-LayaAir基础篇(TS)-文本) [ 80%]

...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"; var txt:Laya.Text = new Laya.Text(); //设置文本内容 txt.t...

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

222. 设置viewport后显示区域变黑色 [ 80%]

...      this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height);             this.scrollRect = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

223. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 80%]

....Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Event.CLICK, this, changeVxVy ); } function changeVxVy( e ){ console.log( e...

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

224. 屏幕适配-屏幕适配 [ 80%]

...["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"], index = 0, txt; class SmartScale_T { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Image = Laya.Image, Text = Laya.Text; // 不支持...

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

225. 发布Oppo小游戏屏幕适配bug [ 80%]

...atic resize(): void { // let w = this.config.width; // let h = this.config.height; // let screen_wh_scale = Laya.Browser.clientWidth / Laya.Browser.clientHeight; // if (Laya.stage.scaleMode == Laya.Stage.SCALE_FIXED_WIDTH) { // h = this.config.width / screen_wh_scale; // } else { // w = this.config....

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

226. UI-Input [ 80%]

...ar WebGL = Laya.WebGL; var SPACING = 100; var INPUT_WIDTH = 300; var INPUT_HEIGHT = 50; var Y_OFFSET = 50; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMo...

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

227. UI-Input [ 80%]

...rIDE让项目开发更高效。let SPACING = 100, INPUT_WIDTH = 300, INPUT_HEIGHT = 50, Y_OFFSET = 50, skins; class UI_Input { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Lay...

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

228. 使用Laya.loader.load加载Laya.Loader.FONT位图字体文件时就会出现无限循环加载,一直到浏览器奔溃 [ 80%]

...// 不支持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";   this.loadFont(); }   loadFont() { const  B...

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

229. Laya2.2问题,有没有遇到的? [ 80%]

...var reg = Laya.ClassUtils.regClass; } } GameConfig.width = 640; GameConfig.height = 1136; GameConfig.scaleMode = "fixedwidth"; GameConfig.screenMode = "none"; GameConfig.alignV = "top"; GameConfig.alignH = "left"; GameConfig.startScene = ""; GameConfig.sceneRoot = ""; GameConfig.debug = false; GameC...

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

230. 移动端横竖屏适配(类似锁屏效果)? [ 80%]

...class ShiPei { private var fillWidth:Number=Browser.width; private var fillHeight:Number=Browser.height; public function ShiPei() { //设置初始化 Laya.init(fillWidth,fillHeight); //设置横屏显示 Laya.stage.screenMode="horizontal"; //默认触发一次横竖屏设置 onResize(); //添加RESI...

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