大约有 8 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0063 秒)
...载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE).then(() => { // 添加Spine3D渲染器组件到3D精灵节点上 this.spine3D = this.owner.add...
来源: Laya3.0_文档 发布时间: 20260203
...载Spine动画数据资源(json文件),注意一定要设置为Laya.Loader.SPINE类型,否则不会把json认为是SPINE资源 Laya.loader.load("girl2/mix-and-match-pro.json", Laya.Loader.SPINE).then(() => { // 添加Spine渲染器组件到精灵节点上 this.spine = this.owner.addCompon...
来源: Laya3.0_文档 发布时间: 20260131
...nObject>' + '</svg>'; var sp: Laya.Sprite = new Laya.Sprite(); sp.loadImage(data, 0, 0, 200, 200); Laya.stage.addChild(sp); 通过data来当做url传递给loadImage这个方法引擎就会帮我们加载并解码显示出来。loadImage这个方法中的参数不仅仅有接收地址的url...
来源: Laya3.0_文档 发布时间: 20251010
...,包含一个状态码和原因短语 (例如 “200 OK“)。 只读 upload XMLHttpRequestUpload 可以在 upload 上添加一个事件监听来跟踪上传过程。 withCredentials boolean 表明在进行跨站(cross-site)的访问控制(Access-Control)请求时,是否使用认证信息(例如...
来源: Laya3.0_文档 发布时间: 20250104
...码,可以初始化A*的地图数据 //读取地形图 this.aStarMap = Loader.getTexture2D("res/threeDimen/scene/TerrainScene/Assets/AStarMap.png"); //获得地图数据 var aStarArr = this.createGridFromAStarMap(this.aStarMap); //使用astar初始化地图数据 this.graph = new (window as any).G...
来源: Laya3.0_文档 发布时间: 20230303
..., offset || Point.EMPTY, color)); else return null; } 代码示例: Laya.loader.load("resources/layaAir.png").then((res: Laya.Texture) => { let sp = new Laya.Sprite(); // 绘制填充纹理 sp.graphics.fillTexture(res, 0, 0, 500, 500, "repeat"); this.owner.addChild(sp); }); 运行效果: (...
来源: Laya3.0_文档 发布时间: 20251010
...解。编写代码如下所示: /* ……省略若干代码 */ Laya.Mesh.load("res/threeDimen/Physics/table.lm", Laya.Handler.create(this, function(mesh:Laya.Mesh) { //读取桌子模型节点对象,添加到3D场景节点下, var table: Sprite3D = this.scene.addChild(new Laya.Sprite3D(res)); ...
来源: Laya3.0_文档 发布时间: 20251010
...创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width >> 1, Laya.stage.height >> 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.s...
来源: Laya3.0_文档 发布时间: 20251010