大约有 316 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0048 秒)
Laya_社区(98) Laya3.0_api(64) Laya2.0_api(59) laya_api(55) Laya2.0_示例(13) Laya_示例(12) Laya2.0_文档(11) Laya3.0_文档(4)
...t i = 0; i < 4; i++) { ape = new Sprite(); this.apesCon.addChild(ape); ape.loadImage(`res/apes/monkey${i}.png`); ape.pivot(55, 72).pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i) * layoutRadius ); } this.apesCon.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.timer.fram...
来源: Laya2.0_示例 发布时间: 20240929
...4张猩猩图片 for (var i = 0; i < 4; i++) { var ape = new Sprite(); ape.loadImage("../../res/apes/monkey" + i + ".png"); ape.pivot(55, 72); // 以圆周排列猩猩 ape.pos( Math.cos(radianUnit * i) * layoutRadius, Math.sin(radianUnit * i) * layoutRadius); apesCtn.addChild(ape); } apesCtn.pos(Lay...
来源: Laya_示例 发布时间: 20240929
...})(); function createApe() { // 添加一只猩猩 ape = new Sprite(); ape.loadImage(apePath); var texture = Laya.loader.getRes(apePath); ape.pivot(texture.width / 2, texture.height / 2); ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); ape.scale(0.8, 0.8); Laya.stage.addChild(ape); // 鼠标...
来源: Laya_示例 发布时间: 20240929
...加载问题。 官方的飞机大战案例中,加载地图用的是bg.loadImage,而这边先预加载后再用如下方式加载。这里的方式肯定是较优,但如果我预加载后,再用loadImage方法加载同一张图片,系统是会重新加载还是直接调用本地缓存的...
来源: Laya_社区 发布时间: 20160722
...w(); } private _initView():void { let sprite:Sprite = new Sprite(); sprite.loadImage("res/scene/1001/layer1/qiang.jpg", 100, 100, 100, 100); this.addChild(sprite); sprite = new Sprite(); sprite.graphics.drawCircle(100, 500, 50, "#0000ff"); //sprite.graphics.scale(2, 2); this.addChild(sprite); sprite...
来源: Laya_社区 发布时间: 20180308
...prite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.ape.scale(0.8, 0.8); Laya.stage.addChild(th...
来源: Laya2.0_示例 发布时间: 20240929
...创建完毕,此方法只执行一次 */ 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_文档 发布时间: 20240528
...e=Loader.getRes(tempjson.pic)后 tempnote.on函数不触发 使用tempnote.loadImage(tempjson.pic); 触发正常,如果我想使用Loader.getRes 来载入缓存的图片应如何处理. 2017-10-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...
来源: Laya_社区 发布时间: 20171024
...e drawTextures drawTriangles fillBorderText fillText fillTexture getBounds loadImage removeCmd restore rotate save scale setState strokeText transform translate Constructors constructor new AutoBitmap(): AutoBitmap Inherited from Graphics.constructor Defined in laya/display/Graphics.ts:54 Returns Au...
来源: Laya3.0_api 发布时间: 20231115
...) { compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400); } function drawUI() { var canvas = new Sprite(); Laya.stage.addChild(canvas); canvas.graphic...
来源: Laya_示例 发布时间: 20240929