{"id":6530,"date":"2026-09-21T14:31:05","date_gmt":"2026-09-21T05:31:05","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=6530"},"modified":"2026-11-02T14:32:28","modified_gmt":"2026-11-02T05:32:28","slug":"threejs-3d-simulator-beginner","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/6530\/","title":{"rendered":"Three.js\u3067\u52d5\u304f3D\u3092\u4f5c\u308b\u6700\u521d\u306e\u4e00\u6b69"},"content":{"rendered":"<p>\u30d6\u30e9\u30a6\u30b6\u30673D\u306e\u6a5f\u68b0\u304c\u52d5\u304f\u6620\u50cf\u3092\u898b\u3066\u3001\u300c\u81ea\u5206\u3067\u3082\u4f5c\u308c\u308b\u306e\u304b\u306a\u300d\u3068\u601d\u3063\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b\u3002\u8907\u96d1\u306a\u30a8\u30f3\u30b8\u30f3\u3092\u6700\u521d\u304b\u3089\u518d\u73fe\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u307e\u305a\u306f\u7acb\u65b9\u4f53\u3092\u56de\u8ee2\u3055\u305b\u3001\u305d\u306e\u52d5\u304d\u3092\u4e00\u3064\u306e\u6570\u5024\u304b\u3089\u5236\u5fa1\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>3D\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3092\u4f5c\u308b\u524d\u306b\u77e5\u3063\u3066\u304a\u304d\u305f\u3044\u3053\u3068<\/h2>\n<p><strong>Three.js<\/strong>\u306fJavaScript\u304b\u3089\u30d6\u30e9\u30a6\u30b6\u306e3D\u8868\u793a\u3092\u6271\u3046\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u30023D\u306e\u7269\u4f53\u3092\u7f6e\u304f\u300c\u30b7\u30fc\u30f3\u300d\u3001\u898b\u308b\u4f4d\u7f6e\u3092\u6c7a\u3081\u308b\u300c\u30ab\u30e1\u30e9\u300d\u3001\u753b\u9762\u306b\u63cf\u304f\u300c\u30ec\u30f3\u30c0\u30e9\u30fc\u300d\u304c\u57fa\u672c\u3067\u3059\u3002\u3053\u308c\u3089\u306fThree.js\u516c\u5f0f\u306e\u5165\u9580\u4f8b\u3067\u3082\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u672c\u683c\u7684\u306a\u6a5f\u68b0\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u3067\u306f\u3001\u90e8\u54c1\u3092\u52d5\u304b\u3059\u6570\u5024\u30683D\u8868\u793a\u3092\u4e00\u81f4\u3055\u305b\u307e\u3059\u3002\u4f8b\u3048\u3070\u6b6f\u8eca\u306e\u89d2\u5ea6\u3092\u4e00\u3064\u306e\u5024\u3068\u3057\u3066\u4fdd\u6301\u3057\u3001\u753b\u9762\u4e0a\u306e\u56de\u8ee2\u3068\u89d2\u5ea6\u8868\u793a\u306e\u4e21\u65b9\u3092\u305d\u306e\u5024\u304b\u3089\u8a08\u7b97\u3059\u308b\u3001\u3068\u3044\u3046\u8003\u3048\u65b9\u3067\u3059\u3002<\/p>\n<ul>\n<li>HTML\uff1a\u30d6\u30e9\u30a6\u30b6\u306b\u8868\u793a\u3059\u308b\u30da\u30fc\u30b8\u306e\u571f\u53f0<\/li>\n<li>JavaScript\uff1a\u5165\u529b\u3092\u53d7\u3051\u53d6\u308a\u3001\u89d2\u5ea6\u306a\u3069\u306e\u72b6\u614b\u3092\u8a08\u7b97\u3059\u308b<\/li>\n<li>Three.js\uff1a\u8a08\u7b97\u7d50\u679c\u30923D\u306e\u90e8\u54c1\u3068\u3057\u3066\u63cf\u304f<\/li>\n<\/ul>\n<h2>\u6e96\u5099\uff1a\u307e\u305a\u306f\u30ed\u30fc\u30ab\u30eb\u306e\u958b\u767a\u74b0\u5883\u3092\u7528\u610f\u3059\u308b<\/h2>\n<p>Node.js\u3068\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u7528\u610f\u3057\u3001\u7a7a\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u3067npm\u3092\u4f7f\u3063\u3066Three.js\u3068Vite\u3092\u5c0e\u5165\u3057\u307e\u3059\u3002Vite\u306f\u958b\u767a\u4e2d\u306b\u30da\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002\u5c0e\u5165\u624b\u9806\u3084\u73fe\u884c\u306e\u63a8\u5968\u69cb\u6210\u306fThree.js\u516c\u5f0f\u306eInstallation\u3092\u57fa\u6e96\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><code>npm install three\r\nnpm install --save-dev vite<\/code><\/pre>\n<p>HTML\u306b `&lt;script type=&quot;module&quot;&gt;import &#x27;.\/main.js&#x27;;&lt;\/script&gt;` \u3092\u8aad\u307f\u8fbc\u307e\u305b\u3001`main.js` \u306b\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u7f6e\u304d\u307e\u3059\u3002\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u306f `npx vite` \u3067\u8d77\u52d5\u3067\u304d\u307e\u3059\u3002`file:\/\/` \u3067\u76f4\u63a5HTML\u3092\u958b\u304f\u65b9\u6cd5\u306f\u3001\u30e2\u30b8\u30e5\u30fc\u30eb\u8aad\u307f\u8fbc\u307f\u306e\u5236\u7d04\u3067\u5931\u6557\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u5b9f\u8df5\uff1a\u7acb\u65b9\u4f53\u3092\u56de\u8ee2\u3055\u305b\u308b<\/h2>\n<pre><code>import * as THREE from &#x27;three&#x27;;\r\nconst scene = new THREE.Scene();\r\nscene.background = new THREE.Color(0xf5f7fa);\r\nconst camera = new THREE.PerspectiveCamera(60, innerWidth \/ innerHeight, 0.1, 100);\r\ncamera.position.set(2, 2, 5);\r\nconst renderer = new THREE.WebGLRenderer({ antialias: true });\r\nrenderer.setSize(innerWidth, innerHeight);\r\ndocument.body.appendChild(renderer.domElement);\r\nconst cube = new THREE.Mesh(\r\n  new THREE.BoxGeometry(1, 1, 1),\r\n  new THREE.MeshNormalMaterial()\r\n);\r\nscene.add(cube);\r\nlet speed = 0.6; \/\/ radians per second\r\nlet phase = 0;\r\nconst clock = new THREE.Clock();\r\nrenderer.setAnimationLoop(() =&gt; {\r\n  const dt = Math.min(clock.getDelta(), 0.05);\r\n  phase += speed * dt;\r\n  cube.rotation.y = phase;\r\n  renderer.render(scene, camera);\r\n});\r\nwindow.addEventListener(&#x27;resize&#x27;, () =&gt; {\r\n  camera.aspect = innerWidth \/ innerHeight;\r\n  camera.updateProjectionMatrix();\r\n  renderer.setSize(innerWidth, innerHeight);\r\n});<\/code><\/pre>\n<p>\u30b3\u30fc\u30c9\u3092\u958b\u304f\u3068\u8272\u306e\u4ed8\u3044\u305f\u7acb\u65b9\u4f53\u304c\u56de\u8ee2\u3059\u308b\u69cb\u6210\u3067\u3059\u3002\u52d5\u304d\u306f `speed` \u3068 `phase` \u3068\u3044\u3046\u5024\u304b\u3089\u6c7a\u307e\u308a\u3001\u6bce\u30d5\u30ec\u30fc\u30e0\u306e\u7d4c\u904e\u6642\u9593 `dt` \u3092\u8db3\u3057\u3066\u89d2\u5ea6\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002`speed = 0` \u306b\u5909\u66f4\u3059\u308b\u3068\u505c\u6b62\u3057\u3001\u8ca0\u306e\u5024\u306b\u3059\u308c\u3070\u56de\u8ee2\u65b9\u5411\u304c\u9006\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u3053\u3067\u78ba\u304b\u3081\u305f\u3044\u306e\u306f\u300c\u898b\u305f\u76ee\u3092\u76f4\u63a5\u52d5\u304b\u3059\u300d\u306e\u3067\u306f\u306a\u304f\u3001\u6570\u5024\u3092\u66f4\u65b0\u3057\u3066\u305d\u306e\u7d50\u679c\u3092\u8868\u793a\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3059\u3002JavaScript\u30b3\u30f3\u30bd\u30fc\u30eb\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u3068\u304d\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3001\u8d77\u52d5\u65b9\u6cd5\u3001import\u306e\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u6a5f\u68b0\u3089\u3057\u3044\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u30fc\u306b\u8fd1\u3065\u3051\u308b\u8a2d\u8a08<\/h2>\n<p>\u6b21\u306e\u6bb5\u968e\u3067\u306f\u3001\u901f\u5ea6\u30b9\u30e9\u30a4\u30c0\u30fc\u3068\u89d2\u5ea6\u8868\u793a\u3092\u52a0\u3048\u307e\u3059\u3002\u89d2\u5ea6\u3068\u8868\u793a\u5024\u3092\u5225\u3005\u306b\u8a08\u7b97\u3059\u308b\u3068\u98df\u3044\u9055\u3044\u304c\u8d77\u304d\u308b\u306e\u3067\u3001\u540c\u3058 `state` \u304b\u3089\u5c0e\u304d\u307e\u3059\u3002<\/p>\n<pre><code>\/\/ \u66f4\u65b0\u3059\u308b\u5024\u306f\u4e00\u3064\u3002\u898b\u305f\u76ee\u3068\u8868\u793a\u306f\u540c\u3058\u72b6\u614b\u304b\u3089\u6c42\u3081\u308b\r\nconst state = { angle: 0, speed: 0.6 };\r\nfunction advance(dt) { state.angle += state.speed * dt; }\r\nfunction syncView() {\r\n  cube.rotation.y = state.angle;\r\n  document.querySelector(&#x27;#angle&#x27;).textContent =\r\n    `${(state.angle * 180 \/ Math.PI).toFixed(1)}\u00b0`;\r\n}\r\n\/\/ animation loop \u5185\u3067 advance(dt) -&gt; syncView() -&gt; render() \u3092\u9806\u306b\u547c\u3076<\/code><\/pre>\n<p>\u3053\u308c\u306f\u300c\u5358\u4e00\u306e\u72b6\u614b\u3092\u6b63\u3068\u3059\u308b\u300d\u8a2d\u8a08\u306e\u5c0f\u3055\u306a\u4f8b\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u73fe\u5b9f\u306e\u6a5f\u68b0\u306e\u529b\u3084\u6469\u64e6\u307e\u3067\u5fe0\u5b9f\u306b\u518d\u73fe\u3067\u304d\u308b\u308f\u3051\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u7269\u7406\u7684\u306b\u6b63\u78ba\u306a\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u306b\u306f\u3001\u5225\u9014\u6570\u5f0f\u30fb\u6e2c\u5b9a\u5024\u30fb\u691c\u8a3c\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h2>\u3046\u307e\u304f\u52d5\u304b\u306a\u3044\u3068\u304d\u306b\u898b\u308b\u9806\u756a<\/h2>\n<ul>\n<li>\u753b\u9762\u304c\u771f\u3063\u767d\uff1a\u958b\u767a\u30b5\u30fc\u30d0\u30fc\u304c\u52d5\u3044\u3066\u3044\u308b\u304b\u3001\u30d6\u30e9\u30a6\u30b6\u306eConsole\u306b\u30a8\u30e9\u30fc\u304c\u306a\u3044\u304b\u78ba\u8a8d<\/li>\n<li>\u7acb\u65b9\u4f53\u304c\u898b\u3048\u306a\u3044\uff1a\u30ab\u30e1\u30e9\u4f4d\u7f6e\u3001\u30af\u30ea\u30c3\u30d4\u30f3\u30b0\u7bc4\u56f2\u3001scene.add\u306e\u6709\u7121\u3092\u78ba\u8a8d<\/li>\n<li>\u56de\u8ee2\u3057\u306a\u3044\uff1asetAnimationLoop\u304c\u547c\u3070\u308c\u3001phase\u304c\u5897\u3048\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/li>\n<li>\u901f\u5ea6\u304c\u7aef\u672b\u3067\u9055\u3046\uff1a1\u30d5\u30ec\u30fc\u30e0\u56fa\u5b9a\u306e\u56de\u8ee2\u91cf\u3067\u306f\u306a\u304f\u3001\u7d4c\u904e\u6642\u9593dt\u3092\u5229\u7528<\/li>\n<li>\u8868\u793a\u304c\u4f38\u3073\u308b\uff1a\u30ea\u30b5\u30a4\u30ba\u6642\u306b\u30ab\u30e1\u30e9\u306easpect\u3068\u30ec\u30f3\u30c0\u30e9\u30fc\u306e\u30b5\u30a4\u30ba\u3092\u66f4\u65b0<\/li>\n<\/ul>\n<p>\u30b3\u30fc\u30c9\u3092\u76f4\u3057\u305f\u3089\u3001\u5358\u306b\u30a8\u30e9\u30fc\u304c\u6d88\u3048\u305f\u304b\u3067\u306f\u306a\u304f\u3001\u901f\u5ea6\u30920\u306b\u3057\u305f\u3068\u304d\u306b\u505c\u6b62\u3059\u308b\u304b\u3001\u7a93\u306e\u5927\u304d\u3055\u3092\u5909\u66f4\u3057\u3066\u3082\u5f62\u304c\u5d29\u308c\u306a\u3044\u304b\u3092\u81ea\u5206\u3067\u78ba\u304b\u3081\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>AI\u306e\u751f\u6210\u30b3\u30fc\u30c9\u3092\u5b66\u7fd2\u306b\u4f7f\u3046\u306a\u3089<\/h2>\n<p>AI\u306b\u300c3D\u6a5f\u68b0\u3092\u5168\u90e8\u4f5c\u3063\u3066\u300d\u3068\u983c\u3080\u3088\u308a\u3001\u300c\u7acb\u65b9\u4f53\u304c\u56de\u308b\u6700\u5c0f\u30b3\u30fc\u30c9\u3092\u4f5c\u308a\u3001\u3069\u306e\u5909\u6570\u304c\u89d2\u5ea6\u3092\u6c7a\u3081\u308b\u304b\u30b3\u30e1\u30f3\u30c8\u3057\u3066\u300d\u3068\u4f9d\u983c\u3057\u3001\u81ea\u5206\u3067 `speed` \u3092\u5909\u3048\u3066\u78ba\u8a8d\u3059\u308b\u307b\u3046\u304c\u57fa\u790e\u3092\u7406\u89e3\u3057\u3084\u3059\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u6b21\u306f\u4e8c\u3064\u306e\u7acb\u65b9\u4f53\u3092\u8ffd\u52a0\u3057\u3001\u7247\u65b9\u304c\u3082\u3046\u7247\u65b9\u306e2\u500d\u306e\u89d2\u5ea6\u3067\u52d5\u304f\u3088\u3046\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u307e\u305a\u81ea\u5206\u3067\u6570\u5f0f\u3092\u8003\u3048\u3066\u304b\u3089\u3001AI\u306e\u7b54\u3048\u3068\u6bd4\u3079\u308b\u7df4\u7fd2\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\uff08Web\u753b\u9762\u306e3D\u98a8\u6f14\u51fa\u3068\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/951\/\">\u7acb\u4f53\u611f\u30fb3D\u30fb\u30b9\u30b1\u30fc\u30eb\u5909\u5316\uff01Swiper\u306e\u30e6\u30cb\u30fc\u30af\u306a\u30a8\u30d5\u30a7\u30af\u30c8\u96c6<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<h2>\u53c2\u8003\u8cc7\u6599\u3068\u6b21\u306e\u4e00\u6b69<\/h2>\n<p>Three.js\u516c\u5f0f\u306e\u300cInstallation\u300d\u3068\u300cCreating a scene\u300d\u3092\u57fa\u6e96\u306b\u3001\u307e\u305a\u306f\u4e00\u3064\u306e\u7269\u4f53\u3092\u81ea\u5206\u3067\u52d5\u304b\u3059\u3068\u3053\u308d\u307e\u3067\u9032\u3081\u307e\u3057\u3087\u3046\u3002\u6163\u308c\u305f\u3089\u5165\u529b\u64cd\u4f5c\u3001\u8907\u6570\u90e8\u54c1\u306e\u9023\u52d5\u3001\u72b6\u614b\u8868\u793a\u3078\u6bb5\u968e\u7684\u306b\u767a\u5c55\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>Three.js\u516c\u5f0f\u8cc7\u6599\uff1a<br \/>\n  <a href=\"https:\/\/threejs.org\/manual\/pages\/installation.html\" target=\"_blank\" rel=\"noopener noreferrer\">Installation\uff08\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u74b0\u5883\u69cb\u7bc9\uff09<\/a><br \/>\n  <a href=\"https:\/\/threejs.org\/manual\/pages\/creating-a-scene.html\" target=\"_blank\" rel=\"noopener noreferrer\">Creating a Scene\uff083D\u30b7\u30fc\u30f3\u306e\u4f5c\u6210\uff09<\/a><\/p>\n","protected":false},"featured_media":6531,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/6530"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/6531"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=6530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}