大约有 325 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0055 秒)
....stage.screenMode = "horizontal"; var asset = []; asset.push({ url: ["../res/image/bg.png"], type: Laya.Loader.IMAGE }); Laya.loader.load(asset,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.getRes("../res/image...
来源: Laya_社区 发布时间: 20180808
...文件。 例子: 如上述的压缩包当放置路径为bin目录下的:res/3d/Player.zip,则使用方法为[code]// Laya 2.x及以下版本 Laya.loader.create([{ url: "res/3d/Player.zip", type: LayaZip.ZIP}])[/code][code]// Laya3.x版本 Laya.loader.load([{ url: "res/3d/Player.zip", type: LayaZi...
来源: Laya_社区 发布时间: 20230316
...问题吗 //设置版本控制类型为使用文件名映射的方式 Laya.ResourceVersion.type = Laya.ResourceVersion.FILENAME_VERSION; Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, beginLoad)) function beginLoad() { //加载LOADING资源 Laya.loader.load([{ url: "res/atlas/...
来源: Laya_社区 发布时间: 20180710
...题 按照说明使用图集工具创建了一个图集,存放目录/bin/res/altas/nvhaidaomao.json /bin/res/altas/nvhaidaomao.png 然后代码中: //加载图集 asset.push( { url: NVHAIDAOMAO_JSON_URL, type: Laya.Loader.ATLAS }, { url: WAR_JSON_URL, type: Laya.Loader.ATLAS } ); Laya.loader.loa...
来源: Laya_社区 发布时间: 20170326
...文件,以及编译后多了两个文件: /项目名字 /bin/h5/res/atlas/test.atlas 和 /项目名字 /bin/h5/res/atlas/test.png。 我不知道laya到底是个什么原理 在存储资源,还不带认路的。认路也是偏的,谁知道,laya打包和非打包资源在项目...
来源: Laya_社区 发布时间: 20180105
... 12:49 这个不是可以配置的吗, 为什么不能修改。 都放在res目录里我直接把res目录放到cdn就行了 kylin • 2019-05-15 19:47 设置了index.html目录以后,程序认为index.html在这个目录下,所有的资源、引擎等都会相对于这个目录去获取,所...
来源: Laya_社区 发布时间: 20190406
...个文件夹A里比如,在项目设置里把资源发布目录改成bin/A/res/atlas,把index.html目录改成bin/A, 发布微信小游戏生成的version.json文件有问题,内容是"A/res/atlas/xxx.png":"A/res/atlas/xxx-xxxxxx.png" 正确的应该是 "res/atlas/xxx.png":"res/atlas/xxx-xxxxx...
来源: Laya_社区 发布时间: 20190603
...操作。代码如下: 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.onloa...
来源: Laya3.0_文档 发布时间: 20230303
...代码(JS飞机大战示例), //加载声音资源 Laya.loader.load("res/sound/bloodstream_bg.mp3", Laya.Handler.create(this, onLoadedSound), null, Laya.Loader.SOUND); // })(); function onLoadedSound(){ Laya.SoundManager.playMusic("res/sound/bloodstream_bg.mp3", 0, Laya.Handler.create(this, on...
来源: Laya_社区 发布时间: 20180320
新人求问:好像用IDE创建的工程没有res文件,那是要自己创建一个,还是有默认的放资源的地方? 想看看一般的工程目录是什么样的 JS工程 2017-01-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相...
来源: Laya_社区 发布时间: 20170120