Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gl-util

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-util - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

25

context.js

@@ -65,5 +65,4 @@ /** @module gl-util/context */

else {
var sb = scrollbar()
w = window.innerWidth - sb[0]
h = window.innerHeight - sb[1]
w = window.innerWidth
h = window.innerHeight
}

@@ -108,21 +107,1 @@ o.canvas.width = o.pixelRatio * w

}
function scrollbar () {
const div = document.createElement('div')
div.style.width = '100px'
div.style.height = '100px'
div.style.overflow = 'scroll'
div.style.position = 'absolute'
div.style.top = '-9999px'
div.style.left = '-9999px'
document.body.appendChild(div)
const scrollbarWidth = div.offsetWidth - div.clientWidth
const scrollbarHeight = div.offsetHeight - div.clientHeight
document.body.removeChild(div)
return [scrollbarWidth, scrollbarHeight]
}

2

package.json
{
"name": "gl-util",
"version": "3.0.0",
"version": "3.0.1",
"description": "Set of practical webgl utils",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,6 +6,7 @@ 'use strict'

document.body.style.margin = 0
let gl = context({
attributes: {preserveDrawingBuffer: false}
})
document.body.appendChild(gl.canvas)

@@ -12,0 +13,0 @@ let attrs = gl.getContextAttributes();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc