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

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

691. demo中的2d和3d混合 加载ktx的资源 会白色的 其他ui没有问题 [ 79%]

....load([{url:"minastc.config.json",type:Laya.Loader.JSON}],new Laya.Handler(this,function(){             this.astcconfig = Laya.loader.getRes("minastc.config.json");             for(var key in this.astcconfig){                 var fileversion = Laya.ResourceVersion.manifest[key]||...

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

692. Texture2D.setPixels会导致图片质量变差了,获取原生的pixels没有进行改动。怎么回事呢? [ 79%]

...a.URL.formatURL(url); var imageSource=new Laya.Browser.window.Image(); var thisObj = this; var onload=function (){ var tex=new Laya.Texture2D(imageSource.width,imageSource.height,1,false,true); tex.wrapModeU=1; tex.wrapModeV=1; tex.loadImageSource(imageSource,true); tex._setCreateURL(url); var tex2=...

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

693. 3D粒子特效第一次卡顿最终解决方案 [ 79%]

...Laya.loader.getRes("res/effect/2/Conventional/bullet.lh");         this.compileShader(effect);         //===========放心使用吧=================         var myeffect:Laya.Sprite3D = effect.clone();     }     private compileShader(model: any): void { //如果是粒...

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

694. 鼠标穿透问题 [ 79%]

...a.loader.load([{url:"image/comp.json", type:Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { createList(); createItems(); createLoading(); _list.addChild(_loadingBg); Laya.stage.addChild(_list); } protected function createList():void { _list = new List(); _list.i...

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

695. 获取sprite对象的 width和height为0 [ 79%]

...Boat extends Laya.Sprite { private bt:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 private bg:Laya.Sprite; constructor(){ super(); this.init(); } ...

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

696. MeshSprite3D在加了physicsCollider和Rigidbody3D后,调用destroy会报错 [ 79%]

...csCollider和Rigidbody3D后,调用destroy会报错 示例代码如下: this.capsule = new Laya.MeshSprite3D(new Laya.CapsuleMesh(0.5, 1)); var capsuleCollider:Laya.PhysicsCollider = this.capsule.addComponent(Laya.PhysicsCollider);//网格触发器 var capsuleShape:Laya.CapsuleColliderShape = new...

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

697. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 79%]

...组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.assets = ["resources/res/ui/dialog (1).png", "resources/res/ui/close.png"]; Laya.loader.load(this.assets).then( ()=>{ this.onSkinLoadComplete(); } ); } private onSkinLoadComplete(e: any = null): void { this.dialog = new...

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

698. List数据源的格式问题导致无法响应List的SelectHandler [ 79%]

...hange(eventType:String, property:String, value:Object):void { var data:* = this[property]; this[property] = value; if (value != data) { var result:Boolean = event(eventType , {oldValue:data , newValue:value}); } } }现在问题就出在Data这个类上面,如果将Data修改为继承Obejct,则Li...

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

699. 请问如何加载base64的图片 [ 79%]

...45050878 赞同来自: __proto.uploaderHandler=function (files) { var self=this; var file=files[0]; var reader=new FileReader(); reader.onload=function () { this.headIcon.loadImage(this.result); } reader.readAsDataURL(file); } 是这样显示的吗?我的为何也不显示,通过html的input上...

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

700. 给模型动态添加脚本报错 [ 79%]

...s3D/prefabsModel/hanbao.lh");                 goldNode = this.scene_3d.addChild(sp);                 goldNode.transform.localPosition = new Laya.Vector3(this.startPos.x + (4.5 - Math.random() * 9), this.startPos.y, this.startPos.z + (2.5 - Math.random...

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