{"id":32530,"date":"2024-11-25T08:56:25","date_gmt":"2024-11-25T00:56:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/32530\/"},"modified":"2024-11-25T08:56:25","modified_gmt":"2024-11-25T00:56:25","slug":"%e5%bf%ab%e9%80%9f%e5%85%a5%e9%97%a8mojs%e5%8a%a8%e7%94%bb%e5%ba%93%ef%bc%9a%e7%88%86%e7%82%b8%e6%a8%a1%e5%9d%97%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/32530\/","title":{"rendered":"\u5feb\u901f\u5165\u95e8Mojs\u52a8\u753b\u5e93\uff1a\u7206\u70b8\u6a21\u5757\u6307\u5357"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/887\/227\/169366975596132.jpg\" class=\"aligncenter\" title=\"\u5feb\u901f\u5165\u95e8Mojs\u52a8\u753b\u5e93\uff1a\u7206\u70b8\u6a21\u5757\u6307\u5357\u63d2\u56fe\" alt=\"\u5feb\u901f\u5165\u95e8Mojs\u52a8\u753b\u5e93\uff1a\u7206\u70b8\u6a21\u5757\u6307\u5357\u63d2\u56fe\" \/><\/p>\n<p>\u6211\u4eec\u901a\u8fc7\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 mojs \u4e3a HTML \u5143\u7d20\u6dfb\u52a0\u52a8\u753b\u6765\u5f00\u59cb\u672c\u7cfb\u5217\u3002\u5728\u7b2c\u4e8c\u4e2a\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ee7\u7eed\u4f7f\u7528 Shape \u6a21\u5757\u5236\u4f5c\u5185\u7f6e SVG \u5f62\u72b6\u7684\u52a8\u753b\u3002\u7b2c\u4e09\u4e2a\u6559\u7a0b\u4ecb\u7ecd\u4e86\u4f7f\u7528 ShapeSwirl \u548c stagger \u6a21\u5757\u5bf9 SVG \u5f62\u72b6\u8fdb\u884c\u52a8\u753b\u5904\u7406\u7684\u66f4\u591a\u65b9\u6cd5\u3002<\/p>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Burst \u6a21\u5757\u4ee5\u7a81\u53d1\u5f62\u5f0f\u5236\u4f5c\u4e0d\u540c SVG \u5f62\u72b6\u7684\u52a8\u753b\u3002\u672c\u6559\u7a0b\u5c06\u53d6\u51b3\u4e8e\u6211\u4eec\u5728\u524d\u4e09\u4e2a\u6559\u7a0b\u4e2d\u4ecb\u7ecd\u7684\u6982\u5ff5\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u9605\u8bfb\u8fc7\u5b83\u4eec\uff0c\u6211\u5efa\u8bae\u60a8\u5148\u9605\u8bfb\u5b83\u4eec\u3002<\/p>\n<h2>\u521b\u5efa\u57fa\u672c\u8fde\u62cd\u52a8\u753b<\/h2>\n<p>\u5728\u521b\u5efa\u4efb\u4f55\u7a81\u53d1\u52a8\u753b\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u505a\u7684\u7b2c\u4e00\u4ef6\u4e8b\u662f\u5b9e\u4f8b\u5316 Burst \u5bf9\u8c61\u3002\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u6307\u5b9a\u4e0d\u540c\u5c5e\u6027\u7684\u503c\u6765\u63a7\u5236\u52a8\u753b\u7684\u64ad\u653e\u65b9\u5f0f\u3002 Burst \u6a21\u5757\u4e2d\u7684\u8bb8\u591a\u5c5e\u6027\u540d\u79f0\u4e0e Shape \u6a21\u5757\u4e2d\u7684\u5c5e\u6027\u540d\u79f0\u76f8\u540c\u3002\u7136\u800c\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e9b\u5c5e\u6027\u6267\u884c\u975e\u5e38\u4e0d\u540c\u7684\u4efb\u52a1\u3002<\/p>\n<p>left \u548c right \u5c5e\u6027\u51b3\u5b9a\u7a81\u53d1\u7684\u521d\u59cb\u4f4d\u7f6e\uff0c\u800c\u4e0d\u662f\u7a81\u53d1\u5185\u90e8\u7684\u7c92\u5b50\u3002\u540c\u6837\uff0cx \u548c y \u5c5e\u6027\u51b3\u5b9a\u6574\u4e2a\u7a81\u53d1\u7684\u79fb\u52a8\u800c\u4e0d\u662f\u5355\u4e2a\u7c92\u5b50\u7684\u79fb\u52a8\u3002<\/p>\n<p>\u6240\u6709\u7206\u53d1\u7c92\u5b50\u5f62\u6210\u7684\u5706\u7684\u534a\u5f84\u7531 radius \u5c5e\u6027\u63a7\u5236\u3002\u8fd9\u4e0e\u5355\u4e2a\u5f62\u72b6\u7684 radius \u5c5e\u6027\u975e\u5e38\u4e0d\u540c\uff0c\u540e\u8005\u51b3\u5b9a\u4e86\u8fd9\u4e9b\u5f62\u72b6\u7684\u5927\u5c0f\u3002\u5728\u7206\u53d1\u7684\u60c5\u51b5\u4e0b\uff0c\u534a\u5f84\u51b3\u5b9a\u4e86\u5176\u4e2d\u5404\u4e2a\u5f62\u72b6\u7684\u8ddd\u79bb\u3002<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528 count \u5c5e\u6027\u6307\u5b9a\u5355\u6b21\u7a81\u53d1\u4e2d\u7684\u5f62\u72b6\u6216\u7c92\u5b50\u6570\u91cf\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u60a8\u521b\u5efa\u7684\u6bcf\u4e2a\u7a81\u53d1\u4e2d\u5c06\u6709\u4e94\u4e2a\u7c92\u5b50\u3002\u6240\u6709\u8fd9\u4e9b\u7c92\u5b50\u5747\u5300\u5206\u5e03\u5728\u7206\u53d1\u7684\u5706\u5468\u4e0a\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6709\u56db\u4e2a\u7c92\u5b50\uff0c\u5b83\u4eec\u5c06\u5f7c\u6b64\u6210 90 \u5ea6\u653e\u7f6e\u3002\u5982\u679c\u6709\u4e09\u4e2a\u7c92\u5b50\uff0c\u5b83\u4eec\u5c06\u88ab\u653e\u7f6e\u5728 120 \u5ea6\u5904\u3002<\/p>\n<p>\u5982\u679c\u60a8\u4e0d\u5e0c\u671b\u7206\u53d1\u7c92\u5b50\u8986\u76d6\u6574\u4e2a 360 \u5ea6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 Degree&nbsp;\u5c5e\u6027\u6307\u5b9a\u5e94\u8986\u76d6\u7684\u90e8\u5206\u3002\u4efb\u4f55\u5927\u4e8e 0 \u7684\u503c\u5bf9\u6b64\u5c5e\u6027\u90fd\u6709\u6548\u3002\u6307\u5b9a\u7684\u5ea6\u6570\u5c06\u5747\u5300\u5206\u5e03\u5728\u6240\u6709\u7c92\u5b50\u4e4b\u95f4\u3002\u5982\u679c\u5ea6\u6570\u8d85\u8fc7 360\uff0c\u5f62\u72b6\u53ef\u80fd\u4f1a\u91cd\u53e0\u3002<\/p>\n<p>\u4f7f\u7528 angle \u5c5e\u6027\u6307\u5b9a\u7684\u89d2\u5ea6\u51b3\u5b9a\u4e86\u6574\u4e2a\u7a81\u53d1\u7684\u89d2\u5ea6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5355\u4e2a\u7c92\u5b50\u4e0d\u662f\u7ed5\u7740\u5b83\u4eec\u81ea\u5df1\u7684\u4e2d\u5fc3\u65cb\u8f6c\uff0c\u800c\u662f\u7ed5\u7740\u7206\u53d1\u7684\u4e2d\u5fc3\u65cb\u8f6c\u3002\u8fd9\u4e0e\u5730\u7403\u7ed5\u592a\u9633\u516c\u8f6c\u7c7b\u4f3c\uff0c\u4e0e\u5730\u7403\u81ea\u8f6c\u8f74\u81ea\u8f6c\u4e0d\u540c\u3002<\/p>\n<p>scale \u5c5e\u6027\u53ef\u7f29\u653e\u7a81\u53d1\u7684\u6240\u6709\u7269\u7406\u5c5e\u6027\u7684\u503c\uff0c\u8fdb\u800c\u7f29\u653e\u5404\u4e2a\u5f62\u72b6\u3002\u5c31\u50cf\u5176\u4ed6\u7a81\u53d1\u5c5e\u6027\u4e00\u6837\uff0c\u5176\u4e2d\u7684\u6240\u6709\u5f62\u72b6\u90fd\u4f1a\u7acb\u5373\u7f29\u653e\u3002\u5c06\u7a81\u53d1 scale \u8bbe\u7f6e\u4e3a 3 \u4f1a\u5c06\u6574\u4e2a\u7a81\u53d1\u7684\u534a\u5f84\u4ee5\u53ca\u5355\u4e2a\u5f62\u72b6\u7684\u5927\u5c0f\u589e\u52a0 3\u3002<\/p>\n<p>\u5728\u4e0b\u9762\u7684\u4ee3\u7801\u7247\u6bb5\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u521a\u521a\u8ba8\u8bba\u7684\u5c5e\u6027\u521b\u5efa\u4e94\u4e2a\u4e0d\u540c\u7684\u7a81\u53d1\u3002<\/p>\n<pre>var burstA = new mojs.Burst({\n  count: 20\n});\n\nvar burstB = new mojs.Burst({\n  angle: {\n    0: 360\n  },\n  scale: {\n    1: 2\n  },\n  radius: 10\n});\n\nvar burstC = new mojs.Burst({\n  angle: {\n    0: 360\n  },\n  scale: {\n    1: 2\n  },\n  radius: {\n    10: 100\n  }\n});\n\nvar burstD = new mojs.Burst({\n  degree: 180,\n  radiusX: 10,\n  angle: -90,\n  scale: {\n    1: 2\n  },\n  radius: {\n    10: 100\n  }\n});\n\nvar burstE = new mojs.Burst({\n  count: 20,\n  degree: 3600\n});\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u60a8\u53ef\u4ee5\u770b\u5230 burstA \u548c burstE \u4ec5\u5728\u5b83\u4eec\u5fc5\u987b\u8986\u76d6\u7684\u5ea6\u6570\u4e0a\u6709\u6240\u4e0d\u540c\u3002\u7531\u4e8e burstA \u4e2d\u7684\u7c92\u5b50\u5fc5\u987b\u8986\u76d6 360 \u5ea6\uff08\u9ed8\u8ba4\u503c\uff09\uff0c\u56e0\u6b64\u5b83\u4eec\u7684\u653e\u7f6e\u95f4\u9694\u4e3a 360\/20 = 18 \u5ea6\u3002\u53e6\u4e00\u65b9\u9762\uff0cburstE \u4e2d\u7684\u7c92\u5b50\u4ee5 3600\/20 = 180 \u5ea6\u6570\u653e\u7f6e\u3002\u4ece\u96f6\u5f00\u59cb\uff0c\u7b2c\u4e00\u4e2a\u7c92\u5b50\u653e\u7f6e\u5728 0 \u5ea6\u5904\uff0c\u4e0b\u4e00\u4e2a\u7c92\u5b50\u653e\u7f6e\u5728 180 \u5ea6\u5904\u3002 <\/p>\n<p>\u7136\u540e\u5c06\u7b2c\u4e09\u4e2a\u7c92\u5b50\u653e\u7f6e\u5728 360 \u5ea6\u5904\uff0c\u8fd9\u57fa\u672c\u4e0a\u7b49\u4e8e 0 \u5ea6\u3002\u7136\u540e\u5c06\u7b2c\u56db\u4e2a\u7c92\u5b50\u653e\u7f6e\u5728 540 \u5ea6\u5904\uff0c\u4f46\u8fd9\u57fa\u672c\u4e0a\u7b49\u4e8e 180 \u5ea6\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u6240\u6709\u5947\u6570\u7c92\u5b50\u90fd\u653e\u7f6e\u57280\u5ea6\u5904\uff0c\u6240\u6709\u5076\u6570\u7c92\u5b50\u653e\u7f6e\u5728180\u5ea6\u5904\u3002\u6700\u540e\uff0c\u60a8\u53ea\u770b\u5230\u4e24\u4e2a\u7c92\u5b50\uff0c\u56e0\u4e3a\u6240\u6709\u5176\u4ed6\u7c92\u5b50\u90fd\u4e0e\u524d\u4e24\u4e2a\u7c92\u5b50\u91cd\u53e0\u3002<\/p>\n<\/p>\n<p>\u8bf7\u52a1\u5fc5\u8bb0\u4f4f\uff0c\u60a8\u65e0\u6cd5\u76f4\u63a5\u63a7\u5236\u7a81\u53d1\u52a8\u753b\u7684\u6301\u7eed\u65f6\u95f4\u3001\u5ef6\u8fdf\u6216\u7f13\u52a8\u529f\u80fd\u3002\u8be5\u6a21\u5757\u6839\u636e\u6b63\u5728\u52a8\u753b\u7684\u4e0d\u540c\u5b50\u9879\u7684\u503c\u81ea\u52a8\u786e\u5b9a\u6240\u6709\u8fd9\u4e9b\u503c\u3002<\/p>\n<h2>\u64cd\u7eb5\u5355\u4e2a\u7206\u53d1\u7c92\u5b50<\/h2>\n<p>\u5230\u76ee\u524d\u4e3a\u6b62\uff0c\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u7206\u53d1\u4e2d\u7684\u6240\u6709\u7c92\u5b50\u90fd\u5e94\u7528\u4e86\u76f8\u540c\u7684\u52a8\u753b\u3002\u5b83\u4eec\u7684\u89d2\u5ea6\u3001\u6bd4\u4f8b\u3001\u534a\u5f84\u548c\u4f4d\u7f6e\u90fd\u6539\u53d8\u4e86\u76f8\u540c\u7684\u503c\u3002\u6b64\u5916\uff0c\u6211\u4eec\u65e0\u6cd5\u63a7\u5236\u5355\u4e2a\u7c92\u5b50\u6216\u6574\u4e2a\u7206\u53d1\u7684\u6301\u7eed\u65f6\u95f4\u548c\u5ef6\u8fdf\u3002 mojs Burst \u6a21\u5757\u6ca1\u6709\u4e00\u7ec4\u53ef\u4ee5\u76f4\u63a5\u66f4\u6539\u6240\u6709\u8fd9\u4e9b\u503c\u7684\u5c5e\u6027\u3002\u4f46\u662f\uff0c\u6211\u4eec\u53ef\u4ee5\u6307\u5b9a\u5355\u4e2a\u7c92\u5b50\u7684\u52a8\u753b\u503c\uff0c\u8fd9\u53cd\u8fc7\u6765\u4f1a\u5f71\u54cd\u7206\u53d1\u52a8\u753b\u3002<\/p>\n<p>\u7206\u53d1\u52a8\u753b\u4e2d\u7684\u6240\u6709\u7c92\u5b50\u90fd\u88ab\u89c6\u4e3a\u539f\u59cb Burst \u5bf9\u8c61\u7684\u5b50\u7ea7\u3002\u56e0\u6b64\uff0cmojs \u5141\u8bb8\u6211\u4eec\u4f7f\u7528 children \u5c5e\u6027\u6765\u63a7\u5236\u5355\u4e2a\u7206\u53d1\u7c92\u5b50\u7684\u52a8\u753b\uff0c\u8be5\u5c5e\u6027\u63a5\u53d7\u4e00\u4e2a\u5bf9\u8c61\u4f5c\u4e3a\u5176\u503c\u3002\u60a8\u53ef\u4ee5\u5728\u5b50\u5bf9\u8c61\u5185\u4f7f\u7528\u9664 x \u548c y \u4e4b\u5916\u7684\u6240\u6709 ShapeSwirl \u5c5e\u6027\u3002\u8fd9\u662f\u6709\u9053\u7406\u7684\uff0c\u56e0\u4e3a\u7206\u53d1\u52a8\u753b\u4e2d\u7684\u5355\u4e2a\u7c92\u5b50\u5fc5\u987b\u51fa\u73b0\u5728\u67d0\u4e9b\u4f4d\u7f6e\uff0c\u5e76\u4e14\u5141\u8bb8\u6211\u4eec\u968f\u673a\u66f4\u6539\u5355\u4e2a\u7c92\u5b50\u7684\u4f4d\u7f6e\u5c06\u6539\u53d8\u914d\u7f6e\u3002<\/p>\n<p>\u60a8\u672a\u6307\u5b9a\u7684\u4efb\u4f55\u5b50\u5c5e\u6027\u503c\u90fd\u5c06\u8bbe\u7f6e\u4e3a ShapeSwirl \u6a21\u5757\u63d0\u4f9b\u7684\u9ed8\u8ba4\u503c\u3002\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u5bf9\u7a81\u53d1\u52a8\u753b\u7684 20 \u6761\u4e0d\u540c\u7ebf\u8fdb\u884c\u52a8\u753b\u5904\u7406\u3002\u8fd9\u6b21\uff0cangle \u5c5e\u6027\u5df2\u8bbe\u7f6e\u5728\u5355\u4e2a\u7c92\u5b50\u4e0a\uff0c\u800c\u4e0d\u662f Burst \u5bf9\u8c61\u4e0a\uff0c\u8fd9\u6837\u53ea\u6709\u7ebf\u7ed5\u5176\u4e2d\u5fc3\u65cb\u8f6c\uff0c\u800c\u4e0d\u662f\u6574\u4e2a\u5bf9\u8c61\u3002\u6b63\u5982\u6211\u4eec\u5728\u4e0a\u4e00\u7bc7\u6559\u7a0b\u4e2d\u4e86\u89e3\u5230\u7684\uff0c\u6240\u6709 ShapeSwirl \u5bf9\u8c61\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u90fd\u4f1a\u4ece 1 \u7f29\u5c0f\u5230 0\u3002\u8fd9\u5c31\u662f\u52a8\u753b\u4e2d\u7ebf\u6761\u957f\u5ea6\u4ece 40 \u53d8\u4e3a 0 \u7684\u539f\u56e0\u3002<\/p>\n<pre>var burstA = new mojs.Burst({\n  count: 20,\n  children: {\n    shape: 'line',\n    stroke: 'black',\n    radius: 20,\n    angle: {\n    0: 180\n    }\n  }\n});\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6b63\u5982\u6211\u4e4b\u524d\u63d0\u5230\u7684\uff0c\u6211\u4eec\u53ef\u4ee5\u4e3a\u8fde\u62cd\u52a8\u753b\u4e2d\u7684\u6240\u6709 ShapeSwirl \u5c5e\u6027\u8bbe\u7f6e\u52a8\u753b\u3002\u52a8\u753b\u4e2d\u7684\u6bcf\u4e2a\u5b50\u9879\u90fd\u53ef\u4ee5\u6709\u81ea\u5df1\u7684\u4e00\u7ec4\u5c5e\u6027\u3002\u5982\u679c\u4ec5\u63d0\u4f9b\u4e00\u4e2a\u503c\uff0c\u5b83\u5c06\u5e94\u7528\u4e8e\u6240\u6709\u5b50\u7c92\u5b50\u3002\u5982\u679c\u8fd9\u4e9b\u503c\u4ee5\u6570\u7ec4\u5f62\u5f0f\u63d0\u4f9b\uff0c\u5b83\u4eec\u5c06\u6309\u987a\u5e8f\u5e94\u7528\uff0c\u4e00\u6b21\u4e00\u4e2a\u7c92\u5b50\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4f7f\u7528\u6211\u4eec\u8fc4\u4eca\u4e3a\u6b62\u5b66\u5230\u7684\u6240\u6709\u6982\u5ff5\u521b\u5efa\u4e94\u79cd\u4e0d\u540c\u7684\u7a81\u53d1\u52a8\u753b\u7684 JavaScript \u4ee3\u7801\u3002<\/p>\n<pre>var burstA = new mojs.Burst({\n  count: 20,\n  angle: {\n    0: 180\n  },\n  radius: {\n    0: 100\n  },\n  children: {\n    shape: \"polygon\",\n    stroke: \"black\",\n    radius: 20,\n    angle: {\n      0: 360\n    },\n    duration: 4000\n  }\n});\n\nvar burstB = new mojs.Burst({\n  count: 20,\n  angle: {\n    0: 180\n  },\n  radius: {\n    0: 100\n  },\n  children: {\n    shape: \"polygon\",\n    fill: [\"yellow\", \"cyan\", \"orange\"],\n    stroke: \"black\",\n    radius: 20,\n    scale: {\n      1: 2\n    },\n    duration: 2000\n  },\n  isShowEnd: false\n});\n\nvar burstC = new mojs.Burst({\n  count: 20,\n  angle: {\n    0: -180\n  },\n  radius: {\n    0: 100\n  },\n  children: {\n    shape: \"circle\",\n    fill: [\"red\", \"black\", \"blue\"],\n    radius: {\n      10: \"stagger(5, 1)\"\n    }\n  }\n});\n\nvar burstD = new mojs.Burst({\n  count: 6,\n  radius: {\n    0: 100\n  },\n  children: {\n    shape: \"circle\",\n    fill: [\"red\", \"yellow\", \"blue\"],\n    scale: {\n      1: \"rand(1, 10)\"\n    }\n  },\n  isShowEnd: false\n});\n\nvar burstE = new mojs.Burst({\n  count: 6,\n  radius: {\n    0: 100\n  },\n  children: {\n    shape: \"circle\",\n    fill: [\"red\", \"yellow\", \"blue\"],\n    stroke: \"black\",\n    scale: {\n      1: \"rand(1, 10)\"\n    }\n  }\n}).then({\n  angle: {\n    0: 360\n  },\n  radius: {\n    100: 0\n  },\n  scale: {\n    1: 0\n  }\n});\n<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728\u7b2c\u4e00\u4e2a\u7a81\u53d1\u52a8\u753b\u4e2d\uff0c\u76f4\u63a5\u5e94\u7528\u4e8e Burst \u5bf9\u8c61\u7684 angle \u4f1a\u56f4\u7ed5\u7a81\u53d1\u5bf9\u8c61\u7684\u4e2d\u5fc3\u65cb\u8f6c\u6574\u4e2a\u7ec4\u3002\u7136\u800c\uff0c\u5728children\u5c5e\u6027\u4e2d\u5e94\u7528\u7684angle\u4f1a\u56f4\u7ed5\u5b83\u4eec\u81ea\u5df1\u7684\u4e2d\u5fc3\u65cb\u8f6c\u6240\u6709\u4e09\u89d2\u5f62\u3002\u6211\u4eec\u8fd8\u901a\u8fc7\u5c06\u6240\u6709\u5b50\u7ea7\u7684\u52a8\u753b\u6301\u7eed\u65f6\u95f4\u66f4\u6539\u4e3a 4000 \u6beb\u79d2\u6765\u51cf\u6162\u7a81\u53d1\u52a8\u753b\u7684\u901f\u5ea6\u3002<\/p>\n<p>\u5728\u7b2c\u4e8c\u4e2a\u8fde\u62cd\u52a8\u753b\u4e2d\uff0c\u6240\u6709\u4e09\u89d2\u5f62\u7684\u989c\u8272\u5747\u53d6\u81ea\u4f20\u9012\u7ed9 fill \u5c5e\u6027\u7684\u6570\u7ec4\u3002\u6211\u4eec\u53ea\u6307\u5b9a\u4e86\u4e09\u79cd\u586b\u5145\u989c\u8272\uff0c\u4f46\u4e09\u89d2\u5f62\u7684\u603b\u6570\u4e3a 20\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cmojs \u4f1a\u4e0d\u65ad\u5faa\u73af\u6570\u7ec4\u5143\u7d20\uff0c\u5e76\u4e00\u6b21\u53c8\u4e00\u6b21\u5730\u7528\u76f8\u540c\u7684\u4e09\u79cd\u989c\u8272\u586b\u5145\u4e09\u89d2\u5f62\u3002<\/p>\n<p>\u5728\u7b2c\u56db\u4e2a\u52a8\u753b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5728\u4e0a\u4e00\u4e2a\u6559\u7a0b\u4e2d\u4e86\u89e3\u7684 rand \u5b57\u7b26\u4e32\u6765\u4e3a\u6240\u6709\u5b50\u7c92\u5b50\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u6bd4\u4f8b\u503c\u3002\u6211\u4eec\u8fd8\u5c06 isShowEnd \u5c5e\u6027\u7684\u503c\u8bbe\u7f6e\u4e3a false \u4ee5\u9690\u85cf\u52a8\u753b\u7ed3\u675f\u65f6\u7684\u7c92\u5b50\u3002<\/p>\n<p>\u5728\u7b2c\u4e94\u4e2a\u52a8\u753b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 Shape \u6a21\u5757\u6559\u7a0b\u4e2d\u7684 then() \u65b9\u6cd5\u5728\u7b2c\u4e00\u4e2a\u52a8\u753b\u5e8f\u5217\u5b8c\u6210\u540e\u64ad\u653e\u53e6\u4e00\u4e2a\u52a8\u753b\u5e8f\u5217\u3002<\/p>\n<\/p>\n<h2>\u6700\u7ec8\u60f3\u6cd5<\/h2>\n<p>\u672c\u7cfb\u5217\u7684\u76ee\u7684\u662f\u8ba9\u60a8\u719f\u6089 mojs \u52a8\u753b\u5e93\u7684\u57fa\u7840\u77e5\u8bc6\u3002\u6bcf\u4e2a\u6559\u7a0b\u90fd\u4fa7\u91cd\u4e8e\u5355\u4e2a\u6a21\u5757\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u8be5\u6a21\u5757\u4e2d\u7684\u5c5e\u6027\u6765\u521b\u5efa\u57fa\u672c\u52a8\u753b\u3002 <\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u6559\u7a0b\u4f7f\u7528\u4e86\u4e4b\u524d\u6559\u7a0b\u4e2d\u7684\u6982\u5ff5\u6765\u521b\u5efa\u7a0d\u5fae\u590d\u6742\u7684\u52a8\u753b\u3002 Mojs \u662f\u4e00\u4e2a\u975e\u5e38\u5f3a\u5927\u7684\u52a8\u753b\u5e93\uff0c\u60a8\u83b7\u5f97\u7684\u6700\u7ec8\u7ed3\u679c\u53d6\u51b3\u4e8e\u60a8\u5bf9\u6240\u6709\u5c5e\u6027\u7684\u521b\u610f\u7a0b\u5ea6\uff0c\u56e0\u6b64\u8bf7\u4e0d\u65ad\u5c1d\u8bd5\u3002<\/p>\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u6211\u5728\u672c\u6559\u7a0b\u4e2d\u6f84\u6e05\u4efb\u4f55\u5185\u5bb9\uff0c\u8bf7\u5728\u8bc4\u8bba\u4e2d\u544a\u8bc9\u6211\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5feb\u901f\u5165\u95e8Mojs\u52a8\u753b\u5e93\uff1a\u7206\u70b8\u6a21\u5757\u6307\u5357\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u4eec\u901a\u8fc7\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 mojs \u4e3a HTML \u5143\u7d20\u6dfb\u52a0\u52a8\u753b\u6765\u5f00\u59cb\u672c\u7cfb\u5217\u3002\u5728\u7b2c\u4e8c\u4e2a\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u7ee7\u7eed\u4f7f\u7528 Shape \u6a21\u5757\u5236\u4f5c\u5185\u7f6e SVG \u5f62\u72b6\u7684\u52a8\u753b\u3002\u7b2c\u4e09\u4e2a\u6559\u7a0b\u4ecb\u7ecd\u4e86\u4f7f\u7528 ShapeSwirl \u548c stagger \u6a21\u5757\u5bf9 SVG \u5f62\u72b6\u8fdb\u884c\u52a8\u753b\u5904\u7406\u7684\u66f4\u591a\u65b9\u6cd5\u3002 \u73b0\u5728\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u4f7f\u7528 Burst \u6a21\u5757\u4ee5\u7a81\u53d1\u5f62\u5f0f\u5236\u4f5c\u4e0d\u540c SVG \u5f62\u72b6\u7684\u52a8\u753b\u3002\u672c\u6559\u7a0b\u5c06\u53d6\u51b3\u4e8e\u6211\u4eec\u5728\u524d\u4e09\u4e2a\u6559\u7a0b\u4e2d\u4ecb\u7ecd\u7684\u6982\u5ff5\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709\u9605\u8bfb\u8fc7\u5b83\u4eec\uff0c\u6211\u5efa\u8bae\u60a8\u5148\u9605\u8bfb\u5b83\u4eec\u3002 \u521b\u5efa\u57fa\u672c\u8fde\u62cd\u52a8\u753b \u5728\u521b\u5efa\u4efb\u4f55\u7a81\u53d1\u52a8\u753b\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u505a\u7684\u7b2c\u4e00\u4ef6\u4e8b\u662f\u5b9e\u4f8b\u5316 Burst \u5bf9\u8c61\u3002\u4e4b\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u6307\u5b9a\u4e0d\u540c\u5c5e\u6027\u7684\u503c\u6765\u63a7\u5236\u52a8\u753b\u7684\u64ad\u653e\u65b9\u5f0f\u3002 Burst \u6a21\u5757\u4e2d\u7684\u8bb8\u591a\u5c5e\u6027\u540d\u79f0\u4e0e Shape \u6a21\u5757\u4e2d\u7684\u5c5e\u6027\u540d\u79f0\u76f8\u540c\u3002\u7136\u800c\uff0c\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u8fd9\u4e9b\u5c5e\u6027\u6267\u884c\u975e\u5e38\u4e0d\u540c\u7684\u4efb\u52a1\u3002 left \u548c right \u5c5e\u6027\u51b3\u5b9a\u7a81\u53d1\u7684\u521d\u59cb\u4f4d\u7f6e\uff0c\u800c\u4e0d\u662f\u7a81\u53d1\u5185\u90e8\u7684\u7c92\u5b50\u3002\u540c\u6837\uff0cx \u548c y \u5c5e\u6027\u51b3\u5b9a\u6574\u4e2a\u7a81\u53d1\u7684\u79fb\u52a8\u800c\u4e0d\u662f\u5355\u4e2a\u7c92\u5b50\u7684\u79fb\u52a8\u3002 \u6240\u6709\u7206\u53d1\u7c92\u5b50\u5f62\u6210\u7684\u5706\u7684\u534a\u5f84\u7531 radius \u5c5e\u6027\u63a7\u5236\u3002\u8fd9\u4e0e\u5355\u4e2a\u5f62\u72b6\u7684 radius \u5c5e\u6027\u975e\u5e38\u4e0d\u540c\uff0c\u540e\u8005\u51b3\u5b9a\u4e86\u8fd9\u4e9b\u5f62\u72b6\u7684\u5927\u5c0f\u3002\u5728\u7206\u53d1\u7684\u60c5\u51b5\u4e0b\uff0c\u534a\u5f84\u51b3\u5b9a\u4e86\u5176\u4e2d\u5404\u4e2a\u5f62\u72b6\u7684\u8ddd\u79bb\u3002 \u53ef\u4ee5\u4f7f\u7528 count \u5c5e\u6027\u6307\u5b9a\u5355\u6b21\u7a81\u53d1\u4e2d\u7684\u5f62\u72b6\u6216\u7c92\u5b50\u6570\u91cf\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u60a8\u521b\u5efa\u7684\u6bcf\u4e2a\u7a81\u53d1\u4e2d\u5c06\u6709\u4e94\u4e2a\u7c92\u5b50\u3002\u6240\u6709\u8fd9\u4e9b\u7c92\u5b50\u5747\u5300\u5206\u5e03\u5728\u7206\u53d1\u7684\u5706\u5468\u4e0a\u3002\u4f8b\u5982\uff0c\u5982\u679c\u6709\u56db\u4e2a\u7c92\u5b50\uff0c\u5b83\u4eec\u5c06\u5f7c\u6b64\u6210 90 \u5ea6\u653e\u7f6e\u3002\u5982\u679c\u6709\u4e09\u4e2a\u7c92\u5b50\uff0c\u5b83\u4eec\u5c06\u88ab\u653e\u7f6e\u5728 120 \u5ea6\u5904\u3002 \u5982\u679c\u60a8\u4e0d\u5e0c\u671b\u7206\u53d1\u7c92\u5b50\u8986\u76d6\u6574\u4e2a 360 \u5ea6\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 Degree&nbsp;\u5c5e\u6027\u6307\u5b9a\u5e94\u8986\u76d6\u7684\u90e8\u5206\u3002\u4efb\u4f55\u5927\u4e8e 0 \u7684\u503c\u5bf9\u6b64\u5c5e\u6027\u90fd\u6709\u6548\u3002\u6307\u5b9a\u7684\u5ea6\u6570\u5c06\u5747\u5300\u5206\u5e03\u5728\u6240\u6709\u7c92\u5b50\u4e4b\u95f4\u3002\u5982\u679c\u5ea6\u6570\u8d85\u8fc7 360\uff0c\u5f62\u72b6\u53ef\u80fd\u4f1a\u91cd\u53e0\u3002 \u4f7f\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-32530","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=32530"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/32530\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=32530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=32530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=32530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}