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

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

111. 滤镜-发光滤镜 [ 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(apePath, Laya.Handler...

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

112. UI-Button [ 88%]

...发语言、LayaAirIDE让项目开发更高效。let COLUMNS = 2, BUTTON_WIDTH = 147, BUTTON_HEIGHT = 165 / 3, HORIZONTAL_SPACING = 200, VERTICAL_SPACING = 100, xOffset, yOffset, skins; class UI_Button { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Lay...

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

113. SCALE_FIXED_WIDTH适配屏幕的问题 [ 88%]

SCALE_FIXED_WIDTH适配屏幕的问题 主要设置屏幕适配的代码是下面,大部分手机是好的,有少部分andriod机器有比较大的概率出现半屏的情况。请问下是引擎不兼容呢,还是代码写的不完善 问题手机有:三星S8+,oppo r9m,oppo x20,vivo y7...

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

114. htmlDiv中img图片大小问题 [ 88%]

...aya.HTMLDivElement(); let imgUrl = 'images/kb-emoji-U+E056.png'; // origin width/height: 64/64px; //let imgStr = `<img src="${imgUrl}" width="30" height="30"></img>`; let imgStr = `<img src="${imgUrl}" style="width:30px;height:30px"></img>`; htmlDiv.style.color = '#ffffff'; h...

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

115. UI-Button [ 88%]

...andler = Laya.Handler; var WebGL = Laya.WebGL; var COLUMNS = 2; var BUTTON_WIDTH = 147; var BUTTON_HEIGHT = 165 / 3; var HORIZONTAL_SPACING = 200; var VERTICAL_SPACING = 100; var xOffset; var yOffset; var skins; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya...

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

116. DOM元素-表单输入 [ 88%]

...rm = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; var rowHeightDelta = this.rowSpacing + this.rowHeight; // 显示左侧标...

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

117. laya.display.Graphics [ 88%]

... true):void 清空绘制命令。 Graphics  clipRect(x:Number, y:Number, width:Number, height:Number):ClipRectCmd 设置剪裁区域,超出剪裁区域的坐标不显示。 Graphics  destroy():void 销毁此对象。 Graphics  drawCircle(x:Number, y:Number, radius:Number, fillColor:*, lineCo...

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

118. 性能测试-卡通人物 [ 88%]

... (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgColor = "#232628"; Stat.show(); Laya.loader.load("../../res/cartoonCharacters/cartoonCharactors.json", Handler.create(this, createCharacters), null, Loader.ATLAS); })(); function cr...

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

119. 显示对象的mask缩放为0时遮罩效果不生效 [ 88%]

...没有生效 Laya.init(640, 1136); let testSp = new Laya.Sprite(); testSp.width = 200; testSp.height = 50; testSp.graphics.clear(); testSp.graphics.drawRect(0, 0, testSp.width, testSp.height,'#FF0000'); let tmpMask = new Laya.Sprite(); tmpMask.width = testSp.width; tmpMask.height = testSp.height; tm...

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

120. 音频-播放演示 [ 88%]

...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() { var gap ...

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