Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8712975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:13:50+00:00 2026-06-13T05:13:50+00:00

I am trying to make this hello world example run on my own computer:

  • 0

I am trying to make this hello world example run on my own computer: http://jsfiddle.net/GKCx6/

I have made my efforts so far available here: https://dl.dropbox.com/u/2070405/wtf/index.html

Everything seems to work fine, except for the fact that nothing renders. How do I approach debugging this? I have used firebug so far.

This is the content of index.html:

<!doctype html>
<html>
    <head>
        <title>learningthree.js boiler plate for three.js</title>
        <meta charset="utf-8">
    </head>
<body>
    <!-- three.js container -->
        <div id="container"></div>
    <!-- info on screen display -->

</body>
<script src="three.js"></script>
<script src="main.js"></script>
</html>

This is the content of main.js:

// RequestAnimationFrame.js:
if ( !window.requestAnimationFrame ) {

    window.requestAnimationFrame = ( function() {

        return window.webkitRequestAnimationFrame ||
        window.mozRequestAnimationFrame ||
        window.oRequestAnimationFrame ||
        window.msRequestAnimationFrame ||
        function( callback, element ) {

            window.setTimeout( callback, 1000 / 60 );

        };

    } )();

}


// Hello World1 from https://github.com/mrdoob/three.js

var camera, scene, renderer,
    geometry, material, mesh;

init();
//console.log("renderer defined? ", renderer);
animate();

function init() {

    camera = new THREE.Camera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
    camera.position.z = 1000;

    console.log("THREE.Scene available? ", THREE.Scene);
    scene = new THREE.Scene();
    console.log("scene created? ", scene);

    geometry = new THREE.CubeGeometry( 200, 200, 200 );
    material = new THREE.MeshBasicMaterial( { color: 0xff0000, wireframe: true } );

    mesh = new THREE.Mesh( geometry, material );
    scene.add( mesh );

    renderer = new THREE.CanvasRenderer();
    renderer.setSize( 800, 600 );
    //renderer.setSize( window.innerWidth, window.innerHeight );

    container = document.getElementById("container");
    container.appendChild(renderer.domElement);

    }

    function animate() {

        // Include examples/js/RequestAnimationFrame.js for cross-browser compatibility.
        requestAnimationFrame( animate );
        console.log("animate in action");
        render();

    }

    function render() {

        mesh.rotation.x += 0.01;
        mesh.rotation.y += 0.02;
        console.log("renderer in action");
        renderer.render( scene, camera );

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:13:51+00:00Added an answer on June 13, 2026 at 5:13 am

    You are copying code appropriate for an older version of three.js. Download your examples from the three.js zip repository here: https://github.com/mrdoob/three.js.

    For updated fiddle, see jsfiddle.net/GKCx6/142/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have been struggling all day trying to make this simple example work using socket.io.
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I'm trying to make this request to the RunKeeper API : GET /user HTTP/1.1
I have been trying to make this to be a little jQuery plugin that
I'm just trying to compile the hello world example of boost.python WITHOUT using all
Hello this might be really silly question but I am trying to make markers
I am trying to make this sample program work (defn foo ([x] (foo x
I'm trying to make this: 174,myfilename.jpg Into this on the php post process page:
I'm trying to make this regex ^(?!\-\-\sRoaming) to match with -- Roaming but it
I've been trying to make this script from ClearBox3 to stop conflicting with MooTools

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.