1.0.9 • Published 1 year ago

@infra7/glsl v1.0.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@infra7/glsl

Useful tools for GLSL.

Example

Online Demo

Installation

$ npm i -S @infra7/glsl

API

ExtractParams(source: string): ExtractResult;

import { ExtractParams } from '.';

const source = `
precision highp float;

attribute vec2 aPosition;
attribute vec4 aColor;
varying   vec4 vColor;

uniform   mat3 uViewMatrix;
uniform   mat3 uLocalMatrix;

void main() {
  vColor = aColor;
  vec3 coord = uViewMatrix * uLocalMatrix * vec3(aPosition, 1.0);
  gl_Position = vec4(coord.xy, 0.0, 1.0);
}
`;

const result = ExtractParams(source);

Result

npm.io

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago