Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="scene"></div>
              
            
!

CSS

              
                
              
            
!

JS

              
                (function(){
var scene = new THREE.Scene();
//シーンの追加
var camera = new THREE.PerspectiveCamera(45, 16/9, 1, 1000);
//(視野, アスペクト比,どこまで近くを描画するか ,どこまで遠くを描画するか )
  camera.position.set(100,100,500);//カメラの位置
  camera.lookAt(0,0,0);//カメラの向き

var Geometory =  new THREE.BoxGeometry(100,100,100);//図形の作成
var Material = new THREE.MeshPhongMaterial({//マテリアルの種類
			color:0xeeeeee,//色等の追加
		});
var box = new THREE.Mesh(Geometory, Material);//図形とマテリアルを使って物体を作成
box.position.set(0,50,0);//描画する座標
scene.add(box);//シーンに物体を追加
var renderer = new THREE.WebGLRenderer();
//レンダラ―の種類(WebGLRenderer推奨)
  renderer.setSize(window.innerWidth, window.innerHeight);//描画サイズ(ブラウザ幅最大)
  renderer.setClearColor(0x888888, 1);//背景色
  renderer.shadowMap.enabled=true;//シャドウマップ追加
  document.getElementById('scene').appendChild(renderer.domElement);//HTMLにアペンド
renderer.render(scene,camera);//レンダリング処理
	})();
              
            
!
999px

Console