open-index/open-npm huggingface dataset:
npm package: @infra7/glsl
Description: Useful tools for GLSL.
Author: Vincent Wang
Latest version: 1.0.9

# @infra7/glsl

Useful tools for GLSL.

## Example

[Online Demo](https://infra7.vercel.app/static/examples/demo_glsl_extract.html)

## Installation

```ts
$ npm i -S @infra7/glsl
```

## API

### ExtractParams(source: string): ExtractResult;

```ts
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

![](https://infra7.vercel.app/static/images/glsl/extract-params.webp)
npm package: @infra7/glsl-extract
Description: A GLSL parameters extractor.
Author: Vincent Wang
Latest version: 1.0.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @infra7/glsl-extract

A GLSL parameters extractor.

## Example

[Online Demo](https://infra7.vercel.app/static/examples/demo_glsl_extract.html)

## Installation

```ts
$ npm i -S @infra7/glsl-extract
```

## API

### ExtractGLSL(source: string): Result;

```ts
interface Item {
  name: string;
  type: string;
}

interface Result {
  uniform:   Item[];
  attribute: Item[];
  varying:   Item[];
  in:        Item[];
  out:       Item[];
}
```

#### Example

```ts
import { ExtractGLSL } 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 = ExtractGLSL(source);
```

#### Result

![](https://infra7.vercel.app/static/images/glsl-extract/glsl-extract.webp)
npm package: @infra7/hash
Description: A series of classic non-encrypted hash methods.
Author: Vincent Wang
Latest version: 1.0.1

# @infra7/hash

A series of classic non-encrypted hash methods.

## Installation

```ts
$ npm i -S @infra7/hash
```

## Examples

```ts
import { StringHash } from '@infra7/hash';

const hash = StringHash('Hello World');
```
npm package: @infra7/lowgl
Description: A lightweight, object-oriented WebGL wrapper that provides a streamlined and efficient interface for building high-performance 2D and 3D graphics applications in the browser. Designed with a focus on simplicity and optimization.
Author: Vincent Wang
Latest version: 1.0.11

# @infra7/lowgl

A lightweight, object-oriented WebGL wrapper that provides a streamlined and efficient interface for building high-performance 2D and 3D graphics applications in the browser. Designed with a focus on simplicity and optimization.

## Installation

```ts
$ npm i -S @infra7/lowgl
```

## Examples

```ts
import { GLContext } from '@infra7/lowgl';

const vert = `
precision highp float;
attribute vec2 apos;
void main() {
  gl_Position = vec4(apos, 0.0, 1.0);
}`;

const frag = `
precision highp float;
varying vec4 outColor;
uniform vec4 ucolor;
void main() {
  gl_FragColor = ucolor;
}`;

const vertices = new Float32Array([
  -0.5,  0.5,
   0.5,  0.5,
   0.5, -0.5,
  -0.5,  0.5,
   0.5, -0.5,
  -0.5, -0.5,
]);

const canvas = document.getElementById('canvas') as HTMLCanvasElement;
const dpr = window.devicePixelRatio;
canvas.width = canvas.clientWidth * dpr;
canvas.height = canvas.clientHeight * dpr;

const ctx = new GLContext(canvas, { antialias: true });
const buffer = ctx.createVertexBuffer(vertices);
const program = ctx.createProgramFromSource(vert, frag);

const loop = () => {
  program.setAttrib('apos', buffer);
  program.setUniform('ucolor', [0, 0, 1, 1]);
  program.drawArrays('TRIANGLES', 0, 6);
  requestAnimationFrame(loop);
}

loop();
```
npm package: @infra7/mat3
Description: 3x3 Matrix Class
Author: Vincent Wang
Latest version: 1.0.8

# @infra7/mat3

3x3 Matrix Class

## Installation

```ts
$ npm i -S @infra7/mat3
```

## Examples

```ts
import { Mat3 } from 'mat3';

const mat = Mat3.Multiply([
  Mat3.FromScaling([2, 1], [100, 50]),
  Mat3.FromRotation(Math.PI / 2, [100, 50]),
]);

mat.mul(Mat3.FromTranslation([-100, 100]));
mat.mulLeft(Mat3.FromTranslation([100, -100]));

mat.transpose();
mat.invert();

console.log(mat.data);
```
npm package: @infra7/matrix
Description: High performance matrix and vector library.
Author: Vincent Wang
Latest version: 1.0.10

# @infra7/matrix

High performance matrix and vector library.

## Installation

```ts
$ npm i -S @infra7/matrix
```

## Examples

```ts
import { Mat3 } from 'mat3';

const mat = Mat3.Multiply([
  Mat3.FromScaling([2, 1], [100, 50]),
  Mat3.FromRotation(Math.PI / 2, [100, 50]),
]);

mat.mul(Mat3.FromTranslation([-100, 100]));
mat.mulLeft(Mat3.FromTranslation([100, -100]));

mat.transpose();
mat.invert();

console.log(mat.data);
```
npm package: @infra7/vec2
Description: 2 Dimensional Vector Class
Author: Vincent Wang
Latest version: 1.0.3

# @infra7/vec2

2 Dimensional Vector Class

## Installation

```ts
$ npm i -S @infra7/vec2
```

## Examples

```ts
import { Mat3 } from '@infra7/mat3';
import { Vec2 } from '@infra7/vec2';

const vec = new Vec2(100, 100);
vec.transform(Mat3.Rotation(Math.PI / 4), [50, 50]);
```
npm package: @infracia/razorpay
Description: razorpay api wrapper for nodejs
Author: Vijay Meena
Latest version: 2.0.2

# @infracia/razorpay

This is a powerful Node.js library that makes it easy to interact with the Razorpay API.

# Example

```ts
import Razorpay from "@infracia/razorpay";

// create global instance
const razorpay = new Razorpay({
  keyId: "REPLACE_WITH_API_KEY_ID",
  keySecret: "REPLACE_WITH_API_KEY_SECRET",
});

// get all orders
const orders = await razorpay.order.getAll();
console.log(orders);
```

# ☎️ Need help?

- Open a GitHub issue