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

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

441. laya.gltf.glTFResource_API3.0 [ 62%]

...Dispatcher registerExtra registerExtra(context: string, extraName: string, handler: Handler): void Defined in laya/gltf/glTFResource.ts:247 注册 extra 处理函数 Parameters context: string extraName: string handler: Handler Returns void unregisterExtra unregisterExtra(context: string, extraName:...

来源: Laya3.0_api 发布时间: 20231102

442. 怎么获取手机相册内容 [ 62%]

...prite; import laya.ui.Button; import laya.utils.Browser; import laya.utils.Handler; public class Main { public function Main() { //初始化引擎 Laya.init(500,500);//初始化引擎 var skins:Array = [ "res/button-1.png" ]; Laya.loader.load(skins, Handler.create(this, onUIAssetsLoaded)); } public ...

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

443. Laya中Button等组件lose skin的问题 [ 62%]

...xlocal/bg2.jpg",type:Laya.Loader.IMAGE} ];  Laya.loader.load(resArr, Laya.Handler.create(null, onLoaded));  function onLoaded(): void {     Laya.URL.basePath ="https://xxx.com/";     //实例UI界面     var Main: MenuPageUI = new MenuPageUI();     Laya.stage.addChild(Main); } 在...

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

444. laya3D导入动画材质在安卓手机和电脑上显示正常,在苹果手机显示异常 [ 62%]

...ck/Conventional/puzzleB.lh" ]; Laya.loader.create(this.resource, Laya.Handler.create(this, this.onLoadFinish)); } private onLoadFinish() { //初始化场景 this.scene = new Laya.Scene3D(); Laya.stage.addChild(this.scene); this.scene.ambientColor = new Laya.Vector3(0.5, 0.5, 0.5); //初始化...

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

445. 创建材质(ActionScript-3D基础(AS3)-LayaAir3D之Material材质) [ 62%]

...hongMaterial = new BlinnPhongMaterial(); Texture2D.load("res/layabox.png", Handler.create(this, function(tex:Texture2D):void { //纹理加载完成后赋值 material.albedoTexture = tex; })); //将材质赋值给自定义模型 box.meshRenderer.material = material; ``` ![](img/1.png)(图1) 当然,...

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

446. 求助关于TiledMap的版本问题 [ 62%]

... import laya.maths.Rectangle; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class LayaSample { private var tMap:TiledMap; public function LayaSample() { //初始化引擎 Laya.init(1136, 640,WebGL); //创建TiledMap实例 tMap = new TiledMap(); //创建Rectang...

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

447. loadAnimation无法获取动画文件 [ 62%]

.../monster/monsterA/move.atlas"         ];   Laya.loader.load(aniArr, Handler.create(this, onAni), null, Loader.ATLAS);   private function onAni():void {     var role:SimpleRole = new SimpleRole();     Laya.stage.addChild(role); }       SimpleRole类:   public function SimpleRole() ...

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

448. 【紧急】laya2.0的loadImage方法为什么不触发complete? [ 62%]

...Laya.stage.addChild(logo); logo.loadImage("img/load_logo.png", 0, 0, 0, 0, Handler.create(this, function(){ trace("complete!!"); })); 我在laya1.0这么写,触发complete没毛病,为什么到了2.0这个complete不触发?谁给解释一下啊 2018-10-10 添加评论 免费帖 --> 分享 微...

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

449. CPU优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 62%]

...var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用size设置:** ```typescr...

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

450. discard property,please use transform's property instead [ 62%]

... "res/plane.lh",             "res/LayaMonkey.lh"         ], Laya.Handler.create(this, onComplete));         var _quaternion = new Laya.Quaternion();         Laya.timer.frameLoop(1, null, function () {             Laya.Quaternion.createFromYawPitchRoll(0.025, 0, 0, _quaternion...

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