Comparing version 1.1.2 to 1.1.3
@@ -5,3 +5,2 @@ /** @module gl-util/context */ | ||
const glContext = require('webgl-context') | ||
const extend = require('object-assign') | ||
@@ -19,14 +18,12 @@ module.exports = setContext; | ||
//provide defaults | ||
opts = extend({ | ||
antialias: true, | ||
alpha: true, | ||
premultipliedAlpha: true, | ||
preserveDrawingBuffer: true, | ||
depth: false, | ||
stencil: false, | ||
float: false | ||
}, opts); | ||
//create new context with default options | ||
let gl = glContext(opts); | ||
let gl = glContext({ | ||
antialias: opts.antialias != null ? opts.antialias : true, | ||
alpha: opts.alpha != null ? opts.alpha : true, | ||
premultipliedAlpha: opts.premultipliedAlpha != null ? opts.premultipliedAlpha : true, | ||
preserveDrawingBuffer: opts.preserveDrawingBuffer != null ? opts.preserveDrawingBuffer : true, | ||
depth: opts.depth != null ? opts.depth : false, | ||
stencil: opts.stencil != null ? opts.stencil : false | ||
}); | ||
@@ -33,0 +30,0 @@ //enable extensions |
{ | ||
"name": "gl-util", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Set of practical webgl utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87230
626