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

Threejs Autocomplete

by wrbing728 ALL

threejs-sublime

Details

  • 1.0.0
  • github.​com
  • 6 years ago
  • 2 hours ago
  • 12 years ago

Installs

  • Total 15K
  • Win 9K
  • Mac 4K
  • Linux 2K
Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 1 0 2 0 0 1 0 2
Mac 0 0 1 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 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 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 1 0 0 0 0 1 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 );

    }