New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ogl

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ogl - npm Package Compare versions

Comparing version 0.0.26 to 0.0.27

2

package.json
{
"name": "ogl",
"version": "0.0.26",
"version": "0.0.27",
"description": "WebGL Framework",

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

@@ -295,3 +295,3 @@ <p align="center">

- [ ] Reflections
- [ ] Shadow maps
- [x] Shadow maps
- [ ] Distortion (refraction)

@@ -298,0 +298,0 @@ - [x] Post Fluid Distortion

import pkg from './package.json';
export default [{
input: 'src/index.js',
output: [
{ file: pkg.browser, format: 'cjs' },
{ file: pkg.module, format: 'es' },
{ file: pkg.unpkg, format: 'umd', name: 'ogl' }
]
input: 'src/index.js',
output: [
{ file: pkg.browser, format: 'cjs' },
{ file: pkg.module, format: 'es' },
{ file: pkg.unpkg, format: 'umd', name: 'ogl' },
],
}];

@@ -31,8 +31,21 @@ import {Transform} from './Transform.js';

this.normalMatrix = new Mat3();
this.beforeRenderCallbacks = [];
this.afterRenderCallbacks = [];
}
onBeforeRender(f) {
this.beforeRenderCallbacks.push(f);
return this;
}
onAfterRender(f) {
this.afterRenderCallbacks.push(f);
return this;
}
draw({
camera,
} = {}) {
this.onBeforeRender && this.onBeforeRender({mesh: this, camera});
this.beforeRenderCallbacks.forEach(f => f && f({mesh: this, camera}));

@@ -72,4 +85,4 @@ // Set the matrix uniforms

this.onAfterRender && this.onAfterRender({mesh: this, camera});
this.afterRenderCallbacks.forEach(f => f && f({mesh: this, camera}));
}
}

@@ -29,2 +29,3 @@ // TODO: multi target rendering

this.height = height;
this.depth = depth;
this.buffer = this.gl.createFramebuffer();

@@ -55,10 +56,8 @@ this.target = target;

this.depthTexture = new Texture(gl, {
width, height, wrapS, wrapT,
width, height,
minFilter: this.gl.NEAREST,
magFilter: this.gl.NEAREST,
flipY: false,
format: this.gl.DEPTH_COMPONENT,
internalFormat: gl.renderer.isWebgl2 ? this.gl.DEPTH_COMPONENT24 : this.gl.DEPTH_COMPONENT,
internalFormat: gl.renderer.isWebgl2 ? this.gl.DEPTH_COMPONENT16 : this.gl.DEPTH_COMPONENT,
type: this.gl.UNSIGNED_INT,
generateMipmaps: false,
});

@@ -65,0 +64,0 @@ this.depthTexture.update();

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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