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

大约有 1,614 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0079 秒)

601. LayaAir下TTF字体的使用方式? [ 72%]

...init(550,400); var sp:Image=new Image(); sp.loadImage("2.png"); Laya.stage.addChild(sp); var text:Text=new Text(); text.fontSize=40; text.color="#FF00FF"; text.text="哈哈哈哈哈哈哈哈哈哈哈哈哈哈"; text.font="hu" text.pos(600,600); Laya.stage.addChild(text); Laya.timer.once(1000,this,on...

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

602. 用ide打包后的图片,Texture显示不出来? [ 72%]

...aded)); function onLoaded(){     var aa = new Sprite();     Laya.stage.addChild(aa);     var texture = new Laya.Texture();     texture.load('comp/zzw.png' );     setTimeout( function(){         aa.graphics.drawTexture(texture,0,0);     }, 1000 ) } 3Q 2017-12-26 添加评论 免费...

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

603. Image和HtmlImageElement加载同一张图会显示不出来 [ 72%]

...HTML = "<img src='res/test1.png'/>"; html.pos(150, 100); Laya.stage.addChild(img); Laya.stage.addChild(html); 按照这个顺序,图片test1.png加载不出来 2018-12-19 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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

604. 物理引擎-Slingshot [ 72%]

...esize); } function initMatter() { var gameWorld = new Sprite(); Laya.stage.addChild(gameWorld); // 初始化物理引擎 engine = Matter.Engine.create( { enableSleeping: true }); Matter.Engine.run(engine); var render = LayaRender.create( { engine: engine, width: 800, height: 600, options: { backgrou...

来源: Laya_示例 发布时间: 20260303

605. drawToTexture截大图有问题,会丢失 [ 72%]

..."#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawTo...

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

606. 请问UI页面怎么移除 [ 72%]

...I页面怎么移除 我在login.ui里面一个按钮事件触发Laya.stage.addChild(new game());然后这个是动态事件,怎么样在login.ui函数里面先移除这个game.ui页面后再addChild进来呢。因为多次事件触发后就相当于NEW了很多进来。尝试login.remoeChild(game)...

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

607. [LayaAir3]使用videoNode播放视频没有控制器 [ 72%]

...de播放视频没有控制器  let video = new Laya.VideoNode; Laya.stage.addChild(video); video.size(600,480); video.options.controls = true; video.options.objectFit = "contain";播放后并没有出现进度条、播放、暂停等组件。 适配选contain、fill都不起作用。 2025-08-18 添...

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

608. 精灵添加名称 [ 72%]

...3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function onsp(e:Event){              console.log("监听到按钮"+e.target);              console.log((e.target.getChildAt(0) as Sprite).name);              console.log(e.t...

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

609. 学习官方视频教程中飞机大战游戏出现的问题!! [ 72%]

...     //把实例化好的飞机添加进容器内             this.addChild(this.playAnim);             this.playAnim.on(Laya.Event.COMPLETE,this,this.onPlayComplete);         } onMouseMove():void{         //根据鼠标位移主角方法         this.hero.pos(Laya.stage.mo...

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

610. list 加载动画为什么实现的效果会错乱掉? [ 72%]

... ani.getGraphicBounds(); ani.scale(80/bounds.width ,80/bounds.height) this.addChild(ani) } } Laya.class(Item1, "Item1", Box); var List = Laya.List; function setup(effList) { var list = new List(); list.itemRender = Item1; list.repeatX = 3; list.repeatY = 4; list.x = (Laya.stage.width - WID * list.re...

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