大约有 11 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0026 秒)
...dler; var Stat = Laya.Stat; var WebGL = Laya.WebGL; var tiledMap; var mLastMouseX = 0; var mLastMouseY = 0; var mX = 0; var mY = 0; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.scaleMode = Stage.SCALE_FULL; Stat.show(...
来源: Laya_示例 发布时间: 20241119
...emove", this, onMouseMove); } function onMouseMove() { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Browser = Laya.Browser; import Handle...
来源: Laya_示例 发布时间: 20241119
...处理*/ function onMouseMove(e) { button.x = Math.max(Math.min(Laya.stage.mouseX, endPosition), beginPosition); } /**抬起事件处理*/ function onMouseUp(e) { Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); Laya.stage.off(Event.MOUSE_UP, this, onMouseUp); Laya.stage.off(Event.MOUSE_OUT, thi...
来源: Laya_示例 发布时间: 20241119
...ext); } /* 开始滚动文本 */ function startScrollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ function finishScrollText(e) { Laya.stage.off(Event.MOUSE_MOVE, ...
来源: Laya_示例 发布时间: 20241119
... = 0; } function onMouseMove() { if (!isDown) return; path.push(Laya.stage.mouseX); path.push(Laya.stage.mouseY); } function onMouseUp() { isDown = false; canvasGraphics.drawPoly(0, 0, path.concat(), color); } function animate() { liveGraphics.clear(); liveGraphics.drawPoly(0, 0, path, color); } })(...
来源: Laya_示例 发布时间: 20241119
...k() { var p = new Point(0, 0); layer.getTilePositionByScreenPos(Laya.stage.mouseX, Laya.stage.mouseY, p); layer.getScreenPositionByTilePos(Math.floor(p.x), Math.floor(p.y), p); sprite.pos(p.x, p.y); } function mapLoaded() { layer = tiledMap.getLayerByIndex(0); var radiusX = 32; var radiusY = Math.ta...
来源: Laya_示例 发布时间: 20241119
...unction onClick(e) { //输出坐标信息 console.log("mouse:", Laya.stage.mouseX, Laya.stage.mouseY); } function onResize() { //输出当前适配模式下的stage大小 console.log("size:", Laya.stage.width, Laya.stage.height); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya....
来源: Laya_示例 发布时间: 20241119
...从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (function loadUI() { va...
来源: Laya_示例 发布时间: 20241119
...从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outHitInfo, 30, 0); } (function loadUI() { va...
来源: Laya_示例 发布时间: 20241119
...从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCastAll(ray, _outHitAllInfo, 30, 0); } (function loadUI(...
来源: Laya_示例 发布时间: 20241119