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

大约有 1,440 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0057 秒)

511. drawToTexture截大图有问题,会丢失 [ 80%]

...,1600,"#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp....

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

512. 用LayaAir引擎解析Tiled Map地图(ActionScript-2D进阶篇(AS3)-扩展模块) [ 80%]

...etViewPortPivotByScale(0,0); //将原地图放大3倍 tMap.scale = 3; Laya.stage.on(Event.RESIZE,this, this.resize); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); resize(); } /** * 移动地图视口 */ private function mouseMove():void { v...

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

513. 3D场景跳转到2D场景问题 [ 80%]

...rent); //创建胜利的UI界面 let victoryScene=new VictoryScene(); Laya.stage.addChild(victoryScene);   this.isDelete=true;  // console.log(Scene3DControl.GameSceneB);   } }结束界面跳转到3D场景 import {VictorySceneUI} from '../ui/layaMaxUI' import GameScene from './GameScene'; export ...

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

514. 圆形的头像怎么实现? [ 80%]

....webgl.js'></script> <script> var Sprite = Laya.Sprite; var Stage = Laya.Stage; var WebGL = Laya.WebGL; Laya.init(1280, 800,WebGL); Laya.stage.alignV = Stage.ALIGN_LEFT; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = 'noborder'; Laya.stage.screenMode = Stage.SCREEN_HOR...

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

515. 按照范例写的碰撞一直检测不到 this.outHitInfo.distance [ 80%]

... this.scene = Laya.loader.getRes("h5/LayaScene_scene03/scene03.ls"); Laya.stage.addChild(this.scene); //设置场景在2D界面最后(最底层为第0层) Laya.stage.setChildIndex(this.scene, 0); //获取场景模型中的角色移动碰撞区模型 var moveArea = this.scene.getChildAt(0).getChi...

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

516. 关于mouseover的问题 [ 80%]

...{             Laya.init(600,600,WebGL);             Laya.stage.alignH=Stage.ALIGN_MIDDLE;             Laya.stage.alignV=Stage.ALIGN_TOP;                          var sp:Sprite=new Sprite();             sp.width=100;             sp.height...

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

517. 发射射线检测不到,物体有包围盒 [ 80%]

...           }      onMouseDown() {         this.point.x = Laya.stage.mouseX;         this.point.y = Laya.stage.mouseX;         //产生射线         this.camera.viewportPointToRay(this.point,this._ray);         //拿到射线碰撞的物体         this.scene.physics...

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

518. ToolTip鼠标悬停的使用 [ 80%]

...lic function ToolTipDemo() { Laya.init(Browser.width,Browser.height); Laya.stage.bgColor="#eeffcc"; Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { this._testTip=new TestTipsUI();//务必在Laya.init后去new实例,不可...

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

519. BackGround.super(this);这个报错 Cannot read property 'call' of undefined [ 80%]

... (function shouye(){ Laya.init(100,300); this.bgimg=new BackGround(); Laya.stage.addChild(this.bgimg); })(); return shouye; })(); var BackGround = (function (_super) { function BackGround() { BackGround.super(this); this.bg=new Laya.sprite; this.bg.loaImage("war/beijing.png"); this.addchild(this.b...

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

520. 切换后台时,引擎如何判断是否停止定时器? [ 80%]

...      constructor() {         super();          this.stage.on(Laya.Event.FOCUS, this, this.onFocus);         this.stage.on(Laya.Event.BLUR, this, this.onBlur);         Laya.timer.frameLoop(1,this,this.onFrameLoop);     }      private onFrameLoop():void{...

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