{"id":12832,"date":"2023-01-02T12:58:57","date_gmt":"2023-01-02T17:58:57","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=12832"},"modified":"2023-01-02T12:58:59","modified_gmt":"2023-01-02T17:58:59","slug":"create-three-js-cube-mesh","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/create-three-js-cube-mesh\/","title":{"rendered":"Create Three.js Cube Mesh Example Code"},"content":{"rendered":"\n
Use the BoxGeometry geometry class to create a rectangular cuboid with a given width, height, and depth.<\/p>\n\n\n\n
const geometry = new THREE.BoxGeometry( 1, 1, 1 );\nconst material = new THREE.MeshBasicMaterial( {color: 0x00ff00} );\nconst cube = new THREE.Mesh( geometry, material );\nscene.add( cube );<\/code><\/pre>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,25,27,15,16],"tags":[33,328,350,424,433,449,1215,591],"yoast_head":"\nCreate Three.js Cube Mesh Example Code [Snippet]<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n