{"id":454,"date":"2022-08-26T17:53:05","date_gmt":"2022-08-26T09:53:05","guid":{"rendered":"http:\/\/gjweb.top\/?p=454"},"modified":"2022-08-26T17:53:06","modified_gmt":"2022-08-26T09:53:06","slug":"05-%e7%b2%92%e5%ad%90%e7%89%b9%e6%95%88","status":"publish","type":"post","link":"https:\/\/gjweb.top\/?p=454","title":{"rendered":"05.\u7c92\u5b50\u7279\u6548"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"1-\u7c92\u5b50\u7403\">1. \u7c92\u5b50\u7403<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code> &nbsp; &nbsp; &nbsp;\/\/ \u521b\u5efa\u51e0\u4f55\u4f53<br> &nbsp; &nbsp; &nbsp;const sphereGeometry = new THREE.SphereGeometry(3,20,20)<br> &nbsp; &nbsp; &nbsp;\/\/ \u8bbe\u7f6e\u70b9\u6750\u8d28<br> &nbsp; &nbsp; &nbsp;const pointsMaterial = new THREE.PointsMaterial();<br> &nbsp; &nbsp; &nbsp;pointsMaterial.size = 0.2;<br> &nbsp; &nbsp; &nbsp;pointsMaterial.color.set(\"#ff0000\")<br> &nbsp; &nbsp; &nbsp;pointsMaterial.sizeAttenuation = true<br> &nbsp; &nbsp; &nbsp;\/\/ \u8f7d\u5165\u7eb9\u7406<br> &nbsp; &nbsp; &nbsp;const textureLoader = new THREE.TextureLoader();<br> &nbsp; &nbsp; &nbsp;const texture = textureLoader.load(\"\/particles\/1.png\")<br> &nbsp; &nbsp; &nbsp;\/\/ \u8bbe\u7f6e\u70b9\u7eb9\u7406<br> &nbsp; &nbsp; &nbsp;pointsMaterial.map = texture;<br> &nbsp; &nbsp; &nbsp;pointsMaterial.alphaMap = texture;<br> &nbsp; &nbsp; &nbsp;pointsMaterial.transparent = true;<br> &nbsp; &nbsp; &nbsp;\/\/ \u6df1\u5ea6\u68c0\u6d4b<br> &nbsp; &nbsp; &nbsp;pointsMaterial.depthWrite = false;<br> &nbsp; &nbsp; &nbsp;\/\/ \u6df7\u5408\u7b97\u6cd5<br> &nbsp; &nbsp; &nbsp;pointsMaterial.blending = THREE.AdditiveBlending;<br>\u200b<br>\u200b<br> &nbsp; &nbsp; &nbsp;const points = new THREE.Points(sphereGeometry,pointsMaterial);<br> &nbsp; &nbsp; &nbsp;scene.add(points)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n","protected":false},"excerpt":{"rendered":"<p>1. \u7c92\u5b50\u7403<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-three"],"_links":{"self":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=454"}],"version-history":[{"count":1,"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/gjweb.top\/index.php?rest_route=\/wp\/v2\/posts\/454\/revisions\/455"}],"wp:attachment":[{"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gjweb.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}