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

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

121. Laya.Video内存泄漏问题 [ 51%]

...tion() { v.destroy(); }); }顺便提供一个简单的修复方法: laya.device.js Line 623: 增加以下代码while(this.videoElement.childElementCount) { this.videoElement.firstChild.remove(); } this.videoElement.src = ''; 亲测仅仅移除videoElement的source子节点并不能加速内存释...

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

122. 输入设备-指南针 [ 51%]

...= Laya.WebGL; var Event = Laya.Event; var compassImgPath = "../../res/inputDevice/kd.png"; var compassImg; var degreesText; var directionIndicator; var firstTime = true; (function() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Lay...

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

123. 屏幕适配API概述(ActionScript-2D基础篇(AS3)-屏幕适配) [ 50%]

...味着同样大小的屏幕上,像素却多了一倍,这提高的就是devicePixelRatio,其他安卓移动设备也类似与此。   所以我们得出一个公式: `物理分辨率=像素分辨率*devicePixelRatio`;   引擎对上述两种分辨率做了封装。   设备像素...

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

124. 输入设备-指南针 [ 50%]

...言、LayaAirIDE让项目开发更高效。let compassImgPath = "res/inputDevice/kd.png", compassImg, degreesText, directionIndicator, firstTime = true; class InputDevice_Compass { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya....

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

125. 输入设备-贪吃蛇(重力感应) [ 50%]

...r; import WebGL = Laya.WebGL; import Event = Laya.Event; export class InputDevice_GluttonousSnake { private seg:Segment; private segments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosition:Point; constru...

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

126. 输入设备-地图 [ 50%]

...t Browser = Laya.Browser; import Handler = Laya.Handler; export class InputDevice_Map { // 百度地图 private map; private marker; private BMap = Browser.window.BMap; private convertor = new this.BMap.Convertor(); // Div private mapDiv; private infoText:Text; constructor() { Laya.init(Browser.widt...

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

127. 输入设备-贪吃蛇(重力感应) [ 49%]

... [], initialSegmentsAmount = 5, vx = 0, vy = 0, targetPosition; class InputDevice_GluttonousSnake { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Event = Laya.Event, Accelerator = Laya.Accelerator; // 不支持WebGL时...

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

128. 输入设备-地图 [ 49%]

...DE让项目开发更高效。let map, marker, mapDiv, infoText; class InputDevice_Map { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Geolocation = Laya.Geolocation; // 不支持WebGL时自动切换至Canvas Laya.init(...

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

129. laya.events.Event [ 48%]

...[static] 定义 componentremoved 事件对象的 type 属性值。Event  DEVICE_LOST : String = devicelost[static] 显卡设备丢失时触发Event  DISPLAY : String = display[static] 定义 display 事件对象的 type 属性值。Event  DOUBLE_CLICK : String = doubleclick[static] 定义 doub...

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

130. 打包native报错 [ 48%]

...2019-06-18 13:34:09.274697+0800 test1[6479:65523]  {   "os" : "ios",   "devicename" : "x86_64",   "imei" : "imeixxx",   "imsi" : "imsixxx",   "phonemodel" : "iPhone",   "localmodel" : "iPhone",   "retinavalue" : "2.000000",   "osversion" : "12.2",   "resolution" : "414*896",   "guid" : "6...

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