open-index/open-npm huggingface dataset:
npm package: @mgx/bicubic-interpolation
Description: Simple bicubic interpolation implemented as a WebGL2 shader
Author: Michael Langbein
Latest version: 0.1.3


<h1><img src="./logo.svg" width="30">@mgx/bicubic</h1>

Simple interpolation library that uses WebGL-2 to do bicubic interpolation.

## Installation
```
npm i @mgx/bicubic-interpolation
```

## Example usage: 

```js
import { GridPointProps, SplineRenderer } from '@mgx/bicubic-interpolation';
import { FeatureCollection, Point } from 'geojson';


const canvas = document.getElementById('canvas') as HTMLCanvasElement;

const demoData: FeatureCollection<Point, GridPointProps> = {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "properties": {
          "row": 1,
          "col": 1,
          "value": 12
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            56.953125,
            65.94647177615738
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "row": 1,
          "col": 2,
          "value": 14
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            73.47656249999999,
            66.08936427047088
          ]
        }
      },
  ...
      {
        "type": "Feature",
        "properties": {
          "row": 4,
          "col": 5,
          "value": 9
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            116.71874999999999,
            54.97761367069628
          ]
        }
      }
    ]
};

const sr = new SplineRenderer(canvas.getContext('webgl2'), demoData, [53.4375, 51.944264879028765, 119.53125, 68.13885164925573]);
sr.render();

```
npm package: @mgx/inverse-distance-interpolation
Description: Simple inverse-distance interpolation implemented as a WebGL shader
Author: Michael Langbein
Latest version: 0.1.8

<h1><img src="https://raw.githubusercontent.com/MichaelLangbein/mgx/main/logo.svg" width="30">@mgx/inverse-distance-interpolation</h1>

Inverse distance interpolation between GeoJSON points using WebGL.

<img src="https://raw.githubusercontent.com/MichaelLangbein/mgx/main/inverse-distance/example.png" width="200">

## Installation

```
npm i @mgx/inverse-distance-interpolation
```


## Example usage:

```js
import { InterpolationRenderer } from '../src/inverseDistance_2steps';
import { InterpolationValue, ColorRamp } from '../src/interfaces';
import { FeatureCollection, Point } from 'geojson';


const canvas = document.getElementById('canvas') as HTMLCanvasElement;

const demoData: FeatureCollection<Point, InterpolationValue> = {
    "type": "FeatureCollection",
    "features": [
      {
        "type": "Feature",
        "properties": {
          "value": 12
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            56.953125,
            65.94647177615738
          ]
        }
      },
...
      {
        "type": "Feature",
        "properties": {
          "value": 9
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            116.71874999999999,
            54.97761367069628
          ]
        }
      }
    ]
};




const power = 2.0;
const smooth = true;
const maxEdgeLength = 20;
const storeIntp = false;
const colorRamp: ColorRamp = [
    {val: 3.0, rgb: [252,141,89]},
    {val: 11.0, rgb: [255,255,191]},
    {val: 20.0, rgb: [153,213,148]}
]

const cs = new InterpolationRenderer(
    canvas.getContext('webgl', {preserveDrawingBuffer: true}),
    demoData, power, smooth, maxEdgeLength, colorRamp, storeIntp
);

cs.render();

```