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

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

2721. [LayaAirIDE3]应该如何定义@property才能像GTextField一样加载字体? [ 40%]

...场景路径     }) }   场景中加载字体代码:     onAwake(): void {         let fnt = Laya.loader.getRes("resources/BitmapFont.fnt", Laya.Loader.FONT);         console.log(fnt);     } 2025-09-17 0 3 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复...

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

2722. 2D寻路 · LayaAir3.4 · 引擎文档 · LAYABOX [ 40%]

...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { let sprite = this.owner as Laya.Sprite; //sprite.cache = true; this._temp = new Laya.Sprite(); this.owner.scene.addChild(this._temp); this.findCompents(this._allAgent, sprite.scene, Nav2DAgent); } onMouseClick(evt: Lay...

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

2723. 小游戏字体bug:使用位图字体,加载解析出错。使用ttf字体在小游戏中无效果 [ 40%]

...载也不行 Laya.loader.load("res/msyhbd.fnt",new Handler(this,function():void{                                              }),null,Loader.XML) 这样都报错 2018-05-16 0 7 分享 微博 QZONE 微信 薛召 赞同来自: 加入xml解析后,部分机型还是会...

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

2724. 自定义场景继承导出,会在自定义类中加入Laya.前缀导致layaMaxUI文件报错 [ 40%]

...on;         constructor(){ super()}         createChildren():void {             super.createChildren();             this.createView(GmPanelUI.uiView);         }     } }   2.0之前版本,是不会把Laya.前缀加上,请问这个问题,如何解...

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

2725. 自定义2D Shader · LayaAir3.4 · 引擎文档 · LAYABOX [ 40%]

... #define SHADER_NAME Sprite2DTextureShader #include "Sprite2DVertex.glsl"; void main() { vertexInfo info; getVertexInfo(info); v_cliped = info.cliped; v_texcoordAlpha = info.texcoordAlpha; v_useTex = info.useTex; v_color = info.color; vec4 pos; getPosition(pos); gl_Position = pos; } #endGLSL #define...

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

2726. Shader概述(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 40%]

...只能addInclude一次。) ```typescript static addInclude(fileName, txt): void; ``` - 7.根据名字获取Shader3D对象,这是一个静态函数。 ```typescript static find(name): Shader3D ``` - 8.在特定索引获取SubShader。 ```typescript getSubShaderAt(index) ``` - 9.是否开启调试...

来源: Laya2.0_文档 发布时间: 20210715

2727. 时间轴动画(TypeScript-LayaAir基础篇(TS)-动画基础) [ 40%]

...s/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //创建一个Animation实例 var tl:Laya.Animation = new Laya.Animation(); //加载动画文件 tl.loadAnimation("planCrashed.ani"); //添加到舞台 Laya.stage.addChild(tl); //播放Animation动画 tl.play(); } } new...

来源: Laya2.0_文档 发布时间: 20210715

2728. Resources already exist,is repeated loading 加载特效报重复加载 [ 40%]

...SON);     }      public onAssetsLoaded(settings: ParticleSetting): void {         this.sp = new Particle2D(settings);         this.sp.emitter.start();         this.sp.play();         Laya.stage.addChild(this.sp);          this.sp.x = Laya.stage.width ...

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

2729. 请教各位前辈们,AS的一些API好像layabox没有,求解决方法或者思路,比如 Point 的interpolate方法 具体问题内详 [ 40%]

...et:Sprite,srcbmd:Image, mx:Matrix, p1:Point, p2:Point, p3:Point, p4:Point):void         {             var texture:Texture = Laya.loader.getRes(srcbmd.skin);             target.graphics.drawTexture(texture,0,0);             var path:Array = ;             path...

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

2730. 时间轴动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 40%]

.../ui.atlas", Handler.create(this, onLoaded)); } private function onLoaded():void { //创建一个Animation实例 var tl:Animation = new Animation(); //加载动画文件 tl.loadAnimation("TimeLine.ani"); //添加到舞台 Laya.stage.addChild(tl); //播放Animation动画 tl.play(); } } } ``` 代码运...

来源: Laya2.0_文档 发布时间: 20210715