{"id":6468,"date":"2025-08-01T14:32:20","date_gmt":"2025-08-01T06:32:20","guid":{"rendered":"https:\/\/www.hightopo.com\/blog\/?p=6468"},"modified":"2025-08-01T14:57:32","modified_gmt":"2025-08-01T06:57:32","slug":"3d-%e7%ae%a1%e9%81%93%e6%98%af%e5%a6%82%e4%bd%95%e6%b5%81%e5%8a%a8%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.hightopo.com\/blog\/6468.html","title":{"rendered":"3D\u00a0\u7ba1\u9053\u662f\u5982\u4f55\u6d41\u52a8\u7684\uff1f"},"content":{"rendered":"\n<p>\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\uff0c\u7ba1\u9053\u662f\u4e00\u79cd\u6781\u4e3a\u5e38\u89c1\u4e14\u91cd\u8981\u7684\u5143\u7d20\u3002\u5b83\u4e0d\u4ec5\u80fd\u7528\u4e8e\u5448\u73b0\u5de5\u5382\u3001\u53d1\u7535\u7ad9\u3001\u5730\u4e0b\u8bbe\u65bd\u7b49\u5de5\u4e1a\u73af\u5883\u4e2d\u7684\u8f93\u9001\u7cfb\u7edf\uff0c\u8fd8\u53ef\u7528\u6765\u6a21\u62df\u6570\u636e\u7684\u6d41\u52a8\u6216\u5904\u7406\u8fc7\u7a0b\uff0c\u4ece\u800c\u5411\u7528\u6237\u76f4\u89c2\u5c55\u793a\u6570\u636e\u7684\u6d41\u5411\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png\" alt=\"\" class=\"wp-image-6470\" width=\"512\" height=\"513\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png 1000w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-300x300.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-150x150.png 150w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-768x770.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-660x662.png 660w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n\n\n\n<p>\u5728&nbsp;HT&nbsp;\u4e2d\uff0cht.Polyline&nbsp;\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\u8868\u793a\u7ba1\u9053\u3002\u5b83\u4e0d\u4ec5\u652f\u6301\u8d34\u56fe\uff0c\u8fd8\u80fd\u901a\u8fc7\u8c03\u6574\u8d34\u56fe\u7684&nbsp;UV&nbsp;\u504f\u79fb\u7b49\u5c5e\u6027\uff0c\u751f\u52a8\u5730\u5c55\u793a\u6570\u636e\u6d41\u7684\u65b9\u5411\u3002ht.Polyline&nbsp;\u4e0d\u4ec5\u9650\u4e8e\u7b80\u5355\u7684\u7ba1\u9053\u8868\u73b0\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5b83\u5b9e\u73b0\u5982\u6d41\u52a8\u3001\u6f2b\u6e38\u7b49\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<h1>\u5b9e\u73b0\u6b65\u9aa4<\/h1>\n\n\n\n<h2>\u7ba1\u9053\u6d41\u52a8<\/h2>\n\n\n\n<p>\u52a8\u753b\u7684\u6838\u5fc3\u5728\u4e8e\u63a7\u5236\u8282\u70b9\u5c5e\u6027\u7684\u53d8\u5316\uff0c\u800c\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u5219\u662f\u901a\u8fc7\u5728\u52a8\u753b\u8fc7\u7a0b\u4e2d\u8c03\u8282\u8d34\u56fe\u7684&nbsp;UV&nbsp;\u504f\u79fb\u5c5e\u6027\u6765\u5b9e\u73b0\u7684\u3002\u56e0\u6b64\uff0c\u8fd9\u79cd\u52a8\u753b\u5f62\u5f0f\u4e5f\u88ab\u79f0\u4e4b\u4e3a&nbsp;UV&nbsp;\u504f\u79fb\u52a8\u753b\u3002\u901a\u8fc7\u4e0d\u65ad\u66f4\u65b0&nbsp;UV&nbsp;\u504f\u79fb\u5c5e\u6027\uff0c\u4f7f\u5f97\u8d34\u56fe\u5728\u8282\u70b9\u8868\u9762\u4ea7\u751f\u6d41\u52a8\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u7ba1\u9053\u4e2d\u63a7\u5236\u8d34\u56fe\u504f\u79fb\u7684\u5c5e\u6027\u662f&nbsp;shape3d.uv.offset\uff0c\u5728\u4ee3\u7801\u4e2d\u4e0d\u65ad\u9012\u589e\/\u9012\u51cf\u8fd9\u4e2a\u5c5e\u6027\u503c\u5c31\u53ef\u5b9e\u73b0\u6d41\u52a8\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>var&nbsp;config = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;1000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; polyline.s('shape3d.uv.offset', &#91;v,&nbsp;0]);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; ht.Default.startAnim(config);\n&nbsp; &nbsp; }\n}\nht.Default.startAnim(config);<\/code><\/pre>\n\n\n\n<p>\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u6700\u7ec8\u5448\u73b0\u7684\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90531.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90531.gif\" alt=\"\" class=\"wp-image-6471\" width=\"534\" height=\"309\"\/><\/a><\/figure>\n\n\n\n<p>\u7ba1\u9053\u7684&nbsp;UV&nbsp;\u504f\u79fb\u52a8\u753b\u662f\u4e00\u79cd\u5e38\u7528\u4e8e\u8868\u73b0\u7269\u8d28\u6d41\u52a8\u65b9\u5411\u7684\u6280\u672f\uff0c\u56fe\u793a\u6848\u4f8b\u4fbf\u662f\u5178\u578b\u793a\u4f8b\uff0c\u5b83\u6781\u5177\u8868\u73b0\u529b\u5730\u5448\u73b0\u51fa\u4e86\u6d41\u52a8\u6548\u679c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90532-2.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90532-2.gif\" alt=\"\" class=\"wp-image-6478\" width=\"554\" height=\"320\"\/><\/a><\/figure>\n\n\n\n<p><strong>\u9c7c\u9053\u6548\u679c<\/strong><\/p>\n\n\n\n<p>\u5f00\u53d1\u8005\u53ef\u4ee5\u501f\u6b64\u53d1\u6325\u521b\u9020\u529b\uff0c\u5229\u7528\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u5b9e\u73b0\u66f4\u591a\u521b\u65b0\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u4f7f\u7528\u7ba1\u9053\u6d41\u52a8\u6765\u6a21\u62df\u9c7c\u9053\u6548\u679c\u3002\u901a\u8fc7\u7ed8\u5236\u591a\u6761\u9c7c\u7684\u6e38\u52a8\u8def\u5f84\uff0c\u5e76\u5728\u7ba1\u9053\u4e0a\u5e94\u7528\u9c7c\u7684\u8d34\u56fe\uff0c\u7136\u540e\u901a\u8fc7\u52a8\u753b\u5c55\u73b0\u51fa\u9c7c\u513f\u5728\u6c34\u4e2d\u6e38\u52a8\u7684\u903c\u771f\u573a\u666f\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u751f\u52a8\u5f62\u8c61\uff0c\u8fd8\u4e3a\u89c6\u89c9\u5448\u73b0\u589e\u6dfb\u4e86\u52a8\u6001\u8da3\u5473\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90533-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90533-1.gif\" alt=\"\" class=\"wp-image-6479\" width=\"566\" height=\"327\"\/><\/a><\/figure>\n\n\n\n<p><strong>UV&nbsp;\u88c1\u5207<\/strong><\/p>\n\n\n\n<p>\u7ba1\u9053\u4e0d\u4ec5\u53ef\u4ee5\u901a\u8fc7\u8d34\u56fe\u5b9e\u73b0\u6d41\u52a8\u52a8\u753b\u6548\u679c\uff0c\u8fd8\u80fd\u7ed3\u5408\u88c1\u5207\u5c5e\u6027\u6253\u9020\u66f4\u591a\u4e30\u5bcc\u591a\u6837\u7684\u89c6\u89c9\u6548\u679c\u3002\u4f8b\u5982\u7ba1\u9053\u7684\u751f\u957f\u52a8\u753b\u3001\u7ba1\u9053\u663e\u793a\u8fc7\u6e21\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u7ba1\u9053\u88c1\u5207\u4e3b\u8981\u5305\u62ec\u4e24\u4e2a\u5c5e\u6027\uff1a<\/p>\n\n\n\n<ul><li>\u88c1\u5207\u65b9\u5411\uff1a3d.clip.direction<\/li><li>\u88c1\u5207\u6bd4\u4f8b\uff1a3d.clip.percentage<\/li><\/ul>\n\n\n\n<p>\u4ece\u88c1\u5207\u65b9\u5411\u5c5e\u6027\u4e0a\u53ef\u5c06\u88c1\u5207\u5206\u4e3a\u666e\u901a\u88c1\u5207\u548c\u7279\u6b8a\u88c1\u5207\u3002<\/p>\n\n\n\n<p>\u666e\u901a\u88c1\u5207\u65f6\uff0c\u53ef\u4ece\u516d\u4e2a\u65b9\u5411\u5bf9\u7ba1\u9053\u8fdb\u884c\u88c1\u5207\uff1a<\/p>\n\n\n\n<ul><li>\u4ece\u53f3\u5230\u5de6\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;left<\/li><li>\u4ece\u5de6\u5230\u53f3\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;right<\/li><li>\u4ece\u4e0a\u5230\u4e0b\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;top<\/li><li>\u4ece\u4e0b\u5230\u4e0a\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;bottom<\/li><li>\u4ece\u524d\u5230\u540e\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;back<\/li><li>\u4ece\u540e\u5230\u524d\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;front<\/li><\/ul>\n\n\n\n<p>\u9664\u4ee5\u4e0a\u63d0\u5230\u7684\u516d\u79cd\u5e38\u89c4\u7684\u88c1\u5207\u65b9\u5411\uff0c\u4e3a\u4e86\u4f7f\u5f97\u7ba1\u9053\u6cbf\u7740 UV \u7684\u65b9\u5411\u88c1\u5207\uff0cHT&nbsp;\u8fd8\u63d0\u4f9b\u4e86&nbsp;uv.right&nbsp;\u6216\u8005&nbsp;uv.left&nbsp;\u7684\u88c1\u5207\u65b9\u5411\u3002\u4f7f\u7528\u8fd9\u4e24\u79cd\u88c1\u5207\u65b9\u5411\uff0c\u573a\u666f\u9700\u8981\u786e\u4fdd\u5f00\u542f UV \u88c1\u5207\u4f7f\u80fd\uff1ag3d.setUvClipEnabled(true)\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u7684\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>g3d.setUvClipEnabled(true);&nbsp;\/\/ \u5f00\u542f UV \u88c1\u5207\u4f7f\u80fd\npolyline.s('3d.clip.direction',&nbsp;'uv.right')&nbsp;\/\/ \u8bbe\u7f6e\u7ba1\u9053\u88c1\u5207\u65b9\u5411\u5c5e\u6027\n\n\nht.Default.startAnim({\n&nbsp; &nbsp;&nbsp;duration:&nbsp;1000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; polyline.s('3d.clip.percentage', v);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{}\n});<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90535-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90535-1.gif\" alt=\"\" class=\"wp-image-6480\" width=\"540\" height=\"274\"\/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90534-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90534-1.gif\" alt=\"\" class=\"wp-image-6481\" width=\"545\" height=\"277\"\/><\/a><\/figure>\n\n\n\n<h2>\u7ba1\u9053\u6f2b\u6e38<\/h2>\n\n\n\n<p>HT&nbsp;\u63d0\u4f9b\u4e86\u53ef\u83b7\u53d6\u7ba1\u9053\u957f\u5ea6&nbsp;g3d.getLineLength()\u3001\u6839\u636e\u767e\u5206\u6bd4\u83b7\u53d6\u7ba1\u9053\u4f4d\u7f6e&nbsp;g3d.getLineOffset()&nbsp;\u7684&nbsp;API \u3002\u501f\u52a9\u8fd9\u4e24\u4e2a&nbsp;API\uff0c\u80fd\u591f\u5b9e\u73b0\u6f2b\u6e38\u52a8\u753b\u7b49\u6548\u679c\u3002<\/p>\n\n\n\n<p><strong>\u573a\u666f\u6f2b\u6e38<\/strong><\/p>\n\n\n\n<p>\u5728&nbsp;HT&nbsp;\u5728\u4e2d\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7&nbsp;eye \u548c center&nbsp;\u5c5e\u6027\u6765\u63a7\u5236\u89c6\u89d2\u3002\u90a3\u4e48\u6f2b\u6e38\u5c31\u662f\u901a\u8fc7\u4e0d\u65ad\u8c03\u6574&nbsp;eye \u548c center&nbsp;\u5b9e\u73b0\u3002\u7531\u6b64\u53ef\u89c1\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5229\u7528\u4e0a\u8ff0\u63d0\u5230\u7684&nbsp;API&nbsp;\u6765\u4f7f\u5f97\u573a\u666f\u89c6\u89d2\u7684\u6cbf\u7740\u7ba1\u9053\u4e0d\u65ad\u53d8\u5316\u7684\u6548\u679c\u3002\u4e5f\u5c31\u662f\u573a\u666f\u6f2b\u6e38\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u5b9e\u73b0\u7684\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const&nbsp;length = g3d.getLineLength(polyline);\nconst&nbsp;roamConfig = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;20e3,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;offset = g3d.getLineOffset(polyline, length * v),\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point = offset.point,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px = point.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py = point.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pz = point.z,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tangent = offset.tangent,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx = tangent.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ty = tangent.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tz = tangent.z;\n&nbsp; &nbsp; &nbsp; &nbsp; g3d.setEye(&#91;px, py, pz]);\n&nbsp; &nbsp; &nbsp; &nbsp; g3d.setCenter(&#91;px + tx, py + ty, pz + tz]);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{}\n};\nroamAnim = ht.Default.startAnim(roamConfig);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e381-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e381-1.gif\" alt=\"\" class=\"wp-image-6482\" width=\"527\" height=\"305\"\/><\/a><\/figure>\n\n\n\n<p><strong>\u6a21\u578b\u6f2b\u6e38\u52a8\u753b<\/strong><\/p>\n\n\n\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u793a\u4f8b\uff0c\u6211\u4eec\u4e86\u89e3\u5230\uff0c\u53ef\u4ee5\u4f7f\u7528&nbsp;g3d.getLineOffset()&nbsp;\u83b7\u53d6\u7ba1\u9053\u4e0a\u6307\u5b9a\u767e\u5206\u6bd4\u7684\u4f4d\u7f6e\u3002\u5982\u679c\u5c06\u8fd9\u4e00\u529f\u80fd\u7528\u4e8e\u6a21\u578b\u7684\u5750\u6807\u53d8\u5316\uff0c\u90a3\u4e48\u5c31\u80fd\u5b9e\u73b0\u6a21\u578b\u6cbf\u7740\u9884\u8bbe\u7684\u7ba1\u9053\u8def\u5f84\u8fdb\u884c\u4f4d\u79fb\u7684\u52a8\u753b\u6548\u679c\u3002\u4e5f\u5c31\u662f\u6a21\u578b\u6f2b\u6e38\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const&nbsp;params = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;60000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;function&nbsp;(t) {\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;t;\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;action:&nbsp;function&nbsp;(v, t) {\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;lineLength = g3d.getLineLength(polyline);\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;offset = g3d.getLineOffset(polyline, lineLength * v),\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point = offset.point,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px = point.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py = point.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pz = point.z,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tangent = offset.tangent,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx = tangent.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ty = tangent.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tz = tangent.z;\n&nbsp; &nbsp; &nbsp; &nbsp; plane.p3(px, py, pz);\n&nbsp; &nbsp; &nbsp; &nbsp; plane.lookAt(&#91;px + tx, py + ty, pz + tz],&nbsp;'front');\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;function&nbsp;() {}\n};\nanimation = ht.Default.startAnim(params);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e382.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e382.gif\" alt=\"\" class=\"wp-image-6483\" width=\"566\" height=\"288\"\/><\/a><\/figure>\n\n\n\n<h1>\u603b\u7ed3<\/h1>\n\n\n\n<p>\u5728&nbsp;HT&nbsp;\u4e2d\uff0c\u7ba1\u9053\u4f5c\u4e3a\u4e00\u79cd\u91cd\u8981\u7684\u5de5\u5177\uff0c\u4e0d\u4ec5\u7528\u4e8e\u6a21\u578b\u7684\u9759\u6001\u5c55\u793a\uff0c\u5728\u52a8\u6001\u8868\u73b0\u4e0a\u4e5f\u540c\u6837\u53d1\u6325\u7740\u5173\u952e\u4f5c\u7528\u3002\u5728\u5de5\u4e1a\u9886\u57df\uff0c\u5b83\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5c55\u793a\u590d\u6742\u7684\u7ba1\u7ebf\u5e03\u63a7\u548c\u8f93\u9001\u7cfb\u7edf\uff1b\u540c\u65f6\uff0c\u5f00\u53d1\u8005\u4e5f\u80fd\u5145\u5206\u53d1\u6325\u521b\u610f\uff0c\u501f\u52a9\u7ba1\u9053\u5b9e\u73b0\u4e30\u5bcc\u591a\u6837\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u5728\u7ba1\u9053\u7684\u4f7f\u7528\u6216\u521b\u610f\u5b9e\u73b0\u4e0a\u6709\u66f4\u591a\u60f3\u6cd5\uff0c\u6216\u662f\u9047\u5230\u4e86\u76f8\u5173\u95ee\u9898\uff0c\u6b22\u8fce\u968f\u65f6\u4e0e\u6211\u4eec\u4ea4\u6d41\u63a2\u8ba8\uff0c\u671f\u5f85\u80fd\u4e0e\u60a8\u4e00\u540c\u6316\u6398\u7ba1\u9053\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\u7684\u66f4\u591a\u53ef\u80fd\u6027\uff1a<a href=\"https:\/\/www.hightopo.com\/cn-index.html\">\u56fe\u6251\u8f6f\u4ef6 &#8211; \u6784\u5efa\u5148\u8fdb 2D \u548c 3D \u53ef\u89c6\u5316\u6240\u9700\u8981\u7684\u4e00\u5207<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><!-- wp:paragraph --><\/p>\n<p>\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\uff0c\u7ba1\u9053\u662f\u4e00\u79cd\u6781\u4e3a\u5e38\u89c1\u4e14\u91cd\u8981\u7684\u5143\u7d20\u3002\u5b83\u4e0d\u4ec5\u80fd\u7528\u4e8e\u5448\u73b0\u5de5\u5382\u3001\u53d1\u7535\u7ad9\u3001\u5730\u4e0b\u8bbe\u65bd\u7b49\u5de5\u4e1a\u73af\u5883\u4e2d\u7684\u8f93\u9001\u7cfb\u7edf\uff0c\u8fd8\u53ef\u7528\u6765\u6a21\u62df\u6570\u636e\u7684\u6d41\u52a8\u6216\u5904\u7406\u8fc7\u7a0b\uff0c\u4ece\u800c\u5411\u7528\u6237\u76f4\u89c2\u5c55\u793a\u6570\u636e\u7684\u6d41\u5411\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":6470,\"width\":512,\"height\":513,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png\" alt=\"\" class=\"wp-image-6470\" width=\"512\" height=\"513\" srcset=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c.png 1000w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-300x300.png 300w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-150x150.png 150w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-768x770.png 768w, https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/3d-\u6280\u672f\u7ba1\u9053\u9996\u56fe_\u526f\u672c-660x662.png 660w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728&nbsp;HT&nbsp;\u4e2d\uff0cht.Polyline&nbsp;\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\u8868\u793a\u7ba1\u9053\u3002\u5b83\u4e0d\u4ec5\u652f\u6301\u8d34\u56fe\uff0c\u8fd8\u80fd\u901a\u8fc7\u8c03\u6574\u8d34\u56fe\u7684&nbsp;UV&nbsp;\u504f\u79fb\u7b49\u5c5e\u6027\uff0c\u751f\u52a8\u5730\u5c55\u793a\u6570\u636e\u6d41\u7684\u65b9\u5411\u3002ht.Polyline&nbsp;\u4e0d\u4ec5\u9650\u4e8e\u7b80\u5355\u7684\u7ba1\u9053\u8868\u73b0\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u5b83\u5b9e\u73b0\u5982\u6d41\u52a8\u3001\u6f2b\u6e38\u7b49\u7684\u529f\u80fd\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:heading {\"level\":1} --><\/p>\n<h1>\u5b9e\u73b0\u6b65\u9aa4<\/h1>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2>\u7ba1\u9053\u6d41\u52a8<\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u52a8\u753b\u7684\u6838\u5fc3\u5728\u4e8e\u63a7\u5236\u8282\u70b9\u5c5e\u6027\u7684\u53d8\u5316\uff0c\u800c\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u5219\u662f\u901a\u8fc7\u5728\u52a8\u753b\u8fc7\u7a0b\u4e2d\u8c03\u8282\u8d34\u56fe\u7684&nbsp;UV&nbsp;\u504f\u79fb\u5c5e\u6027\u6765\u5b9e\u73b0\u7684\u3002\u56e0\u6b64\uff0c\u8fd9\u79cd\u52a8\u753b\u5f62\u5f0f\u4e5f\u88ab\u79f0\u4e4b\u4e3a&nbsp;UV&nbsp;\u504f\u79fb\u52a8\u753b\u3002\u901a\u8fc7\u4e0d\u65ad\u66f4\u65b0&nbsp;UV&nbsp;\u504f\u79fb\u5c5e\u6027\uff0c\u4f7f\u5f97\u8d34\u56fe\u5728\u8282\u70b9\u8868\u9762\u4ea7\u751f\u6d41\u52a8\u7684\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ba1\u9053\u4e2d\u63a7\u5236\u8d34\u56fe\u504f\u79fb\u7684\u5c5e\u6027\u662f&nbsp;shape3d.uv.offset\uff0c\u5728\u4ee3\u7801\u4e2d\u4e0d\u65ad\u9012\u589e\/\u9012\u51cf\u8fd9\u4e2a\u5c5e\u6027\u503c\u5c31\u53ef\u5b9e\u73b0\u6d41\u52a8\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5177\u4f53\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>var&nbsp;config = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;1000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; polyline.s('shape3d.uv.offset', &#91;v,&nbsp;0]);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; ht.Default.startAnim(config);\n&nbsp; &nbsp; }\n}\nht.Default.startAnim(config);<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u6700\u7ec8\u5448\u73b0\u7684\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":6471,\"width\":534,\"height\":309,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90531.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90531.gif\" alt=\"\" class=\"wp-image-6471\" width=\"534\" height=\"309\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ba1\u9053\u7684&nbsp;UV&nbsp;\u504f\u79fb\u52a8\u753b\u662f\u4e00\u79cd\u5e38\u7528\u4e8e\u8868\u73b0\u7269\u8d28\u6d41\u52a8\u65b9\u5411\u7684\u6280\u672f\uff0c\u56fe\u793a\u6848\u4f8b\u4fbf\u662f\u5178\u578b\u793a\u4f8b\uff0c\u5b83\u6781\u5177\u8868\u73b0\u529b\u5730\u5448\u73b0\u51fa\u4e86\u6d41\u52a8\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":6478,\"width\":554,\"height\":320,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90532-2.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90532-2.gif\" alt=\"\" class=\"wp-image-6478\" width=\"554\" height=\"320\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u9c7c\u9053\u6548\u679c<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5f00\u53d1\u8005\u53ef\u4ee5\u501f\u6b64\u53d1\u6325\u521b\u9020\u529b\uff0c\u5229\u7528\u7ba1\u9053\u6d41\u52a8\u52a8\u753b\u5b9e\u73b0\u66f4\u591a\u521b\u65b0\u7684\u89c6\u89c9\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4f8b\u5982\uff0c\u4f7f\u7528\u7ba1\u9053\u6d41\u52a8\u6765\u6a21\u62df\u9c7c\u9053\u6548\u679c\u3002\u901a\u8fc7\u7ed8\u5236\u591a\u6761\u9c7c\u7684\u6e38\u52a8\u8def\u5f84\uff0c\u5e76\u5728\u7ba1\u9053\u4e0a\u5e94\u7528\u9c7c\u7684\u8d34\u56fe\uff0c\u7136\u540e\u901a\u8fc7\u52a8\u753b\u5c55\u73b0\u51fa\u9c7c\u513f\u5728\u6c34\u4e2d\u6e38\u52a8\u7684\u903c\u771f\u573a\u666f\u3002\u8fd9\u4e2a\u65b9\u6cd5\u4e0d\u4ec5\u751f\u52a8\u5f62\u8c61\uff0c\u8fd8\u4e3a\u89c6\u89c9\u5448\u73b0\u589e\u6dfb\u4e86\u52a8\u6001\u8da3\u5473\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:image {\"id\":6479,\"width\":566,\"height\":327,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90533-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90533-1.gif\" alt=\"\" class=\"wp-image-6479\" width=\"566\" height=\"327\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>UV&nbsp;\u88c1\u5207<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ba1\u9053\u4e0d\u4ec5\u53ef\u4ee5\u901a\u8fc7\u8d34\u56fe\u5b9e\u73b0\u6d41\u52a8\u52a8\u753b\u6548\u679c\uff0c\u8fd8\u80fd\u7ed3\u5408\u88c1\u5207\u5c5e\u6027\u6253\u9020\u66f4\u591a\u4e30\u5bcc\u591a\u6837\u7684\u89c6\u89c9\u6548\u679c\u3002\u4f8b\u5982\u7ba1\u9053\u7684\u751f\u957f\u52a8\u753b\u3001\u7ba1\u9053\u663e\u793a\u8fc7\u6e21\u7684\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u7ba1\u9053\u88c1\u5207\u4e3b\u8981\u5305\u62ec\u4e24\u4e2a\u5c5e\u6027\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li>\u88c1\u5207\u65b9\u5411\uff1a3d.clip.direction<\/li>\n<li>\u88c1\u5207\u6bd4\u4f8b\uff1a3d.clip.percentage<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u4ece\u88c1\u5207\u65b9\u5411\u5c5e\u6027\u4e0a\u53ef\u5c06\u88c1\u5207\u5206\u4e3a\u666e\u901a\u88c1\u5207\u548c\u7279\u6b8a\u88c1\u5207\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u666e\u901a\u88c1\u5207\u65f6\uff0c\u53ef\u4ece\u516d\u4e2a\u65b9\u5411\u5bf9\u7ba1\u9053\u8fdb\u884c\u88c1\u5207\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:list --><\/p>\n<ul>\n<li>\u4ece\u53f3\u5230\u5de6\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;left<\/li>\n<li>\u4ece\u5de6\u5230\u53f3\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;right<\/li>\n<li>\u4ece\u4e0a\u5230\u4e0b\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;top<\/li>\n<li>\u4ece\u4e0b\u5230\u4e0a\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;bottom<\/li>\n<li>\u4ece\u524d\u5230\u540e\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;back<\/li>\n<li>\u4ece\u540e\u5230\u524d\u88c1\u5207\uff1a\u8bbe\u7f6e\u5c5e\u6027\u503c\u4e3a&nbsp;front<\/li>\n<\/ul>\n<p><!-- \/wp:list --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u9664\u4ee5\u4e0a\u63d0\u5230\u7684\u516d\u79cd\u5e38\u89c4\u7684\u88c1\u5207\u65b9\u5411\uff0c\u4e3a\u4e86\u4f7f\u5f97\u7ba1\u9053\u6cbf\u7740 UV \u7684\u65b9\u5411\u88c1\u5207\uff0cHT&nbsp;\u8fd8\u63d0\u4f9b\u4e86&nbsp;uv.right&nbsp;\u6216\u8005&nbsp;uv.left&nbsp;\u7684\u88c1\u5207\u65b9\u5411\u3002\u4f7f\u7528\u8fd9\u4e24\u79cd\u88c1\u5207\u65b9\u5411\uff0c\u573a\u666f\u9700\u8981\u786e\u4fdd\u5f00\u542f UV \u88c1\u5207\u4f7f\u80fd\uff1ag3d.setUvClipEnabled(true)\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5177\u4f53\u7684\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>g3d.setUvClipEnabled(true);&nbsp;\/\/ \u5f00\u542f UV \u88c1\u5207\u4f7f\u80fd\npolyline.s('3d.clip.direction',&nbsp;'uv.right')&nbsp;\/\/ \u8bbe\u7f6e\u7ba1\u9053\u88c1\u5207\u65b9\u5411\u5c5e\u6027\n\n\nht.Default.startAnim({\n&nbsp; &nbsp;&nbsp;duration:&nbsp;1000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp; polyline.s('3d.clip.percentage', v);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{}\n});<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"id\":6480,\"width\":540,\"height\":274,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90535-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90535-1.gif\" alt=\"\" class=\"wp-image-6480\" width=\"540\" height=\"274\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:image {\"id\":6481,\"width\":545,\"height\":277,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90534-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u7ba1\u90534-1.gif\" alt=\"\" class=\"wp-image-6481\" width=\"545\" height=\"277\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading --><\/p>\n<h2>\u7ba1\u9053\u6f2b\u6e38<\/h2>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>HT&nbsp;\u63d0\u4f9b\u4e86\u53ef\u83b7\u53d6\u7ba1\u9053\u957f\u5ea6&nbsp;g3d.getLineLength()\u3001\u6839\u636e\u767e\u5206\u6bd4\u83b7\u53d6\u7ba1\u9053\u4f4d\u7f6e&nbsp;g3d.getLineOffset()&nbsp;\u7684&nbsp;API \u3002\u501f\u52a9\u8fd9\u4e24\u4e2a&nbsp;API\uff0c\u80fd\u591f\u5b9e\u73b0\u6f2b\u6e38\u52a8\u753b\u7b49\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u573a\u666f\u6f2b\u6e38<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728&nbsp;HT&nbsp;\u5728\u4e2d\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u901a\u8fc7&nbsp;eye \u548c center&nbsp;\u5c5e\u6027\u6765\u63a7\u5236\u89c6\u89d2\u3002\u90a3\u4e48\u6f2b\u6e38\u5c31\u662f\u901a\u8fc7\u4e0d\u65ad\u8c03\u6574&nbsp;eye \u548c center&nbsp;\u5b9e\u73b0\u3002\u7531\u6b64\u53ef\u89c1\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5229\u7528\u4e0a\u8ff0\u63d0\u5230\u7684&nbsp;API&nbsp;\u6765\u4f7f\u5f97\u573a\u666f\u89c6\u89d2\u7684\u6cbf\u7740\u7ba1\u9053\u4e0d\u65ad\u53d8\u5316\u7684\u6548\u679c\u3002\u4e5f\u5c31\u662f\u573a\u666f\u6f2b\u6e38\u7684\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5177\u4f53\u5b9e\u73b0\u7684\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>const&nbsp;length = g3d.getLineLength(polyline);\nconst&nbsp;roamConfig = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;20e3,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;t&nbsp;=&gt;&nbsp;t,\n&nbsp; &nbsp;&nbsp;action:&nbsp;(v, t) =&gt;&nbsp;{\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;offset = g3d.getLineOffset(polyline, length * v),\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point = offset.point,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px = point.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py = point.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pz = point.z,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tangent = offset.tangent,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx = tangent.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ty = tangent.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tz = tangent.z;\n&nbsp; &nbsp; &nbsp; &nbsp; g3d.setEye(&#91;px, py, pz]);\n&nbsp; &nbsp; &nbsp; &nbsp; g3d.setCenter(&#91;px + tx, py + ty, pz + tz]);\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;() =&gt;&nbsp;{}\n};\nroamAnim = ht.Default.startAnim(roamConfig);<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"id\":6482,\"width\":527,\"height\":305,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e381-1.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e381-1.gif\" alt=\"\" class=\"wp-image-6482\" width=\"527\" height=\"305\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p><strong>\u6a21\u578b\u6f2b\u6e38\u52a8\u753b<\/strong><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u901a\u8fc7\u4e0a\u9762\u7684\u793a\u4f8b\uff0c\u6211\u4eec\u4e86\u89e3\u5230\uff0c\u53ef\u4ee5\u4f7f\u7528&nbsp;g3d.getLineOffset()&nbsp;\u83b7\u53d6\u7ba1\u9053\u4e0a\u6307\u5b9a\u767e\u5206\u6bd4\u7684\u4f4d\u7f6e\u3002\u5982\u679c\u5c06\u8fd9\u4e00\u529f\u80fd\u7528\u4e8e\u6a21\u578b\u7684\u5750\u6807\u53d8\u5316\uff0c\u90a3\u4e48\u5c31\u80fd\u5b9e\u73b0\u6a21\u578b\u6cbf\u7740\u9884\u8bbe\u7684\u7ba1\u9053\u8def\u5f84\u8fdb\u884c\u4f4d\u79fb\u7684\u52a8\u753b\u6548\u679c\u3002\u4e5f\u5c31\u662f\u6a21\u578b\u6f2b\u6e38\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5177\u4f53\u5b9e\u73b0\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:code --><\/p>\n<pre class=\"wp-block-code\"><code>const&nbsp;params = {\n&nbsp; &nbsp;&nbsp;duration:&nbsp;60000,\n&nbsp; &nbsp;&nbsp;easing:&nbsp;function&nbsp;(t) {\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;return&nbsp;t;\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;action:&nbsp;function&nbsp;(v, t) {\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;lineLength = g3d.getLineLength(polyline);\n&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;const&nbsp;offset = g3d.getLineOffset(polyline, lineLength * v),\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point = offset.point,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; px = point.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; py = point.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; pz = point.z,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tangent = offset.tangent,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tx = tangent.x,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ty = tangent.y,\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tz = tangent.z;\n&nbsp; &nbsp; &nbsp; &nbsp; plane.p3(px, py, pz);\n&nbsp; &nbsp; &nbsp; &nbsp; plane.lookAt(&#91;px + tx, py + ty, pz + tz],&nbsp;'front');\n&nbsp; &nbsp; },\n&nbsp; &nbsp;&nbsp;finishFunc:&nbsp;function&nbsp;() {}\n};\nanimation = ht.Default.startAnim(params);<\/code><\/pre>\n<p><!-- \/wp:code --><\/p>\n<p><!-- wp:image {\"id\":6483,\"width\":566,\"height\":288,\"sizeSlug\":\"full\",\"linkDestination\":\"media\"} --><\/p>\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e382.gif\"><img loading=\"lazy\" src=\"https:\/\/www.hightopo.com\/blog\/wp-content\/uploads\/2025\/08\/\u6f2b\u6e382.gif\" alt=\"\" class=\"wp-image-6483\" width=\"566\" height=\"288\"\/><\/a><\/figure>\n<p><!-- \/wp:image --><\/p>\n<p><!-- wp:heading {\"level\":1} --><\/p>\n<h1>\u603b\u7ed3<\/h1>\n<p><!-- \/wp:heading --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5728&nbsp;HT&nbsp;\u4e2d\uff0c\u7ba1\u9053\u4f5c\u4e3a\u4e00\u79cd\u91cd\u8981\u7684\u5de5\u5177\uff0c\u4e0d\u4ec5\u7528\u4e8e\u6a21\u578b\u7684\u9759\u6001\u5c55\u793a\uff0c\u5728\u52a8\u6001\u8868\u73b0\u4e0a\u4e5f\u540c\u6837\u53d1\u6325\u7740\u5173\u952e\u4f5c\u7528\u3002\u5728\u5de5\u4e1a\u9886\u57df\uff0c\u5b83\u88ab\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5c55\u793a\u590d\u6742\u7684\u7ba1\u7ebf\u5e03\u63a7\u548c\u8f93\u9001\u7cfb\u7edf\uff1b\u540c\u65f6\uff0c\u5f00\u53d1\u8005\u4e5f\u80fd\u5145\u5206\u53d1\u6325\u521b\u610f\uff0c\u501f\u52a9\u7ba1\u9053\u5b9e\u73b0\u4e30\u5bcc\u591a\u6837\u7684\u52a8\u753b\u6548\u679c\u3002<\/p>\n<p><!-- \/wp:paragraph --><\/p>\n<p><!-- wp:paragraph --><\/p>\n<p>\u5982\u679c\u60a8\u5728\u7ba1\u9053\u7684\u4f7f\u7528\u6216\u521b\u610f\u5b9e\u73b0\u4e0a\u6709\u66f4\u591a\u60f3\u6cd5\uff0c\u6216\u662f\u9047\u5230\u4e86\u76f8\u5173\u95ee\u9898\uff0c\u6b22\u8fce\u968f\u65f6\u4e0e\u6211\u4eec\u4ea4\u6d41\u63a2\u8ba8\uff0c\u671f\u5f85\u80fd\u4e0e\u60a8\u4e00\u540c\u6316\u6398\u7ba1\u9053\u5728&nbsp;3D&nbsp;\u573a\u666f\u4e2d\u7684\u66f4\u591a\u53ef\u80fd\u6027\uff1a<a href=\"https:\/\/www.hightopo.com\/cn-index.html\">\u56fe\u6251\u8f6f\u4ef6 &#8211; \u6784\u5efa\u5148\u8fdb 2D \u548c 3D \u53ef\u89c6\u5316\u6240\u9700\u8981\u7684\u4e00\u5207<\/a><\/p>\n<p><!-- \/wp:paragraph --><\/p>\n","protected":false},"author":2,"featured_media":6484,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[3,795,7,9,277,796,20,40,17,59,25,39,27,797,798],"_links":{"self":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/6468"}],"collection":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/comments?post=6468"}],"version-history":[{"count":2,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/6468\/revisions"}],"predecessor-version":[{"id":6486,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/posts\/6468\/revisions\/6486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media\/6484"}],"wp:attachment":[{"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/media?parent=6468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/categories?post=6468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hightopo.com\/blog\/wp-json\/wp\/v2\/tags?post=6468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}