Jump to content

Three.js plugin


enpu
 Share

Recommended Posts

Three.js plugin v1.3.0 released.

It's now a lot easier to use with some helper game classes: Container3D, Object3D, Box3D, Sphere3D, Plane3D and Cylinder3D.

Example project includes now 4 different example scenes. Simple 3D scene with just one box with texture looks like this:

game.createScene('Main', {
    init: function() {
        var scene = new THREE.Scene();
        
        var camera = new THREE.PerspectiveCamera(60, game.width / game.height);
        camera.position.z = 200;
        
        var light = new THREE.AmbientLight();
        scene.add(light);
        
        var container = new game.Container3D(scene, camera);
        container.addTo(this.stage);
        
        var box = new game.Box3D('texture.png', 60);
        box.addTo(scene);
    }
});

Will add proper documentation to the website for all those classes once it's done.

Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...