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

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

171. list item 添加事件后无法监听 [ 80%]

...求大神解答     // 初始化ListView function createListView(x, y, width, height, item_width, item_height) {     var list = new Laya.List();     list.itemRender = initItem(item_width, item_height);      list.repeatX = 1;     list.size(width, height);     list.x = x;    ...

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

172. 滤镜-发光滤镜 [ 80%]

... = 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_示例 发布时间: 20250312

173. 屏幕适配-缩放-No Border [ 80%]

....rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOBORDER();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOBORDER { private rect: Sprite; construc...

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

174. 屏幕适配-缩放-No Scale [ 80%]

....rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_NOSCALE();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_NOSCALE { private rect: Sprite; constructo...

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

175. laya.map.MapLayer_API3.0 [ 80%]

...ame mouseThrough name tag tarLayer drawtocanvCtx Accessors _isHeightSet _isWidthSet active activeInHierarchy alpha anchorX anchorY blendMode cacheAs components customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY g...

来源: Laya3.0_api 发布时间: 20231115

176. 分享一下自己的屏幕适配方案 [ 80%]

... 废话不多说 上代码 Laya.stage.scaleMode = Laya.Stage.SCALE_FULL nWidth:number; nHeight:number; ImgX:number; ImgY:number; Img:Laya.Image =new Laya.Image(); this.nWidth =this.bg.width; //背景图宽 this.nHeight =this.bg.height;//背景图的高 this.Img.x =0; this.Img.y =0; this.Img.url ="...

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

177. Texture.getPixels在手机真机Native环境中会报错 [ 80%]

...发报错!因为是必现所以没有提供DEMO了   getPixels(xywidth, height) {             if (window.conch) {                 return this._nativeObj.getImageData(xywidth, height); //this._nativeObj为空!             }       ...

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

178. 文本-复杂的文本样式 [ 80%]

...t = Laya.Stat; // 不支持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.createText(); } createText() { co...

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

179. 文本-自动调整文本尺寸 [ 80%]

...ow = Text.VISIBLE; autoSizeText.y = 50; // 该文本被限制了宽度 var widthLimitText = this.createSampleText(); widthLimitText.width = 100; widthLimitText.y = 180; //该文本被限制了高度 var heightLimitText = this.createSampleText(); heightLimitText.height = 20; heightLimitText.y = 320; ...

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

180. 屏幕适配-缩放-Extract Fit [ 80%]

....rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } new SmartScale_Scale_EXTRACT_FIT();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; export class SmartScale_Scale_EXTRACT_FIT { private rect: Sprite; co...

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