docs: function() {
          if (!this.ready) return;
  
          var pos = this.drawVars.pos;
          pos._x = this._x;
          pos._y = this._y;
          pos._w = this._w;
          pos._h = this._h;
  
          var coord = this.__coord || [0, 0, 0, 0];
          var co = this.drawVars.co;
          co.x = coord[0];
          co.y = coord[1];
          co.w = coord[2];
          co.h = coord[3];
  
          // Handle flipX, flipY
          // (Just swap the positions of e.g. x and x+w)
          if (this._flipX) {
              co.x = co.x + co.w;
              co.w = -co.w;
          }
          if (this._flipY) {
              co.y = co.y + co.h;
              co.h = -co.h;
          }
  
          //Draw entity
          var gl = this._drawContext;
          this.drawVars.gl = gl;
          var prog = (this.drawVars.program = this.program);
  
          // The program might need to refer to the current element's index
          prog.setCurrentEntity(this);
  
          // Write position; x, y, w, h
          prog.writeVector(
              "aPosition",
              this._x,
              this._y,
              this._x,
              this._y + this._h,
              this._x + this._w,
              this._y,
              this._x + this._w,
              this._y + this._h
          );
  
          // Write orientation
          prog.writeVector(
              "aOrientation",
              this._origin.x + this._x,
              this._origin.y + this._y,
              (this._rotation * Math.PI) / 180
          );
  
          // Write z, alpha
          prog.writeVector("aLayer", this._globalZ, this._alpha);
  
          // This should only need to handle *specific* attributes!
          this.trigger("Draw", this.drawVars);
  
          // Register the vertex groups to be drawn, referring to this entities position in the big buffer
          prog.addIndices(prog.ent_offset);
  
          return this;
      }