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

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

1001. LayaFlash针对资源的加载是同步还是异步? [ 72%]

...it(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.scaleMode = StageScaleMode.NO_SCALE; this.stage.align = StageAlign.TOP_LEFT; IFlash.setSize(1000, 600); //2D项目中设置场景尺寸 IFlash.setOrientationEx(1); //是否为横屏模式 IFlash.setBgcolor("#000000...

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

1002. H5页面的骨骼动画不能显示完整,兼容性问题? [ 72%]

...整,兼容性问题? // 加载动画 loadAni(): void { var aniPath = this.ANIS[this.fishIndex]; this.mFactory = new Laya.Templet(); this.mFactory.on(Laya.Event.COMPLETE, this, this.parseComplete); this.mFactory.loadAni(aniPath); } // 动画解析完成,添加到舞台,并且开始swim parseCom...

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

1003. 怎么像canvas那样做到每次循环去清空一次画布,我发现每次画的时候他会把上一次的坐标也画出来,导致变形了,该如何让他每次累加的同时清空上次的路径 [ 72%]

... Laya.WebGL); var bg = new Laya.Sprite(); bg.loadImage("comp/hunter.jpg"); this.addChild(bg); Laya.timer.frameLoop(1,this,this.move); // drawSomething(); } move() { sp = new Laya.Sprite(); Laya.stage.addChild(sp); //画曲线 if(x<100){ x++; } sp.graphics.clear(); sp.graphics.drawCurves(10, 58, [...

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

1004. 向TiledMap中的对象层中的矩形框添加精灵,不显示 [ 72%]

..., new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoadedMap)); } private var sp:Sprite; private function onLoadedMap():void { var mapLayer:MapLayer=tiledMap.getLayerByIndex(2); sp=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); sp.zOrder=1000; map...

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

1005. 设置滤镜(ActionScript-LayaAir基础篇(AS3)-位图) [ 72%]

...; Laya.stage.bgColor = "#232628"; Laya.loader.load(ApePath, Handler.create(this, setup)); } private function setup(e:*=null):void { normalizeApe(); makeRedApe(); grayingApe(); } private function normalizeApe():void { var originalApe:Sprite = createApe(); apeTexture = Laya.loader.getRes(ApePath); ori...

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

1006. 粒子会不会有内存泄漏? [ 72%]

...hild(gameManager); Laya.loader.load("res/parts/lizi2.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); } var i = 0; function onAssetsLoaded(settings) { var sp = new Particle2D(settings); sp.play(); sp.emitter.start(); sp.x = 100; sp.y = 100; sp.name = (i++).toString(); console.log(sp....

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

1007. 百度小游戏 内存不断增大的情况 [ 72%]

...Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild(testVi...

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

1008. SkyBoxMaterial材质详解(ActionScript-3D基础(AS3)-天空材质详解) [ 72%]

...Material.load("res/threeDimen/skyBox/DawnDusk/SkyBox.lmat", Handler.create(this, function(mat:SkyBoxMaterial):void { //获取相机的天空渲染器 var skyRenderer:SkyRenderer = camera.skyRenderer; //创建天空盒的mesh skyRenderer.mesh = SkyBox.instance; //设置天空盒材质 skyRenderer.mat...

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

1009. request failed status:0 text: IOS HttpRequest [ 72%]

...ert(JSON.stringify(data)); hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); var headers = []; headers.push("Content-Type"); headers.push("application/json"); hr.send('ht...

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

1010. 粒子释放问题 [ 72%]

...../../"; Laya.loader.load("res/particles/GravityMode.part", Handler.create(this, onAssetsLoaded), null, Loader.JSON); })();   function onAssetsLoaded(settings) { sp = new Particle2D(settings); sp.emitter.start(); sp.play(); Laya.stage.addChild(sp);   sp.x = Laya.stage.width / 2; sp.y = Laya.stage....

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