大约有 6 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0034 秒)
.../ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = new Laya.Vector3(); protected resultRotation: Laya.Quaternion = new Laya.Quaternion(); protected tempRotationZ: Laya.Quaternion = ne...
来源: Laya3.0_文档 发布时间: 20241014
...a.TiledMap; private MapX:number = 0; private MapY:number = 0; private mLastMouseX:number; private mLastMouseY:number; onEnable() { //创建地图对象 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.designWidt...
来源: Laya3.0_文档 发布时间: 20230303
...rollText); } /* 开始滚动文本 */ startScrollText() { prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.finishScrollText); } /* 停止滚动文本 */ finishScrollText() { Laya.stage.off(Lay...
来源: Laya3.0_文档 发布时间: 20241014
...); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,function() { sp.pos(Laya.stage.mouseX,Laya.stage.mouseY); }); (图3-1) 此时FPS显示30,并且在鼠标移动时,可以感觉到圆球位置的更新不连贯。设置Stage.frameRate为Stage.FRAME_MOUSE: Laya.stage.frameRate = Laya.Stage.FRAME_M...
来源: Laya3.0_文档 发布时间: 20241014
...ector3(0, 0, 0)); //以鼠标点击的点作为原点 point.x = Laya.stage.mouseX; point.y = Laya.stage.mouseY; //计算一个从屏幕空间生成的射线 _camera.viewportPointToRay(point, ray); /* ……省略若干代码 */ 4.3 使用物理射线 在LayaAir 3D中实现射线检测是使用物理...
来源: Laya3.0_文档 发布时间: 20241014
...Down(e: Laya.Event) { let point = new Laya.Vector2(); point.x = Laya.stage.mouseX; point.y = Laya.stage.mouseY; //产生射线 let ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); this.camera.viewportPointToRay(point,ray); //拿到射线碰撞的物体 let outs : any[] = [];...
来源: Laya3.0_文档 发布时间: 20241014