<!doctype html>
<html>
  <head>
    <title>Plane, box, sphere</title>
    <style>
      body { max-width: 100%; }
      /* feel free to style the canvas any way you want. If you want it to
      use the entire window, set width: 100% and height: 100%. */
      
      canvas {
          width: 80%;
          height: 500px;
          display: block;
          margin: 10px auto;
      }
    </style>
  </head>
<body>

  <h1>Plane, box, sphere</h1>
  
  <p></p>

</body>
</html>
var scene = new THREE.Scene();

var plane = TW.createMesh( new THREE.PlaneGeometry(6,4) );
scene.add(plane);

var box = TW.createMesh( new THREE.BoxGeometry(4,6,1) );
scene.add(box);

var sphere = TW.createMesh( new THREE.SphereGeometry(1));
scene.add(sphere);

var renderer = new THREE.WebGLRenderer();

TW.cameraSetup(renderer,
               scene,
               {minx: -3, maxx: 3,
                miny: -3, maxy: 3,
                minz: -3, maxz: 3});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://s3.amazonaws.com/m.mr-pc.org/t/cisc3620/2020sp/three.min.js
  2. https://s3.amazonaws.com/m.mr-pc.org/t/cisc3620/2020sp/OrbitControls.js
  3. https://s3.amazonaws.com/m.mr-pc.org/t/cisc3620/2020sp/tw.js
  4. https://s3.amazonaws.com/m.mr-pc.org/t/cisc3620/2020sp/dat.gui.min.js