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

@luma.gl/webgl2-polyfill

Package Overview
Dependencies
Maintainers
7
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luma.gl/webgl2-polyfill - npm Package Compare versions

Comparing version 7.0.0-beta.9 to 7.0.0-rc.1

dist/dist.js

2

dist/es5/assert.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = assert;
exports["default"] = assert;

@@ -9,0 +9,0 @@ function assert(condition, message) {

@@ -11,3 +11,3 @@ "use strict";

get: function get() {
return _polyfillContext.default;
return _polyfillContext["default"];
}

@@ -18,3 +18,3 @@ });

get: function get() {
return _polyfillContext.default;
return _polyfillContext["default"];
}

@@ -21,0 +21,0 @@ });

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = polyfillContext;
exports["default"] = polyfillContext;

@@ -51,4 +51,4 @@ var _assert = _interopRequireDefault(require("./assert"));

try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}

@@ -100,4 +100,4 @@ } finally {

try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}

@@ -117,3 +117,3 @@ } finally {

var defaults = _polyfillTable.WEBGL2_CONTEXT_POLYFILLS[extension];
(0, _assert.default)(defaults);
(0, _assert["default"])(defaults);
var _defaults$meta = defaults.meta,

@@ -125,6 +125,4 @@ meta = _defaults$meta === void 0 ? {} : _defaults$meta;

var _arr = Object.keys(defaults);
var _loop = function _loop() {
var key = _arr[_i];
var key = _Object$keys[_i];
var extKey = "".concat(key).concat(suffix);

@@ -147,3 +145,3 @@ var polyfill = null;

for (var _i = 0; _i < _arr.length; _i++) {
for (var _i = 0, _Object$keys = Object.keys(defaults); _i < _Object$keys.length; _i++) {
_loop();

@@ -150,0 +148,0 @@ }

@@ -36,3 +36,3 @@ "use strict";

var WEBGL2_CONTEXT_POLYFILLS = (_WEBGL2_CONTEXT_POLYF = {}, (0, _defineProperty2.default)(_WEBGL2_CONTEXT_POLYF, OES_vertex_array_object, {
var WEBGL2_CONTEXT_POLYFILLS = (_WEBGL2_CONTEXT_POLYF = {}, (0, _defineProperty2["default"])(_WEBGL2_CONTEXT_POLYF, OES_vertex_array_object, {
meta: {

@@ -42,3 +42,3 @@ suffix: 'OES'

createVertexArray: function createVertexArray() {
(0, _assert.default)(false, ERR_VAO_NOT_SUPPORTED);
(0, _assert["default"])(false, ERR_VAO_NOT_SUPPORTED);
},

@@ -50,3 +50,3 @@ deleteVertexArray: function deleteVertexArray() {},

}
}), (0, _defineProperty2.default)(_WEBGL2_CONTEXT_POLYF, ANGLE_instanced_arrays, {
}), (0, _defineProperty2["default"])(_WEBGL2_CONTEXT_POLYF, ANGLE_instanced_arrays, {
meta: {

@@ -56,7 +56,7 @@ suffix: 'ANGLE'

vertexAttribDivisor: function vertexAttribDivisor(location, divisor) {
(0, _assert.default)(divisor === 0, 'WebGL instanced rendering not supported');
(0, _assert["default"])(divisor === 0, 'WebGL instanced rendering not supported');
},
drawElementsInstanced: function drawElementsInstanced() {},
drawArraysInstanced: function drawArraysInstanced() {}
}), (0, _defineProperty2.default)(_WEBGL2_CONTEXT_POLYF, WEBGL_draw_buffers, {
}), (0, _defineProperty2["default"])(_WEBGL2_CONTEXT_POLYF, WEBGL_draw_buffers, {
meta: {

@@ -66,5 +66,5 @@ suffix: 'WEBGL'

drawBuffers: function drawBuffers() {
(0, _assert.default)(false);
(0, _assert["default"])(false);
}
}), (0, _defineProperty2.default)(_WEBGL2_CONTEXT_POLYF, EXT_disjoint_timer_query, {
}), (0, _defineProperty2["default"])(_WEBGL2_CONTEXT_POLYF, EXT_disjoint_timer_query, {
meta: {

@@ -74,9 +74,9 @@ suffix: 'EXT'

createQuery: function createQuery() {
(0, _assert.default)(false);
(0, _assert["default"])(false);
},
deleteQuery: function deleteQuery() {
(0, _assert.default)(false);
(0, _assert["default"])(false);
},
beginQuery: function beginQuery() {
(0, _assert.default)(false);
(0, _assert["default"])(false);
},

@@ -83,0 +83,0 @@ endQuery: function endQuery() {},

@@ -31,19 +31,19 @@ "use strict";

var WEBGL_PARAMETERS = (_WEBGL_PARAMETERS = {}, (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 3074, function (gl) {
var WEBGL_PARAMETERS = (_WEBGL_PARAMETERS = {}, (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 3074, function (gl) {
return !isWebGL2(gl) ? 36064 : undefined;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, GL_FRAGMENT_SHADER_DERIVATIVE_HINT, function (gl) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, GL_FRAGMENT_SHADER_DERIVATIVE_HINT, function (gl) {
return !isWebGL2(gl) ? GL_DONT_CARE : undefined;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35977, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 32937, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, GL_GPU_DISJOINT_EXT, function (gl, getParameter) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35977, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 32937, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, GL_GPU_DISJOINT_EXT, function (gl, getParameter) {
var ext = isWebGL2(gl) ? gl.getExtension(EXT_disjoint_timer_query_webgl2) : gl.getExtension(EXT_disjoint_timer_query);
return ext && ext.GPU_DISJOINT_EXT ? getParameter(ext.GPU_DISJOINT_EXT) : 0;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, GL_UNMASKED_VENDOR_WEBGL, function (gl, getParameter) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, GL_UNMASKED_VENDOR_WEBGL, function (gl, getParameter) {
var ext = gl.getExtension(WEBGL_debug_renderer_info);
return getParameter(ext && ext.UNMASKED_VENDOR_WEBGL || 7936);
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, GL_UNMASKED_RENDERER_WEBGL, function (gl, getParameter) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, GL_UNMASKED_RENDERER_WEBGL, function (gl, getParameter) {
var ext = gl.getExtension(WEBGL_debug_renderer_info);
return getParameter(ext && ext.UNMASKED_RENDERER_WEBGL || 7937);
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, function (gl, getParameter) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, function (gl, getParameter) {
var ext = gl.luma.extensions[EXT_texture_filter_anisotropic];
return ext ? getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 1.0;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 32883, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35071, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 37447, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 36063, function (gl, getParameter) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 32883, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35071, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 37447, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 36063, function (gl, getParameter) {
if (!isWebGL2(gl)) {

@@ -55,3 +55,3 @@ var ext = gl.getExtension(WEBGL_draw_buffers);

return undefined;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35379, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35374, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35377, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 34852, function (gl) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35379, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35374, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35377, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 34852, function (gl) {
if (!isWebGL2(gl)) {

@@ -63,9 +63,9 @@ var ext = gl.getExtension(WEBGL_draw_buffers);

return undefined;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 36203, function (gl) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 36203, function (gl) {
return gl.getExtension(OES_element_index) ? 2147483647 : 65535;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 33001, function (gl) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 33001, function (gl) {
return gl.getExtension(OES_element_index) ? 16777216 : 65535;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 33000, function (gl) {
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 33000, function (gl) {
return 16777216;
}), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 37157, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35373, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35657, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 36183, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 37137, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 34045, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35978, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35979, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35968, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35376, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35375, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35659, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 37154, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35371, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35658, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35076, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35077, getWebGL2ValueOrZero), (0, _defineProperty2.default)(_WEBGL_PARAMETERS, 35380, getWebGL2ValueOrZero), _WEBGL_PARAMETERS);
}), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 37157, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35373, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35657, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 36183, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 37137, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 34045, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35978, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35979, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35968, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35376, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35375, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35659, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 37154, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35371, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35658, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35076, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35077, getWebGL2ValueOrZero), (0, _defineProperty2["default"])(_WEBGL_PARAMETERS, 35380, getWebGL2ValueOrZero), _WEBGL_PARAMETERS);

@@ -72,0 +72,0 @@ function isWebGL2(gl) {

@@ -30,6 +30,5 @@ import assert from './assert';

function installOverrides(gl, {
target,
target2
}) {
function installOverrides(gl, _ref) {
let target = _ref.target,
target2 = _ref.target2;
Object.keys(WEBGL2_CONTEXT_OVERRIDES).forEach(key => {

@@ -57,7 +56,6 @@ if (typeof WEBGL2_CONTEXT_OVERRIDES[key] === 'function') {

function polyfillExtension(gl, {
extension,
target,
target2
}) {
function polyfillExtension(gl, _ref2) {
let extension = _ref2.extension,
target = _ref2.target,
target2 = _ref2.target2;
const defaults = WEBGL2_CONTEXT_POLYFILLS[extension];

@@ -72,7 +70,9 @@ assert(defaults);

for (const key of Object.keys(defaults)) {
const extKey = `${key}${suffix}`;
const extKey = "".concat(key).concat(suffix);
let polyfill = null;
if (key === 'meta') {} else if (typeof gl[key] === 'function') {} else if (ext && typeof ext[extKey] === 'function') {
polyfill = (...args) => ext[extKey](...args);
polyfill = function polyfill() {
return ext[extKey](...arguments);
};
} else if (typeof defaults[key] === 'function') {

@@ -79,0 +79,0 @@ polyfill = defaults[key].bind(target);

@@ -38,4 +38,4 @@ import assert from './assert';

try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
_iterator["return"]();
}

@@ -85,4 +85,4 @@ } finally {

try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
if (!_iteratorNormalCompletion2 && _iterator2["return"] != null) {
_iterator2["return"]();
}

@@ -109,6 +109,4 @@ } finally {

var _arr = Object.keys(defaults);
var _loop = function _loop() {
var key = _arr[_i];
var key = _Object$keys[_i];
var extKey = "".concat(key).concat(suffix);

@@ -131,3 +129,3 @@ var polyfill = null;

for (var _i = 0; _i < _arr.length; _i++) {
for (var _i = 0, _Object$keys = Object.keys(defaults); _i < _Object$keys.length; _i++) {
_loop();

@@ -134,0 +132,0 @@ }

{
"name": "@luma.gl/webgl2-polyfill",
"version": "7.0.0-beta.9",
"version": "7.0.0-rc.1",
"description": "WebGL2 API Polyfills for WebGL1 WebGLRenderingContext",

@@ -23,7 +23,10 @@ "license": "MIT",

],
"scripts": {},
"scripts": {
"pre-build": "npm run build-bundle && npm run build-bundle -- --env.dev",
"build-bundle": "webpack --display=minimal --config ../../scripts/bundle.config.js"
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@luma.gl/constants": "7.0.0-beta.9"
"@luma.gl/constants": "7.0.0-rc.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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