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.6.1 to 0.6.2

4

lib/texture.d.ts
export declare type ImageLike = HTMLImageElement | HTMLCanvasElement | ImageData;
export declare class Texture {
private gl;
private name;
constructor(gl: WebGLRenderingContext);
readonly name: WebGLTexture;
constructor(gl: WebGLRenderingContext, parameterSetter?: (gl: WebGLRenderingContext) => void);
release(): void;

@@ -7,0 +7,0 @@ bind(cb: () => void): void;

@@ -5,12 +5,7 @@ "use strict";

var Texture = (function () {
function Texture(gl) {
function Texture(gl, parameterSetter) {
var _this = this;
this.gl = gl;
this.name = glUtils.nonNull(gl.createTexture());
this.bind(function () {
gl.texParameteri(_this.gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(_this.gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(_this.gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(_this.gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
});
this.bind(function () { return (parameterSetter || defaultParameterSetter)(_this.gl); });
}

@@ -34,1 +29,7 @@ Texture.prototype.release = function () {

exports.Texture = Texture;
function defaultParameterSetter(gl) {
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
}
{
"name": "@hscmap/gl-wrapper",
"version": "0.6.1",
"version": "0.6.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