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

@hscmap/gl-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hscmap/gl-wrapper - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

1

lib/attrib_list.d.ts

@@ -21,2 +21,3 @@ import { Program } from './program';

private usage;
private bufferSize;
vertexCount: number;

@@ -23,0 +24,0 @@ constructor(gl: WebGLRenderingContext, data?: DataOption);

10

lib/attrib_list.js

@@ -7,2 +7,4 @@ "use strict";

this.gl = gl;
this.usage = -1;
this.bufferSize = -1;
this.vertexCount = 0;

@@ -34,5 +36,7 @@ this.bufferName = glUtils.nonNull(gl.createBuffer());

if (array) {
var vertexCount = byteLength(array) / this.stride;
this.vertexCount = byteLength(array) / this.stride;
this.gl.bindBuffer(this.gl.ARRAY_BUFFER, this.bufferName);
if (usage != this.usage || this.vertexCount != vertexCount) {
if (usage != this.usage || this.bufferSize < this.vertexCount) {
this.usage = usage;
this.bufferSize = this.vertexCount;
this.gl.bufferData(this.gl.ARRAY_BUFFER, array, usage);

@@ -44,4 +48,2 @@ }

this.gl.bindBuffer(this.gl.ARRAY_BUFFER, null);
this.usage = usage;
this.vertexCount = vertexCount;
if (this.vertexCount % 1 !== 0) {

@@ -48,0 +50,0 @@ throw "nComponents may be invalid";

{
"name": "@hscmap/gl-wrapper",
"version": "0.4.1",
"version": "0.4.2",
"main": "./lib/index.js",

@@ -5,0 +5,0 @@ "types": "./lib/index.d.ts",

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