Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


Save Automatically?

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


                <!-- three.min.js r87 -->
<script src=""></script>

<!-- vox.js v1.0.1 -->
<script src=""></script>

<!-- Old OrbitControls.js -->
<script src=""></script>



                * {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;

body {
  background: #000;
  font: 30px sans-serif;


                // forked from siouxcitizen's "forked: vox.js を試してみるテスト"
// forked from cx20's "vox.js を試してみるテスト"
// forked from ohisama1's "vox.js test 0"
//Three.js r70 でOBJファイル形式3Dモデルを表示(WebGL使用)
var scene, camera, renderer, controls;
var ROTATE = true;

function init() {
    scene = new THREE.Scene();
    camera = new THREE.PerspectiveCamera(45, 450 / 450, 0.1, 1000);
    renderer = new THREE.WebGLRenderer();
    controls = new THREE.OrbitControls(camera, renderer.domElement);
    controls.userPan = false;
    controls.userPanSpeed = 0.0;
    controls.maxDistance = 5000.0;
    controls.maxPolarAngle = Math.PI * 0.495;
    controls.rotateUp(Math.PI * 0.1);
    controls.autoRotate = ROTATE; //true:自動回転する,false:自動回転しない
    controls.autoRotateSpeed = 4.0; //自動回転する時の速度

    renderer.setSize(465, 465);
    renderer.shadowMapEnabled = true;
    camera.position.x = 0;
    camera.position.y = 0;
    camera.position.z = 150;

    var spotLight = new THREE.SpotLight(0xffffff);
    spotLight.position.set(100, 100, -100);

    var light = new THREE.DirectionalLight(0xffffff, 1.5);
    light.position.set(100, 100, 100).normalize();

    var light2 = new THREE.DirectionalLight(0xffffff);
    light2.position.set(-100, -100, -100).normalize();

    var parser = new vox.Parser();
    // yuusha.vox
    parser.parse("").then(function(voxelData) {
        var builder = new vox.MeshBuilder(voxelData, {
            voxelSize: 7.0,
            vertexColor: true,
            optimizeFaces: false,
        var v0 = builder.createMesh();
        v0.position.y -= 50;

function render() {
    renderer.render(scene, camera);