From 09ca290d319700137d9a5fc66ce9f39f5813fee5 Mon Sep 17 00:00:00 2001 From: Arthur Langereis Date: Wed, 7 Oct 2015 11:15:03 +0200 Subject: [PATCH] add pre-defined attrs and link to spec for WebGLContextAttributes --- webgl-ext/webgl-ext.d.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/webgl-ext/webgl-ext.d.ts b/webgl-ext/webgl-ext.d.ts index 5be2ee07c3..f29d2c98d2 100644 --- a/webgl-ext/webgl-ext.d.ts +++ b/webgl-ext/webgl-ext.d.ts @@ -6,14 +6,28 @@ // These definitions go beyond those already defined in TS 1.6.2 stdlib // All non-draft WebGL 1.0 extensions and prefixed extension names are // covered. -// Some missing parameters for getContext and fields for +// Some missing parameters for getContext and attributes for // WebGLContextAttributes are added as well, copied over from // Shane S. Anderson's definitions file. interface WebGLContextAttributes { + // The following attributes are missing from TypeScript 1.6.2's lib.d.ts preferLowPowerToHighPerformance?: boolean; failIfMajorPerformanceCaveat?: boolean; + + // All others duplicated here for reference + /* + alpha?: boolean; + depth?: boolean; + stencil?: boolean; + antialias?: boolean; + premultipliedAlpha?: boolean; + preserveDrawingBuffer?: boolean; + */ + + // For the meanings and default values of these attributes, see the full spec at: + // https://www.khronos.org/registry/webgl/specs/latest/1.0/index.html#5.2 } interface HTMLCanvasElement {