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

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

1. 区块地图-等角地图 [ 100%]

...) * radiusX; var color = "#FF7F50"; sprite = new Sprite(); sprite.graphics.drawLine(0, 0, -radiusX, radiusY, color); sprite.graphics.drawLine(0, 0, radiusX, radiusY, color); sprite.graphics.drawLine(-radiusX, radiusY, 0, radiusY * 2, color); sprite.graphics.drawLine(radiusX, radiusY, 0, radiusY * 2,...

来源: Laya_示例 发布时间: 20241119

2. 输入设备-指南针 [ 98%]

... { var canvas = new Sprite(); Laya.stage.addChild(canvas); canvas.graphics.drawLine(compassImg.x, 50, compassImg.x, 182, "#FFFFFF", 3); canvas.graphics.drawLine(-140 + compassImg.x, compassImg.y, 140 + compassImg.x, compassImg.y, "#AAAAAA", 1); canvas.graphics.drawLine(compassImg.x, -140 + compassIm...

来源: Laya_示例 发布时间: 20241119

3. Sprite-绘制各种形状 [ 91%]

...thing() { sp = new Sprite(); Laya.stage.addChild(sp); //画线 sp.graphics.drawLine(10, 58, 146, 58, "#ff0000", 3); //画连续直线 sp.graphics.drawLines(176, 58, [0, 0, 39, -50, 78, 0, 117, 50, 156, 0], "#ff0000", 5); //画曲线 sp.graphics.drawCurves(352, 58, [0, 0, 19, -100, 39, 0, 58, 100, 78...

来源: Laya_示例 发布时间: 20241119

4. 缓动-简单的Tween [ 79%]

...2.png"); characterB.pivot(34, 50); characterB.y = 250; Laya.stage.graphics.drawLine(terminalX, 0, terminalX, Laya.stage.height, "#FFFFFF"); // characterA使用Tween.to缓动 Tween.to(characterA, { x: terminalX }, 1000); // characterB使用Tween.from缓动 characterB.x = terminalX; Tween.from(charact...

来源: Laya_示例 发布时间: 20241119

5. 鼠标交互-滑动 [ 67%]

...th; } function drawTrack() { var graph = new Sprite(); Laya.stage.graphics.drawLine( beginPosition, Laya.stage.height / 2, endPosition, Laya.stage.height / 2, "#FFFFFF", 20); Laya.stage.addChild(graph); } /**按下事件处理*/ function onMouseDown(e) { //添加鼠标移到侦听 Laya.stage.on(Even...

来源: Laya_示例 发布时间: 20241119