大约有 328 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0040 秒)
Laya_社区(101) Laya3.0_api(63) Laya2.0_api(58) laya_api(54) Laya2.0_文档(24) Laya2.0_示例(11) Laya_示例(11) Laya3.0_文档(6)
...aya.HitResult = new Laya.HitResult(); point.x = Laya.MouseManager.instance.mouseX; point.y = Laya.MouseManager.instance.mouseY; console.log("rayPoint111 pointx:"+ point.x+" pointy:"+point.y+ " ray.origin.x:"+ray.origin.x+ " ray.origin.y:"+ray.origin.y+ " ray.origin.z:"+ray.origin.z+" ray.direction.x...
来源: Laya_社区 发布时间: 20191219
...this.camera.viewportPointToRay(new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.ray); Laya.Physics.rayCast(this.ray,this.hit); console.log("当前射线碰撞的信息是:" + this.hit.sprite3D.name); //摄像机位置 var position:Laya.Vector3=new Laya.Vecto...
来源: Laya_社区 发布时间: 20181020
...circleCollider.radius = 3 * this.scale; circleCollider.x = Laya.Laya.stage.mouseX; circleCollider.y = Laya.Laya.stage.mouseY; let circlePosx = circleCollider.x / Laya.Physics.PIXEL_RATIO; let circlePosy = circleCollider.y / Laya.Physics.PIXEL_RATIO; let velocityX = chassisPos.x - circlePosx; let vel...
来源: Laya2.0_示例 发布时间: 20241119
...(state); //从屏幕空间生成射线 this.point.elements[0] = Laya.stage.mouseX; this.point.elements[1] = Laya.stage.mouseY; this.camera.viewportPointToRay(this.point, this.ray); //11111111111111就是下面这句报错 Laya.Physics.rayCast(this.ray, this._outHitInfo, Number.MAX_VALUE, 10); if (th...
来源: Laya_社区 发布时间: 20170323
...function __moveHandler():void { var p:Point = toLocal(new Point(Laya.stage.mouseX, Laya.stage.mouseY), _colorSpr); var cir:Sprite = new Sprite(); cir.graphics.drawCircle(0, 0, 15, "#fff"); cir.pos(p.x, p.y); cir.blendMode = "destination-out"; _colorSpr.addChild(cir); _htmlCanvas = _colorSpr.drawToCa...
来源: Laya_社区 发布时间: 20180302
...取鼠标点击位置的屏幕坐标 this.point.x = MouseManager.instance.mouseX; this.point.y = MouseManager.instance.mouseY; //由点击的屏幕坐标产生射线 this.camera.viewportPointToRay(this.point, this.ray); //创建CannonHitResult对象来存储射线检测结果 var out = new CannonHit...
来源: Laya2.0_文档 发布时间: 20210715
...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
...nt.MOUSE_MOVE,this,move); } private function move():void { sp.x=Laya.stage.mouseX; sp.y=Laya.stage.mouseY; sp.graphics.clear(); sp.graphics.drawCircle(0, 0, 200,"#0ef604"); } li970704928 • 2017-12-13 19:08 @Laya_Aaron:可以吗这样复制过来的 Laya_Aaron • 2017-12-13 19:19 这么...
来源: Laya_社区 发布时间: 20171213
...= Laya.stage.height / 2; // //获取鼠标位置 this.targetX = Laya.stage.mouseX; this.targetY = Laya.stage.mouseY; // //获得偏移 // let dx:number = this.targetX - this.ball.x; // let dy:number = this.targetY - this.ball.y; var ps = [{ x: 0, y: 200 }, { x: 300, y: 0 },{ x: 700, y: 300 }]; this....
来源: Laya_社区 发布时间: 20171108
...取鼠标点击位置的屏幕坐标 this.point.x = MouseManager.instance.mouseX; this.point.y = MouseManager.instance.mouseY; //由点击的屏幕坐标产生射线 this.camera.viewportPointToRay(this.point, this.ray); //创建CannonHitResult对象来存储射线检测结果 var out: CannonHitResul...
来源: Laya2.0_文档 发布时间: 20210714