{"id":354,"date":"2021-02-18T22:07:05","date_gmt":"2021-02-18T13:07:05","guid":{"rendered":"https:\/\/www.opentone.co.jp\/optonlabos\/?p=354"},"modified":"2025-05-12T10:06:25","modified_gmt":"2025-05-12T01:06:25","slug":"three-js%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.opentone.co.jp\/ot-lab\/all\/uncategorized\/three-js%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%82%8b","title":{"rendered":"three.js\u3092\u4f7f\u3063\u3066\u307f\u308b"},"content":{"rendered":"\n<p>\u307f\u306a\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\u3002ishiB\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3061\u3087\u3063\u3068\u9762\u767d\u305d\u3046\u3060\u3063\u305f\u306e\u3067three.js\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5229\u7528\u3057\u3066\u304a\u624b\u8efd\u306b\uff13D\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br>three.js\u306fHTML\uff15\u306ecanvas\u30bf\u30b0\u3092\u4f7f\u7528\u3059\u308b\u306e\u3067\u3001HTML5\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u3067\u95b2\u89a7\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u3053\u3053\u3067\u306f<a href=\"https:\/\/github.com\/mrdoob\/three.js\/\">\u3053\u3053<\/a>\u306e\u30b5\u30f3\u30d7\u30eb\u306b\u6cbf\u3063\u3066\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\uff11\uff0e\u30ab\u30e1\u30e9\u3092\u7528\u610f<br>\uff12\uff0e\u30b7\u30fc\u30f3\u3092\u7528\u610f<br>\uff13\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u30fc\u3092\u4f5c\u6210<br>\uff14\uff0e\u30de\u30c6\u30ea\u30a2\u30eb\u3092\u4f5c\u6210<br>\uff15\uff0e\u30e1\u30c3\u30b7\u30e5\u3092\u4f5c\u6210<br>\uff16\uff0e\u30e1\u30c3\u30b7\u30e5\u3092\u30b7\u30fc\u30f3\u306b\u8ffd\u52a0<br>\uff17\uff0e\u30ec\u30f3\u30c0\u30e9\u30fc\u3092\u7528\u610f<br>\uff18\uff0e\u30ec\u30f3\u30c0\u30e9\u30fc\u3092DOM\u306b\u8ffd\u52a0<br>\uff19\uff0e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3<br>\uff11\uff10\uff0e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0<\/p>\n\n\n\n<p>\u5b9f\u969b\u306e\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[javascript]\n    var camera, scene, renderer,\n    geometry, material, mesh;\n\n    init();\n    animate();\n\n    function init() {\n\n        \/\/ \uff11\uff0e\u30ab\u30e1\u30e9\u3092\u7528\u610f\n        camera = new THREE.PerspectiveCamera( 75, window.innerWidth \/ window.innerHeight, 1, 10000 );\n        camera.position.z = 1000;\n\n        \/\/ \uff12\uff0e\u30b7\u30fc\u30f3\u3092\u7528\u610f\n        scene = new THREE.Scene();\n        scene.add( camera );\n\n        \/\/ \uff13\uff0e\u30b8\u30aa\u30e1\u30c8\u30ea\u30fc\u3092\u4f5c\u6210\n        geometry = new THREE.CubeGeometry( 200, 200, 200 );\n\n        \/\/ \uff14\uff0e\u30de\u30c6\u30ea\u30a2\u30eb\u3092\u4f5c\u6210\n        material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );\n\n        \/\/ \uff15\uff0e\u30e1\u30c3\u30b7\u30e5\u3092\u4f5c\u6210\n        mesh = new THREE.Mesh( geometry, material );\n\n        \/\/ \uff16\uff0e\u30e1\u30c3\u30b7\u30e5\u3092\u30b7\u30fc\u30f3\u306b\u8ffd\u52a0\n        scene.add( mesh );\n\n        \/\/ \uff17\uff0e\u30ec\u30f3\u30c0\u30e9\u30fc\u3092\u7528\u610f\n        renderer = new THREE.CanvasRenderer();\n\n        renderer.setSize( window.innerWidth, window.innerHeight );\n\n        \/\/ \uff18\uff0e\u30ec\u30f3\u30c0\u30e9\u30fc\u3092DOM\u306b\u8ffd\u52a0\n        document.body.appendChild( renderer.domElement );\n\n    }\n\n    function animate() {\n\n        \/\/ \uff19\uff0e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\n        requestAnimationFrame( animate );\n        render();\n\n    }\n\n    function render() {\n\n        mesh.rotation.x += 0.01;\n        mesh.rotation.y += 0.02;\n\n        \/\/ \uff11\uff10\uff0e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\n        renderer.render( scene, camera );\n\n    }\n\n[\/javascript]<\/pre>\n\n\n\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><a href=\"http:\/\/jsdo.it\/bassy\/cPkx\">\uff13D\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b5\u30f3\u30d7\u30eb<\/a><\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u3053\u308c\u3092\u62e1\u5f35\u3057\u3066\u4ee5\u4e0b\u306e\u3082\u306e\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u4e3b\u306a\u62e1\u5f35\u70b9\u306f\u4ee5\u4e0b\u306e\uff13\u70b9\u3067\u3059\u3002<br>\uff11\uff0e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u6570\u3092\uff13\u3064\u8ffd\u52a0<br>\uff12\uff0e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u7a2e\u985e\u306e\u5909\u66f4<br>\uff13\uff0e\u30de\u30a6\u30b9\u306e\u79fb\u52d5\u306b\u9023\u52d5\u3057\u3066\u4e00\u90e8\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u5909\u66f4<\/p>\n\n\n\n<p>\u203b\u30bd\u30fc\u30b9\u306b\u30b3\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u307e\u3059\u306e\u3067\u3001\u5b9f\u88c5\u65b9\u6cd5\u306f\u305d\u3061\u3089\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p><a href=\"http:\/\/jsdo.it\/bassy\/1lk4\">\u4fee\u6b63\u7248\uff13D\u30b0\u30e9\u30d5\u30a3\u30c3\u30af<\/a><\/p>\n\n\n\n<p>\u53c2\u8003\uff1athree.js\u306eAPI\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u306f<a href=\"https:\/\/github.com\/mrdoob\/three.js\/wiki\/API-Reference\">\u3053\u3061\u3089<\/a>\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306fhtml5 + javascript\u3067\uff13D\u30b0\u30e9\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u8868\u793a\u3057\u3066\u307f\u307e\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u8868\u793a\u304c\u30e1\u30a4\u30f3\u3067\u3059\u304c\u3001\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u3092\u62fe\u3046\u306a\u3069\u3057\u3066\u3088\u308a\u52d5\u7684\u306a\u51e6\u7406\u3092\u8ffd\u52a0\u3057\u3066\u3044\u3051\u3070\u3001<br>HTML\u3068javascript\u306e\u307f\u3067\u9ad8\u6a5f\u80fd\u306aGAME\u306a\u3069\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3067\u306f\u3067\u306f\u301c&nbsp;<\/p>\n<div class=\"opent-_2\" style=\"margin-top: 10px;margin-right: 10px;margin-bottom: 10px;margin-left: 10px;\" id=\"opent-4287102244\"><a href=\"https:\/\/www.opentone.co.jp\/backlog\/\" aria-label=\"twitter_backlogskt_new\"><img src=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg\" alt=\"\"  srcset=\"https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new.jpg 1024w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-300x157.jpg 300w, https:\/\/www.opentone.co.jp\/ot-lab\/wp-content\/uploads\/sites\/11\/2023\/02\/twitter_backlogskt_new-768x401.jpg 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" width=\"384\" height=\"200\"   \/><\/a><\/div>","protected":false},"excerpt":{"rendered":"<p>\u307f\u306a\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\u3002ishiB\u3067\u3059\u3002 \u4eca\u56de\u306f\u3061\u3087\u3063\u3068\u9762\u767d\u305d\u3046\u3060\u3063\u305f\u306e\u3067three.js\u3068\u3044\u3046\u30e9\u30a4\u30d6<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-uncategorized",""],"acf":[],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"engage-mag-carousel-img":false,"engage-mag-carousel-img-landscape":false,"engage-mag-carousel-large-img":false,"engage-mag-carousel-large-img-landscape":false,"engage-mag-large-thumb":false,"engage-mag-small-thumb":false},"uagb_author_info":{"display_name":"ah106rx4o4","author_link":"https:\/\/www.opentone.co.jp\/ot-lab\/author\/ah106rx4o4"},"uagb_comment_info":14,"uagb_excerpt":"\u307f\u306a\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\u3002ishiB\u3067\u3059\u3002 \u4eca\u56de\u306f\u3061\u3087\u3063\u3068\u9762\u767d\u305d\u3046\u3060\u3063\u305f\u306e\u3067three.js\u3068\u3044\u3046\u30e9\u30a4\u30d6","_links":{"self":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":2,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/posts\/354\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.opentone.co.jp\/ot-lab\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}