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

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

2051. 游戏按需加载功能模块(代码,美术资源等) [ 67%]

...新加载游戏模块。 // 伪代码 .....     entry_btn.on("click", function(){ addLoadingView(); check("xxx-game").then(download_module_callback).then(enter_game_scene_callback).then(function(){    removeLoadinvView(); }); ..... }); check 调用web接口检测是否有更新 download_module...

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

2052. 正交摄像机裁剪问题 [ 67%]

.../mfs_01.lh'); scene.addChild(sp); sp.on(Laya.Event.HIERARCHY_LOADED, this, function(){ sp.transform.localPosition = new Laya.Vector3(1, 1, 1); var scale = 1; var v3 = sp.transform.localScale; v3.x = scale; v3.y = scale; v3.z = scale; sp.transform.localScale = v3; }) //这个物体里摄像机更远 ...

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

2053. 如何实现类似AS3下的BitmapData.draw去截取区域图片? [ 67%]

....utils.Handler;     public class CupPhone     {         public function CupPhone()         {             Laya.init(550,400);             Laya.loader.load("walk.png",Handler.create(this,onLoaded));         }         private function onLoaded():void   ...

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

2054. 2D物理-复合碰撞器 [ 67%]

... box: Sprite; private var totalBox = 200; private var label: Label; public function Physics_Tumbler() { Laya.Config.isAntialias = true; Laya.init(1200, 700, WebGL); Stat.show(); Physics.enable(); PhysicsDebugDraw.enable(); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTE...

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

2055. 怎么清理掉 Sprite3D 相关的缓存资源, 资源destroy后内存还下降、。 [ 67%]

...,内存没下降。   清理方法            override public function destroy(destroyChild:Boolean = true):void {             if(effect3D != null){                 effect3D.destroy();                 effect3D = null;             }         ...

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

2056. 请问一下,怎么将下面这段AS3代码翻译成LayaAir的API [ 67%]

...urce.Texture; import laya.utils.Handler; public class LayaAirDemo { public function LayaAirDemo() { Laya.init(700,600); Laya.loader.load('res/apes/monkey2.png',Handler.create(this,onLoaded)) } private function onLoaded():void { var texture:Texture=Loader.getRes('res/apes/monkey2.png'); var sp:Sprite...

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

2057. ViewStack属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 67%]

...viewStack组件的测试页面**/ private var comp:ComponentDemoUI; public function ComponentDemo() { Laya.init(1334,750, WebGL); Laya.stage.scaleMode = "full"; Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("./res/atlas/ui.atlas", Handler.creat...

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

2058. 关于loader加载Loader.JSON的一些问题 [ 67%]

...个奇怪的问题: Laya.loader.load(resUrl, Laya.Handler.create(this, function (res) { //解析题目 log(res);   //放置方块 }), null, Laya.Loader.JSON); }   代码运行到这老是报错,报错原因是有不认识的字符,我想了下,resUrl指向的是本地的一个JSON文本资...

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

2059. layaAir 1.7.10 编译的时候,注释翻译成JS有问题 [ 67%]

...这样的注释 /** *       //注释 *       a.x(n, c); * **/ public function a.x(n,c):void{   } 翻译成JS之后空格被去掉了,就变成了 /** *//注释 * a.x(n, c); **/ public function a.x(n,c):void{ }  这样就导致了注释在“*//注释”这里就结束了。下面的 * a....

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

2060. 示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function [ 67%]

...示例打地鼠发布打包后提示TypeError: this.preinitialize is not a function $ adb shell am start -n "com.layabox.game/demo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Waiting for application to come online: com.layabox.game.test | com.layabox.game Conne...

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