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

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

251. 关于graphics.drawPath手机端和PC端不一致的问题 [ 66%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; this.sp = new Sprite(); Laya.stage.addChild(this.sp); this.sp.graphics.drawPath(100, 100, [["moveTo", 100, 0], ["arcTo", 200, 0, 200, 100, 100], ["arcTo", 200, 200, 100, 200, 100], ["...

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

252. 屏幕适配-屏幕适配 [ 66%]

...GL = Laya.WebGL; //所有适配模式 var modes = ["noscale", "exactfit", "showall", "noborder", "full", "fixedwidth", "fixedheight"]; //当前适配模式索引 var index = 0; //全局文本信息 var txt; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(1136, 640); //设置适配...

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

253. 屏幕适配-屏幕适配 [ 66%]

...LayaAirIDE让项目开发更高效。let modes = ["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, I...

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

254. 混合模式-Lighter [ 66%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createPhoenixes(); // 动态背景渲染 evalBgColor(); Laya.timer.frameLoop(1, this, renderBg); } function createPhoenixes() { var scaleFactor = Mat...

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

255. 混合模式-Lighter [ 66%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.bgColorTweener = new Tween(); this.setup(); } setup() { this.createPhoenixes(); // 动态背景渲染 this.evalBgColor(); Laya.timer.frameLoop(1, this, this.renderBg)...

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

256. 设置滤镜(TypeScript-LayaAir基础篇(TS)-位图) [ 65%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.ApePath, Handler.create(this, this.setup)); } private setup(): void { this.normalizeApe(); this.makeRedApe(); this.grayingApe(); } private normalizeApe(): void {...

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

257. laya.display.Stage [ 65%]

...围: "noscale" :不缩放; "exactfit" :全屏不等比缩放; "showall" :最小比例缩放; "noborder" :最大比例缩放; "full" :不缩放,stage的宽高等于屏幕宽高; "fixedwidth" :宽度不变,高度根据屏幕比缩放; "fixedheight" :高度不变,宽...

来源: Laya2.0_api 发布时间: 20190513

258. 加载-销毁Texture使用的图片资源 [ 65%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.init(); //显示性能统计信息 Stat.show(); } /** * 初始化场景 */ GameMain.prototype.init = function () { //创建背景 this.spBg = Sprite.fromImage(this.PathBg); Laya....

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

259. 鼠标交互-滑动 [ 65%]

...GN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { createSprtie(); drawTrack(); } function createSprtie() { const w = 50; const h = 30; button = new Sprite(); button.graphics.drawRect(0, 0, w, h, "#FF...

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

260. UI-List [ 64%]

...Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const List = Laya.List, Handler = Laya.Handler; let list = new List(); Laya.stage.addChild(list); list.itemRender = Item; list.repeatX = 1; list....

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