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

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

31. drawcall优化问题 [ 71%]

...注: 5 人 jacksing888 • 2018-01-22 23:37 Laya.loader.load( 'res/atlas/comp.json', Handler.create(this, function(){ container = new Laya.Sprite(); var x = 0,y =80; Laya.stage.addChild(container); for(var i=0;i<1200;i++){ var role = new Laya.Sprite(); x = x+0.1; y = y+0.1 role.x = x; role.y = y;...

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

32. Panel滚动条滑块位于最下方 [ 71%]

...00,WebGL); Laya.stage.bgColor="#EEFFCC"; Laya.loader.load([{url:"res/atlas/comp.json",type:Loader.ATLAS},{url:"bg2.png"}],Handler.create(this,onCom)); } private function onCom():void { var img:Image=new Image(); img.skin="bg2.png"; panel=new Panel(); panel.vScrollBarSkin="comp/vscroll.png"; panel.wi...

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

33. Sprite中的width,heightsize(width,height)感觉没作用啊 [ 71%]

...代码如下: var sprite = new laya.display.Sprite(); sprite.loadImage("comp/bg.png",0,0,0,0,Handler.create(this,function(texture:laya.resource.Texture){         sprite.graphics.clear();         sprite.graphics.drawTexture(texture,0,0,50,50);         sprite.autoSize = true; })); ...

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

34. 发现惊天大bug给官方报备一下 [ 70%]

...shiyang • 2021-09-09 20:33 给你举个例子,比如我图片路径为 comp/btn.png,设置Laya.URL.basePath = "xxx",第一张图里面,传入的url是comp/btn.png,format以后就是xxx/comp/btn.png,然后else里面有format以后就是“xxx/xxx/comp/btn.png” layabox • 2021-09-22...

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

35. ViewStack属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 70%]

...存页面,按F12发布页面,发布后在项目ui文件夹中生成了ComponentDemoUI.as类,我们直接使用它。 创建ComponentDemo.as并设置默认程序,编写代码如下: ```java package { import laya.utils.Handler; import laya.webgl.WebGL; //导入UI发布生成的类 import ui....

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

36. 火狐浏览器上webgl异常 [ 70%]

...博 QZONE 微信 阿龙 赞同来自: [error]Failed to load: res/atlas/comp.atlas myLayaPricticeAll.max.js:16597:5 lose skin comp/button.png  Error: WebGL warning: texSubImage2D: Texture has not been initialized prior to a partial upload, forcing the browser to clear it. This may be slow. 2018-0...

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

37. 播放声音出错,求指教 [ 70%]

...============================= function playbgm() { SoundManager.playMusic("comp/bgm.mp3", 1, new Handler(this, bgmComplete)); } function bgmComplete() { console.log("播放完成"); }   附件 : --> 2018-03-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请:...

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

38. 显存优化:纹理压缩的使用(TypeScript-2D进阶篇(TS)-性能优化) [ 68%]

...在移动端,Android平台的主流纹理格式是ETC(Ericsson Texture Compression),iOS平台的主流纹理格式是PVRTC(PowerVR Texture Compression)。 需要特别说明的是,ETC1是不支持透明通道的,PVRTC是支持透明通道的,尽管在ETC2的时候,补全了ETC1...

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

39. 内存释放问题 [ 68%]

...ew Laya.Dictionary(); constructor() { } static gameLoading(name: string, onCompleted: Function): void { let uiResArray = [ { url: "res/atlas/common.json", type: Laya.Loader.ATLAS }, { url: "res/atlas/comp.json", type: Laya.Loader.ATLAS }, // 登录的UI选角的UI { url: "res/atlas/user.json", ty...

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

40. 使用二进制图片 · LayaAir3.0文档 · LAYABOX [ 67%]

...代码如下: var xhr = new XMLHttpRequest(); xhr.open("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = funct...

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