ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Threejs Autocomplete

by wrbing728 ALL

threejs-sublime

Details

  • 1.0.0
  • github.​com
  • 7 years ago
  • 1 hour ago
  • 12 years ago

Installs

  • Total 15K
  • Win 9K
  • Mac 4K
  • Linux 2K
Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12
Windows 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0
Mac 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

threejs-sublime

Threejs sublime adds autocomplete functionallity to javascript files within Sublime Text 2 for THREE.js

Author

Jason Kadrmas @itooamaneatguy http://kadrmasconcepts.com/blog/

Installation

Threejs sublime can be installed through package control.

  • Command+Shift+P
  • Package Control Install Package
  • Select Three.js Autocomplete

Usage

If everything is installed correctly you should be able to start typing 'THREE.' and get auto completion. Enjoy!

Todos

Next steps would be to add some commonly used code blocks as snippets. Possible example to create a new scene could be the shortcut

tscene + tab

which would pull in the basic code to create a new scene.

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

    init();
    animate();

    function init() {

        scene = new THREE.Scene();

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

        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( window.innerWidth, window.innerHeight );

        document.body.appendChild( renderer.domElement );

    }

    function animate() {

        // note: three.js includes requestAnimationFrame shim
        requestAnimationFrame( animate );
        render();

    }

    function render() {

        mesh.rotation.x += 0.01;
        mesh.rotation.y += 0.02;

        renderer.render( scene, camera );

    }