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

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

371. 设置viewport后显示区域变黑色 [ 71%]

...       //          this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height);             this.scrollRect = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

372. 陀螺仪与加速计(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 70%]

...info.fontSize = 50; this.info.color = "#FFFFFF"; this.info.size(Laya.stage.width, Laya.stage.height);  Laya.stage.addChild(this.info);  Laya.Gyroscope.instance.on(Laya.Event.CHANGE, this, onDeviceorientation); function onDeviceorientation(absolute, rotationInfo) { this.info.text = "alpha:" + Math....

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

373. list item 添加事件后无法监听 [ 70%]

...求大神解答     // 初始化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

374. 使用百度地图显示当前位置(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 70%]

...物。 ##### 2.2 refit函数: ```java function  refit() { mapDiv.style.width  =  Laya.Browser.width  /  Laya.Browser.pixelRatio  +  "px"; mapDiv.style.height  =  Laya.Browser.height  /  Laya.Browser.pixelRatio  +  "px"; } ``` refit()使百度地图充满整个窗口,由于侦听了r...

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

375. ios上input无法隐藏 [ 70%]

...建input             z_file.style="filter:alpha(opacity=0);opacity:0;width: 29%;height:11%;";             z_file.type ="file";//设置类型是file类型。             z_file.id ="z_sfz";//设置ID。             z_file.accept="image/*";//设置文件的格式png;    ...

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

376. 和原生Dom交互 · LayaAir3.4 · 引擎文档 · LAYABOX [ 70%]

...现这种效果。 var data = '<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">' + '<foreignObject width="100%" height="100%">' + '<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' + '<em>I</em> like ' + '<span style="color:white; te...

来源: Laya3.0_文档 发布时间: 20251010

377. [LayaAir 2.0]laya打包华快游戏,drawToCanvas() 获取屏幕像素[ 70%]

...Air 2.0 在打包华快游戏时, Laya.stage.drawToCanvas(Laya.stage.width, Laya.stage.height, 0, 0).getTexture()会导致游戏卡死,无报错。try catch后错误信息也没有。   输出错误信息:    TIPS:已经定位到了这句代码 附件 : --> 2023-11-16 添加评论 免...

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

378. [LayaAir3]3D场景里面鼠标感应区域 3.2.1跟3.3不同 [ 70%]

...高舞台大小,这样才不会拉伸变形 this.spRole.texture.sourceWidth = Laya.stage.width; this.spRole.texture.sourceHeight = Laya.stage.height; //添加2D精灵, this.owner.addChild(this.spRole); this.spRole.pos(0, 0); this.spRole.size(Laya.stage.width, Laya.stage.height); }); 2025-01-0...

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

379. 富文本:LayaAir下 HtmlDivElement的使用汇总 [ 70%]

...获取Html文本的实际内容、获取html文本的实际宽高(contextWidth、contextHeight) 示例如下:var htmlDiv:HTMLDivElement=new HTMLDivElement(); var html:String = "<span color='#e3d26a'>使用</span>"; html += "<span style='color:#FFFFFF;font-weight:bold'>HTMLDiv...

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

380. laya.d3.core.scene.Scene3D [ 70%]

...read-only] 对象的显示高度(以像素单位)。 Sprite displayWidth : Number[read-only] 对象的显示宽度(以像素单位)。 Sprite drawCallOptimize : BooleanSprite  enableFog : Boolean 获取是否允许雾化。 Scene3D  enableLight : Boolean = true 是否启用灯光...

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