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

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

51. Sprite optimizeScrollRect = true 似乎有问题 [ 88%]

...问题 this.initMask = function () { this.mask = new Sprite(); this.mask.width = this.width; this.mask.height = this.height; this.mask.scrollRect = new Rectangle(); this.mask.scrollRect.setTo(0, 0, this.width, this.height); this.mask.optimizeScrollRect = true; this.addChild(this.mask); } this.initCo...

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

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

..../../res/fighter/fighter.atlas"; //初始化引擎 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"; this.init(); //显示性能统计信息 St...

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

53. 缓动-缓动函数演示 [ 88%]

...ntroller() { const Event = Laya.Event; let durationInput = this.createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } createInputWidthLabel(label, prompt, x, y) { const Text = Laya.Text, Input = Laya.Input...

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

54. 屏幕适配-自动横屏 [ 88%]

...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); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_La...

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

55. 屏幕适配-自动竖屏 [ 88%]

...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); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_Po...

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

56. [LayaAirIDE 2.0]TextInput真机输入时显示蓝色字,求解 [ 87%]

...uth/sp_right.png"); this._arrCheck[3] = true; } break; } sp_icon.pos(input.width + 10, -8); input.addChild(sp_icon); } /** * 占位符处理 * @param input TextInput */ private _setPlaceHolder(input: Laya.TextInput) { switch (input.name) { case "input_nickname": // input.changeText("限6个中文以...

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

57. 缓动-缓动函数演示 [ 87%]

...); } function createDurationCrontroller() { var durationInput = createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } function createInputWidthLabel(label, prompt, x, y) { var text = new Text(); text.text ...

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

58. Sprite-屏幕截图 [ 87%]

...换至Canvas Config.preserveDrawingBuffer =true; Laya.init(Browser.clientWidth, Browser.clientHeight); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_FIXED_AUTO; Laya.stage.bgColor = "#232628"; Laya.loader.load(this.btnArr.concat("r...

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

59. 屏幕适配-屏幕适配 [ 87%]

...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, Image = Laya.Image, Text = Laya.Text; ...

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

60. 鼠标交互-键盘交互 [ 87%]

...Handler; // 不支持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"; Stat.show(); this.setup(); } set...

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