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

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

911. UI-CheckBox [ 69%]

...", "../../res/ui/checkbox (5).png", "../../res/ui/checkbox (6).png"]; Laya.loader.load(skins, Handler.create(this, onCheckBoxSkinLoaded)); })(); function onCheckBoxSkinLoaded() { var cb; for (var i = 0; i ; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.st...

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

912. 小游戏导入手机后Sprite.Mask没有正常显示 [ 68%]

...,微信开发工具里好好的,导入手机里就不行了- -   Laya.loader.load(url, Handler.create(this, function () { var t = Laya.loader.getRes(url) var sp = new Sprite() sp.graphics.drawTexture(t, 0, 0, 80, 80) that.addChild(sp)  var cMask = new Sprite() cMask.graphics.drawCircle(40, 40,...

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

913. 报错,这不是个构造函数 "StartPage is not a constructor" [ 68%]

...n(){ (function(){ Laya.init(667,375); Laya.stage.bgColor = "#ffcccc"; Laya.loader.load("res/atlas/ui.atlas",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })() function onLoaded(){ var StartPage = new StartPage(); Laya.stage.addChild(StartPage); var GamePage = new GamePage(); Laya.stage...

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

914. 释放资源Cannot read property '_getSource' of undefined重新加载会容易报错 [ 68%]

...0 0 分享 微博 QZONE 微信 136*****504 赞同来自: 我发现先clear loader可以解决这个问题 2021-01-26 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 Chiuan 相关问题 加载到舞台的3D模型不显示贴图 请问下...

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

915. 关于资源回收的问题 [ 68%]

... 2017-05-10 10:25 @cuixueying:好的,谢谢。如果不手动释放Laya.loader里面的资源的话,loader会不会在某个环节自动释放掉一些资源呢?比如我用一个url创建了两个Laya.Image对象,一个对象destroy后,另一个对象就变成空白了。。。 cuixueying...

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

916. 3D开启多线程报错 [ 68%]

3D开启多线程报错 开启多线程后 Laya.WorkerLoader.workerPath="libs/worker.js"; Laya.WorkerLoader.enable=true;   加载导出的3D模型 Laya.Sprite3D.load("res/assets/LayaScene_guanyu/TestScene.lh");   报错:laya.d3.js:37225 Uncaught TypeError: Failed to execute 'texImage2D' on 'Web...

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

917. 微信小游戏资源加载问题 [ 68%]

...还是会到网络上远程读取。看了看引擎代码,应该是MiniLoader.load中,判定了如果加载的资源是png,jpg之类的图片,会调用Loader.load去加载,在Loader.load中,判定如果是image类型的资源,那么会执行URL.formatURL(url),把本地图片资源加上...

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

918. 使用setsubpixel函数对图片进行纹理像素填充,安卓端微信不正常 [ 68%]

...图片 urls.push({ url: ResourcesManager.inst.brush_test_green, clas: Laya.Loader.TEXTURE2D,constructParams:[100, 100, 1, false, true]});   //开始填充     public fillPlane(){         let brush = Laya.loader.getRes(ResourcesManager.inst.brush_test_green) as Laya.Texture2D;       ...

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

919. 打包百度小游戏不能播放声音?是api不支持 还是发生了改变 或者格式问题? [ 68%]

...红框内的修改  if (Browser.onMiniGame){ console.log(1); tSound=Laya.loader.getRes(url); } if (!soundClass)soundClass=SoundManager._soundClass; if (!tSound){ console.log(2); tSound=new soundClass(); tSound.load(url); if (Browser.onMiniGame){ Loader.cacheRes(url,tSound); } }; 2个if判断...

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

920. 其他引擎的Demo-Example_04 [ 68%]

... Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler, Loader = Laya.Loader; // 不支持WebGL时自动切换至Canvas Laya.init(w, h, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bg...

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