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

大约有 2,310 项符合查询结果, 库内数据总量为 31,624 项。 (搜索耗时: 0.0057 秒)

581. 精灵添加名称 [ 73%]

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

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

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

583. 请问怎么把多个模型合并在一个组里面 [ 73%]

请问怎么把多个模型合并在一个组里面 var box0= scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(1, 0.1, 1))); box0.transform.position=new Laya.Vector3(1,0,0); var box1= scene.addChild(new Laya.MeshSprite3D(new Laya.BoxMesh(1, 0.1, 1))); box1.transform.position=new Laya.Vector3(-...

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

584. [LayaAir3]编辑器Tree组件树节点渲染回调两次 [ 73%]

...两次 当我对Tree这个编辑器UI组件的rootNode增加一个子节点addChild,发现绑定的树节点渲染回调执行了两次,看了下源码发现 addChild会去调用到tree的_afterInserted方法, 这时候这个子节点的Widget还未创建,就回去执行createCell,这个...

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

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

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

586. img点击事件。点击图片外,也触发了事件。请问怎么解决 [ 73%]

...reate(this,load)); function load(){ let ctn2=new Laya.Sprite(); Laya.stage.addChild(ctn2); var gq=new Laya.Sprite(); gq.loadImage("res/img/m1.jpg",100,100,100,100);   ctn2.addChild(gq); gq.on(Laya.Event.CLICK,this,Is);   }  function Is(){ console.log(1); } 2018-08-06 0 0 分享 微博 QZONE 微...

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

587. UI-Tab [ 73%]

...electedIndex); tab.selectHandler = new Handler(this, onSelect); Laya.stage.addChild(tab); return tab; } function onSelect(index) { console.log("当前选择的标签页索引为 " + index); } })();module laya { import Stage = Laya.Stage; import Tab = Laya.Tab; import Handler = Laya.Handler; import W...

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

588. Cannot read property 'toDefault' of undefined报错是什么原因 [ 73%]

...sePickingScene.super(this); this.camera = new Laya.Camera(0,0.1,100); this.addChild(this.camera); this.camera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY; this.skyBox = new Laya.SkyBox(); this.camera.sky = this.skyBox; this.skyBox.textureCube = Laya.TextureCube.load("skyBox/skyCube.ltc"); this.camera....

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

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

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

590. 文本-Overflow [ 73%]

..."; txt.size(300, 50); txt.fontSize = 20; txt.color = "#ffffff"; Laya.stage.addChild(txt); return txt; } } new Text_Overflow();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Text_Overflow { constructor() { // ...

来源: Laya2.0_示例 发布时间: 20251218