大约有 1,584 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0052 秒)
Laya_社区(1113) Laya2.0_文档(231) Laya_示例(108) Laya2.0_示例(69) Laya3.0_文档(50) Laya3.0_api(11) Laya2.0_api(2)
...创建完毕,此方法只执行一次 onAwake(): void { this.skins = ["resources/res/ui/radioButton (1).png", "resources/res/ui/radioButton (2).png", "resources/res/ui/radioButton (3).png"]; Laya.loader.load(this.skins).then(() => { this.onLoadComplete(); }); } private onLoadComplete(e: any = n...
来源: Laya3.0_文档 发布时间: 20251016
...stener('message', function (e) { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行...
来源: Laya2.0_文档 发布时间: 20210715
....Stage.SCREEN_NONE; var dialog = Laya.stage.addChild(new Laya.Image("../../res/threeDimen/texture/earth.png")); var scene = Laya.stage.addChild(new Laya.Scene()); var camera = scene.addChild(new Laya.Camera(0, 0.1, 1000)); camera.transform.rotate(new Laya.Vector3(-90, 0, 0), false, false); //-30改...
来源: Laya_社区 发布时间: 20170807
...不存在 https://3dparking-1256769450.cos.ap-shanghai.myqcloud.com/test/res/atlas/main.png 2019-06-13 0 12 分享 微博 QZONE 微信 kylin 赞同来自: 目前来看,即使加了版本管理,引用云上资源仍然引用的无版本号的资源。现在的问题是即使是无版本管理...
来源: Laya_社区 发布时间: 20190613
...自己使用的库,尤其是第三方库,进行手工复制。 #### `res`资源目录 res是默认的资源目录,小游戏由于初始包的限制,建议将初始包的内容在规划好,最好能放到统一的目录下,便于初始包的剥离。 该文件会将js合并成一个JS ###...
来源: Laya2.0_文档 发布时间: 20210714
...如下: ```JavaScript 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...
来源: Laya2.0_文档 发布时间: 20210715
...e3D (2.0 插件导出的 lh) 文件 加载成功后,用 Laya.loader.getRes() 获取 let sprite3D: Laya.Sprite3D = Laya.loader.getRes(resName) as Laya.Sprite3D; 调试发现 获取到的 对象居然是 string 类型,而不是 Sprinte3D 对象 相同的代码 在 LayaAir IDE v.1.7.22 中建 ...
来源: Laya_社区 发布时间: 20180126
...图片资源可以用任意png资源替代,存放于`项目根目录/bin/res`目录下,注意要确保资源路径与资源名称正确。 #### screenModeDemo.ts 示例代码如下: ```javascript function showScreen() { //图片 var img = new Laya.Image(); img.centerX = 0; img.centerY = -70; i...
来源: Laya2.0_文档 发布时间: 20210715
...e; import laya.display.Stage; import laya.filters.ColorFilter; import laya.resource.Texture; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main()...
来源: Laya2.0_文档 发布时间: 20210715
...加到舞台 Laya.stage.addChild(Img); //加载显示图片 Img.loadImage("res/tt.png",w,h); return Img; } /**创建红色滤镜位图方法**/ function creteRedFilter(){ //颜色滤镜矩阵,红色 var colorMatrix = [ 1, 0, 0, 0, 0, //R 0, 0, 0, 0, 0, //G 0, 0, 0, 0, 0, //B 0, 0, 0, 1, 0, //A ]; //...
来源: Laya_社区 发布时间: 20170811