Procházet zdrojové kódy

added getContext3d() shortcut

Nicolas Cannasse před 12 roky
rodič
revize
b0ba49bb08
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      std/js/html/CanvasElement.hx

+ 4 - 0
std/js/html/CanvasElement.hx

@@ -47,4 +47,8 @@ extern class CanvasElement extends Element
 
 
     /** A typed shortcut for <code>getContext("2d")</code>. */
     /** A typed shortcut for <code>getContext("2d")</code>. */
     public inline function getContext2d () :CanvasRenderingContext2D { return cast getContext("2d"); }
     public inline function getContext2d () :CanvasRenderingContext2D { return cast getContext("2d"); }
+	
+    /** A typed shortcut for <code>getContext("webgl")</code>. */
+    public inline function getContext3d () : js.html.webgl.RenderingContext { return cast getContext("webgl"); }
+
 }
 }