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

大约有 316 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0048 秒)

41. Sprite-容器 [ 79%]

...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

42. Sprite-容器 [ 79%]

...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

43. 鼠标交互-Hold [ 79%]

...})(); 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

44. 【简单跑酷--JS版】---Lv.2 类之间的引用以及背景滚动实现 [ 78%]

...加载问题。 官方的飞机大战案例中,加载地图用的是bg.loadImage,而这边先预加载后再用如下方式加载。这里的方式肯定是较优,但如果我预加载后,再用loadImage方法加载同一张图片,系统是会重新加载还是直接调用本地缓存的...

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

45. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 78%]

...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

46. 鼠标交互-Hold [ 78%]

...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

47. 精灵 · LayaAir3.0文档 · LAYABOX [ 77%]

...创建完毕,此方法只执行一次 */ onAwake(): void { this.sprite.loadImage("atlas/comp/image.png"); //纹理:图片路径 this.sprite.pos(Laya.stage.width &gt;&gt; 1, Laya.stage.height &gt;&gt; 1); //位置:屏幕中心 this.sprite.x = Laya.stage.width/2; //x、y分别设置位置 this.s...

来源: Laya3.0_文档 发布时间: 20240528

48. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 77%]

...e=Loader.getRes(tempjson.pic)后 tempnote.on函数不触发 使用tempnote.loadImage(tempjson.pic); 触发正常,如果我想使用Loader.getRes 来载入缓存的图片应如何处理. 2017-10-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

49. laya.ui.AutoBitmap_API3.0 [ 76%]

...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

50. 输入设备-指南针 [ 76%]

...) { 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