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

fragment-shader

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fragment-shader - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

css/editor.css

11

classes/Editor.ts

@@ -13,3 +13,3 @@ import Shader, { type UniformValue } from './Shader';

import { DEFAULT_FRAGMENT_SHADER, DEFAULT_UNIFORMS } from '../constants/shader';
import styles from '../css/codemirror.css?inline';
import '../css/editor.css';

@@ -126,2 +126,9 @@ export interface EditorConfig {

if (
this.config.width !== window.innerWidth ||
this.config.height !== window.innerHeight
) {
this.config.fillViewport = false;
}
const { target, shader, uniforms }: any = this.config;

@@ -132,4 +139,2 @@

createStyleSheet(styles);
this.container = document.createElement('section');

@@ -136,0 +141,0 @@ this.container.classList.add('editor');

@@ -57,2 +57,10 @@ export const k_hue = /*glsl*/ `

export const k_uv = /* glsl */ `
vec2 k_uv (vec4 fragCoord) {
vec2 uv = -1. + 2. * fragCoord.xy / resolution.xy;
uv.x *= resolution.x / resolution.y;
return uv;
}
`;
export const RAW_UTILS = {

@@ -65,2 +73,3 @@ k_hue,

k_swap,
k_uv,
} as any;

@@ -67,0 +76,0 @@

@@ -11,4 +11,3 @@ export const DEFAULT_VERTEX_SHADER = /*glsl*/ `

void main () {
vec2 uv = -1. + 2. * gl_FragCoord.xy / resolution.xy;
uv.x *= resolution.x / resolution.y;
vec2 uv = k_uv(gl_FragCoord);

@@ -15,0 +14,0 @@ float r = sin(uv.x + time);

{
"name": "fragment-shader",
"version": "0.1.2",
"version": "0.1.3",
"description": "A lightweight, performant WebGL fragment shader renderer + editor. ",

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

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