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

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

2491. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 40%]

...phics.drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAir_AS3/2D/advanced/PerformanceOptimization/CPU/img/1.png) (图1) ...

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

2492. 区块地图-等角地图 [ 40%]

...WALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Laya.Event.CLICK, this, this.onStageClick); } createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Point = Laya.Point; this.tiledMap = new TiledMap(); this.tiledMap.createMap("res/tiledMap/isometric_grass_and_...

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

2493. unity中的模型导出后在laya中显示不正常 [ 40%]

... Laya.stage.addChild(Laya.Scene.load("res/layaScene.ls")); scene.once(Laya.Event.HIERARCHY_LOADED, this, function (sceneTemp) { var camera = sceneTemp.getChildByName("Main Camera"); camera.transform.translate(new Laya.Vector3(0, 0, 200)); //移动camera });2.问题2:加载完看官方的demo要加...

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

2494. SCALE_FIXED_WIDTH适配屏幕的问题 [ 39%]

...机制、时间和其他一些Timer相关的问题 graphics alpha 问题 event自定义事件的问题 问题状态 最新活动: 2018-12-14 12:04 浏览: 1969 关注: 3 人 boobo • 2018-12-16 13:34 是h5,微信浏览器 boobo • 2018-12-12 12:37 没有用噢,主要是竖屏与横屏直接切...

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

2495. texture2D的setPixel纹理rgba数据之后会随着窗口的缩放,渐变成黑色 [ 39%]

...Handler(this,this.onCallBack),null,Laya.Loader.BUFFER); Laya.stage.on(Laya.Event.KEY_DOWN,this,this.onKey); //######################################################################## } private curStatus:boolean = false; private refreshCamera(){ this.curStatus =!this.curStatus; let data:ArrayBuffer =...

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

2496. zip更新模式缓存是怎么读取的?? [ 39%]

...本:   /** * 更新。 * @param {string} url zip下载地址 * @param {(event:string,downloadPercent:number,curfile:string)=>boolean} onEvent 事件的回调。 * 事件名称: * 'downloading' 下载中,这时候downloadPercent有值 * 'downloadError' 下载错误 * 'downloadOK' 下载成...

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

2497. VR的demo有没有加载3D场景的啊,实在不知怎么加 [ 39%]

...transform.localScale = new Laya.Vector3(0.2, 0.2, 0.2); sprite3D.once(Laya.Event.HIERARCHY_LOADED, null, function(sprite) { //console.log(scene.numChildren+","+sprite._childs.length); setMeshParams(sprite, Laya.StandardMaterial.RENDERMODE_OPAQUE, new Laya.Vector4(3.5, 3.5, 3.5, 1.0), new Laya.Vector...

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

2498. drawTexture 画出来的数据会有以前的数据 [ 38%]

... iconSpr.width = 1280; iconSpr.height = 640; iconSpr.addChild(img); btn.on(Event.CLICK,this,runGame1); } private function runGame1():void { xNum = Math.random()*7 - 3; yNum = Math.random()*7 - 3; Laya.timer.loop(20,this,onRun); Laya.timer.frameLoop(10,this,refresh); } private function refresh():void...

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

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

....drawCircle(0,0,20,"#990000"); Laya.stage.addChild(sp); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); ``` ![图片1.png](https://official.layabox.com/laya_data/Chinese/LayaAir_AS3/2D/advanced/PerformanceOptimization/CPU/img/1.png) (图1) ...

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

2500. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 38%]

...nimator) as Laya.Animator; //动画完成事件监听 this.roleAni.on(Laya.Event.COMPLETE,this,this.onComplete); } /*覆写3D组件更新方法(相当于帧循环)*/ public _update(state:Laya.RenderState):void{ //如果是攻击状态播放击球动画(优先播放击球动画) if(this.attac...

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