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

Threejs Autocomplete

by wrbing728 ST2/ST3

threejs-sublime

Details

  • 1.0.0
  • github.​com
  • 2 years ago
  • 3 hours ago
  • 7 years ago

Installs

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

    }