open-index/open-npm huggingface dataset:
npm package: @fantasmagor/group-array-elements
Description: Simply package to split arrays into equal chunks
Author: Arkadiusz Jablonski
Latest version: 0.0.2

# group-array-elements

### Simply package to split arrays into equal chunks

## Installation

```bash 
$npm install @fantasmagor/group-array-elements
```

## Usage

```js
const groupArrayElements = require('group-array-elements');

const resultedArray = groupArrayElements(array, partSize)
```

## Tests

To run the test suite, install the dependencies, then run `npm test`:

```bash
$ npm install
$ npm test
```

## License

[MIT](LICENSE)
npm package: @fantasticmrdavid/emoji-mart-react
Description: React wrapper for Emoji Mart; the emoji picker for the web.
Latest version: 1.1.1-e

# `@emoji-mart/react`

A React wrapper for [EmojiMart](https://missiveapp.com/open/emoji-mart).

## 🧑‍💻 Usage
```sh
npm install --save emoji-mart @emoji-mart/data @emoji-mart/react
```

```js
import data from '@emoji-mart/data'
import Picker from '@emoji-mart/react'

function App() {
  return (
    <Picker data={data} onEmojiSelect={console.log} />
  )
}
```

## 📚 Documentation
See https://github.com/missive/emoji-mart#react
npm package: @fantasticswap/usedapp
Description: ### Ethereum 🤝 React Framework for rapid Dapp development. Simple. Robust. Extendable. Testable.
Latest version: 0.0.1

# useDapp

### Ethereum 🤝 React 
Framework for rapid Dapp development.  
Simple. Robust. Extendable. Testable.

## About
Introduces great features:
- 🏗️ **React hooks** - Uses React hooks as your primary building ingredient
- 🚅 **Auto refresh** - Refreshes on a new block, wallet change or network change
- 🛒 **Multicall** - Combines multiple blockchain calls into a single multicall

Combines the best practices:
- 🔧 **Modern stack** - Employs [ethers.js](https://github.com/ethers-io/), [multicall](https://github.com/makerdao/multicall) & [waffle](https://getwaffle.io/)
- 📚 **Extendability** - Extends easily with custom hooks
- 💡 **Testability** - Simple integration tests for UI and blockchain


## Example

```tsx
import { Mainnet } from '@usedapp/core/modal/chain/ethereum'
import { useEthers, useEtherBalance } from '@usedapp/core'

const config = {
  readOnlyChainId: Mainnet.chainId,
  readOnlyUrls: {
    [Mainnet.chainId]: 'https://mainnet.infura.io/v3/62687d1a985d4508b2b7a24827551934',
  },
}

ReactDOM.render(
  <DAppProvider config={config}>
    <App />
  </DAppProvider>,
  document.getElementById('root')
)

const STAKING_CONTRACT = '0x00000000219ab540356cBB839Cbe05303d7705Fa'

export function App() {
  const { activateBrowserWallet, deactivate, account } = useEthers()
  const userBalance = useEtherBalance(account)
  const stakingBalance = useEtherBalance(STAKING_CONTRACT)

  return (
    <div>
      {!account && <button onClick={activateBrowserWallet}> Connect </button>}
      {account && <button onClick={deactivate}> Disconnect </button>}
      {stakingBalance && <p>ETH2 staking balance: {formatEther(stakingBalance)} ETH </p>}
      {account && <p>Account: {account}</p>}
      {userBalance && <p>Ether balance: {formatEther(userBalance)} ETH </p>}
    </div>
  )
}
```

See application [here](https://example.usedapp.io/balance).


## Documentation
For detailed feature walkthrough checkout [documentation](https://usedapp.readthedocs.io/en/latest/).

## Contributing

Contributions are always welcome, no matter how large or small. Before contributing, please read the [code of conduct](https://github.com/EthWorks/useDapp/blob/master/CODE_OF_CONDUCT.md) and [contribution policy](https://github.com/EthWorks/useDapp/blob/master/CONTRIBUTION.md).

### Before you issue pull request:

* Make sure all tests pass.
* Make sure linter passes.
* Make sure you have test coverage for any new features.

To install dependencies type:
```sh
yarn
```

To build project:
```sh
yarn build
```

To run tests type:
```sh
yarn test
```

To run linter type:
```sh
yarn lint
```

### Building documentation

[Install Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html) to build documentation:

```sh
cd docs
make html
```

Before building documentation for the first time you may have to install required python packages:
```sh
pip3 install -r docs/requirements.txt
```

## License

useDapp is released under the [MIT License](https://opensource.org/licenses/MIT).
npm package: @fantasy-color/contrast-ratio-luminance
Description: Calculate the contrast ratio of two relative luminances
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/contrast-ratio-luminance

Calculate the [contrast ratio](../#contrast-ratio) between two [relative luminances](../#relative-luminance)

```typescript
type contrastRatioLuminance = (luminance1: number, luminance2: number) => number
```

Example usage:

```javascript
import contrastRatioLuminance from '@fantasy-color/contrast-ratio-luminance'

contrastRatioLuminance(0.5, 0.8)
// > 1.5454545454545454
```
npm package: @fantasy-color/contrast-ratio-rgb
Description: Calculate contrast ratio based on RGB input
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/contrast-ratio-rgb

Calculate the [contrast ratio](../#contrast-ratio) between two `RGB` objects.

```typescript
type contrastRatioLuminance = (rgb1: RGB, rgb2: RGB) => number
```

Example usage:

```javascript
import contrastRatioRgb from '@fantasy-color/contrast-ratio-rgb'

contrastRatioRgb(
  { red: 255, green: 0, blue: 0 },
  { red: 0, green: 0, blue: 255 }
)
// > 2.148936170212766
```
npm package: @fantasy-color/from-hex
Description: Parse HEX CSS strings into RGB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/from-hex

Parse a CSS HEX string into a `RGB` object.

```typescript
type fromHex = (hex: string) => RGB
```

Example usage:

```javascript
import fromHex from '@fantasy-color/from-hex'

fromHex('#FFFF00')
// { red: 255, green: 255, blue: 0 }
```
npm package: @fantasy-color/from-rgba
Description: Parse RGBA CSS strings into RGBA objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/from-rgba

Parse a CSS RGBA string into a `RGBA` object.

```typescript
type fromRgba = (rgb: string) => RGBA
```

Example usage:

```javascript
import fromRgba from '@fantasy-color/from-rgba'

fromRgba('rgb(0, 250, 10, 0.6)')
// { red: 0, green: 250, blue: 10, alpha: 0.6 }
```
npm package: @fantasy-color/hcl-to-lab
Description: Transform HCL objects to LAB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/hcl-to-lab

Transform a `HCL` color object to a `LAB` color object.

```typescript
type hclToLab = (color: HCL) => LAB
```

Example usage:

```javascript
import hclToLab from '@fantasy-color/hcl-to-lab'

hclToLab({
  hue: 40.85261277607024,
  chroma: 106.83899941284552,
  luminance: 54.29173376861782
})
// { luminance: 54.29173376861782, a: 80.8124553179771, b: 69.88504032350531 }
```
npm package: @fantasy-color/hcl-to-rgb
Description: Transform HCL objects to RGB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/hcl-to-rgb

Transform a `HCL` color object to a `RGB` color object.

```typescript
type hclToRgb = (color: HCL) => RGB
```

Example usage:

```javascript
import hclToRgb from '@fantasy-color/hcl-to-rgb'

hclToRgb({
  hue: 40.85261277607024,
  chroma: 106.83899941284552,
  luminance: 54.29173376861782
})
// { red: 255, green: 0, blue: 0 }
```

Note that this transformation can yield results where the values of the colors are outside the 0-255 boundary. So for example, dark red:

```javascript
import hclToRgb from '@fantasy-color/hcl-to-rgb'

hclToRgb({
  hue: 40.85261277607024,
  chroma: 106.83899941284552,
  luminance: 24.29173376861782
})
// { red: 157, green: -147, blue: -70 }
```

…yields `-147` for `green` and `-70` for `blue`. These are **valid CSS values**:

> Colors outside the sRGB gamut can be specified in Cascading Style Sheets by making one or more of the red, green and blue components negative or greater than 100%, so the color space is theoretically an unbounded extrapolation of sRGB similar to scRGB.

> https://en.wikipedia.org/wiki/Web_colors

They will just get clipped to the range 0-255. The color specified above will be represented by the browser as:

```javascript
const color = { red: 157, green: 0, blue: 0 }
```
npm package: @fantasy-color/hsv-to-hsva
Description: Transform HSV objects to HSVA objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/hsv-to-hsva

Transform a `HSV` color object to a `HSVA` color object.

```typescript
type hsvToHsva = (color: HSV) => HSVA
```

Example usage:

```javascript
import hsvToHsva from '@fantasy-color/hsv-to-hsva'

hsvToHsva({
  hue: 60,
  saturation: 32,
  value: 23
})
// { hue: 60, saturation: 32, value: 23, alpha: 1 }
```
npm package: @fantasy-color/hsva-to-hsv
Description: Transform HSVA objects to HSV objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/hsva-to-hsv

Transform a `HSVA` color object to a `HSV` color object.

```typescript
type hsvaToHsv = (color: HSVA) => HSV
```

Example usage:

```javascript
import hsvaToHsv from '@fantasy-color/hsva-to-hsv'

hsvaToHsv({
  hue: 60,
  saturation: 32,
  value: 23,
  alpha: 1
})
// { hue: 60, saturation: 32, value: 23 }
```
npm package: @fantasy-color/hsva-to-rgba
Description: Transform HSV objects to RGB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/hsva-to-rgba

Transform a `HSVA` color object to a `RGBA` color object.

```typescript
type hsvaToRgba = (color: HSVA) => RGBA
```

Example usage:

```javascript
import hsvaToRgba from '@fantasy-color/hsva-to-rgba'

hsvaToRgba({
  hue: 180,
  saturation: 100,
  value: 100,
  alpha: 0.6
})
// { red: 0, green: 255, blue: 255, alpha: 0.6 }
```
npm package: @fantasy-color/invert-rgb
Description: Invert the RGB color object
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/invert-rgb

Invert the `RGB` color object.

```typescript
type invertRgb = (color: RGB) => RGB
```

Example usage:

```javascript
import invertRgb from '@fantasy-color/invert-rgb'

invertRgb({
  red: 60,
  green: 32,
  blue: 23
})
// { red: 195, green: 223, blue: 232 }
```
npm package: @fantasy-color/lab-to-hcl
Description: Transform LAB objects to HCL objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/lab-to-hcl

Transform a `LAB` color object to a `HCL` color object.

```typescript
type labToHcl = (color: LAB) => HCL
```

Example usage:

```javascript
import labToHcl from '@fantasy-color/lab-to-hcl'

labToHcl({
  luminance: 54.29173376861782,
  a: 80.8124553179771,
  b: 69.88504032350531
})
// { hue: 40.85261277607024, chroma: 106.83899941284552, luminance: 54.29173376861782 }
```
npm package: @fantasy-color/lab-to-rgb
Description: Transform LAB objects to RGB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/lab-to-rgb

Transform a `LAB` color object to a `RGB` color object.

```typescript
type labToRgb = (color: LAB) => RGB
```

Example usage:

```javascript
import labToRgb from '@fantasy-color/lab-to-rgb'

labToRgb({
  luminance: 29.567572863553245,
  a: 68.29865326565671,
  b: -112.02942991288025
})
// { red: 0, green: 0, blue: 255 }
```
npm package: @fantasy-color/luminance-for-contrast-ratio
Description: For a given contrast ratio and a relative luminance, give a relative luminance that will match this contrast ratio
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/luminance-for-contrast-ratio

Calculate the [contrast ratio](../#contrast-ratio) between two [relative luminances](../#relative-luminance)

```typescript
type luminanceForContrastRatio = (contrastRatio: number, luminance: number) => number
```

Example usage:

```javascript
import luminanceForContrastRatio from '@fantasy-color/luminance-for-contrast-ratio'

luminanceForContrastRatio(3, 0.8)
// > 0.2333333333333334
```
npm package: @fantasy-color/luminance-rgb
Description: For a given RGB color (coded as an RGB object), return its relative luminance
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/luminance-srgb

Calculate the [relative luminance](../#relative-luminance) of an `RGB` color, coded as [sRGB](../#why-srgb)

```typescript
type luminanceSrgb = (color: RGB) => number
```

Example usage:

```javascript
import luminanceSrgb from '@fantasy-color/luminance-srgb'

luminanceSrgb({
  red: 1,
  green: 0.27,
  blue: 0.2
})
// > 0.420144
```
npm package: @fantasy-color/map-color-space-polynomial
Description: Transform a three-tuple from one color space into another passing the coefficients and degree of the transformation
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/map-color-space-polynomial

Map a color—a three dimensional tuple—from one color space to another, using polynomials of three independent variables to calculate each new value. The coefficients and degree of the polynomials are provided as arguments.

## Usage

To use this function, the first step is to set up the coefficients and the degree of the polynomials.

In this example we are mapping the color from the standard L*a*b* to a variation of that space that was shifted so that all colors are slightly darker (useful for hover effects). The coefficients have been prepared for a polynomial of degree `2`.

```typescript
import { mapColorSpace } from '@fantasy-color/map-color-space-polynomial'

const coeffiecientsToMakeColorDarker = [
  [
    0.0028677056552058413,
    0.0002710888985503337,
    0.00030448981833043544,
    0.0004481466380241387,
    0.00002270969961606002,
    0.0001960549453038932,
    0.6781866204256397,
    -0.02179539063684411,
    -0.019592068432303808,
    1.1601847789138233,
  ],
  [
    -0.002093257907777501,
    0.000006010969931783787,
    -0.0003537230968659505,
    0.001442450208623714,
    0.0005974009953983765,
    -0.00015450114760720183,
    0.2841642502261257,
    0.8527281695672397,
    -0.023466271722765247,
    -8.08223975280506,
  ],
  [
    0.00023226214448834144,
    -0.00008760828343075633,
    -0.0003061844263532397,
    -0.0006035239404938528,
    0.0026425808332845874,
    0.00016252506133674548,
    -0.015621819880352397,
    0.06772075020928792,
    0.7716542598762682,
    -0.06925734380715776,
  ],
]

const mapLabToDarkerLab = (
  coeffiecientsToMakeColorDarker,
  2 // degree of the polynomials
)

mapLabToDarkerLab([60.16969588191749, 93.55002493980824, -60.498555897447304])
// [56.312232697106005, 88.206939784304, -56.340863699838685]
```

> Note that while this example is meant change colors within the "same" color space, given a degree high enough and sufficient coefficients, any color space transformation can be approximated in this way. The other color functions in the `@fantasy-color` library are not using this method under the hood because for those transformations, more efficient functions that do not rely on polynomial approximations are already know.

## Caveats

There is currently no provided way of getting the coefficients from input data. Functions to do that might be provided in the future.
npm package: @fantasy-color/normalize-rgb
Description: Transform from RGB objects from the 0-255 range to 0-1 decimal points
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/normalize-rgb

Turn an `RGB` color value from 0-255 to take a value from 0-1

```typescript
type normalizeRgb = (color: RGB) => RGB
```

Example usage:

```javascript
import normalizeRgb from '@fantasy-color/normalize-rgb'

normalizeRgb({
  red: 255,
  green: 70,
  blue: 50
})
// > { red: 1, green: 0.27450980392156865, blue: 0.19607843137254902 }
```
npm package: @fantasy-color/normalize-rgba
Description: Transform from RGBA objects from the 0-255 range to 0.1 decimal points
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/normalize-rgba

Turn an `RGBA` color value from 0-255 to take a value from 0-1

```typescript
type normalizeRgba = (color: RGBA) => RGBA
```

Example usage:

```javascript
import normalizeRgba from '@fantasy-color/normalize-rgba'

normalizeRgba({
  red: 255,
  green: 70,
  blue: 50,
  alpha: 0.3
})
// > { red: 1, green: 0.27450980392156865, blue: 0.19607843137254902, alpha: 0.3 }
```
npm package: @fantasy-color/rgb-to-hcl
Description: Transform RGB objects to HCL objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgb-to-hcl

Transform a `RGB` color object to a `HCL` color object.

```typescript
type rgbToHcl = (color: RGB) => HCL
```

Example usage:

```javascript
import rgbToHcl from '@fantasy-color/rgb-to-hcl'

rgbToHcl({
  red: 60,
  green: 32,
  blue: 23
})
// { hue: 42.99820879411349, chroma: 17.893501433259868, luminance: 15.966897718378611 }
```
npm package: @fantasy-color/rgb-to-hsv
Description: Transform RGB objects to HSV objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgb-to-hsv

Transform a `RGB` color object to a `HSV` color object.

```typescript
type rgbToHsv = (color: RGB) => HSV
```

Example usage:

```javascript
import rgbToHsv from '@fantasy-color/rgb-to-hsv'

rgbToHsv({
  red: 60,
  green: 32,
  blue: 23
})
// { hue: 15, saturation: 62, value: 24 }
```
npm package: @fantasy-color/rgb-to-lab
Description: Transform RGB objects to LAB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgb-to-lab

Transform a `RGB` color object to a `LAB` color object.

```typescript
type rgbToLab = (color: RGB) => LAB
```

Example usage:

```javascript
import rgbToLab from '@fantasy-color/rgb-to-lab'

rgbToLab({
  red: 60,
  green: 32,
  blue: 23
})
// { luminance: 15.966897718378611, a: 13.086860007892998, b: 12.202929512042749 }
```
npm package: @fantasy-color/rgb-to-rgba
Description: Transform RGB objects to RGBA objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgb-to-rgba

Transform a `RGB` color object to a `RGBA` color object.

```typescript
type rgbToRgba = (color: RGB) => RGBA
```

Example usage:

```javascript
import rgbToRgba from '@fantasy-color/rgb-to-rgba'

rgbToRgba({
  red: 60,
  green: 32,
  blue: 23
})
// { red: 60, green: 32, blue: 23, alpha: 1 }
```
npm package: @fantasy-color/rgb-to-srgb
Description: Transform RGB objects to sRGB objects (coded in the RGB type)
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgb-to-srgb

Transform a `RGB` color object from the RGB space in 0-255 to the sRGB color space. The object output type is still RGB

```typescript
type rgbToSrgb = (color: RGB) => RGB
```

Example usage:

```javascript
import rgbToSrgb from '@fantasy-color/rgb-to-srgb'

rgbToSrgb({
  red: 78,
  green: 63,
  blue: 22,
})
// { red: 0.07618538148130785, green: 0.04970656598412723, blue: 0.008023192985384994 }
```
npm package: @fantasy-color/rgba-to-hsva
Description: Transform RGBA objects to HSVA objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgba-to-hsva

Transform a `RGBA` color object to a `HSVA` color object.

```typescript
type rgbaToHsva = (color: RGBA) => HSVA
```

Example usage:

```javascript
import rgbaToHsva from '@fantasy-color/rgba-to-hsva'

rgbaToHsva({
  red: 60,
  green: 32,
  blue: 23,
  alpha: 0.5
})
// { hue: 15, saturation: 62, value: 24, alpha: 0.5 }
```
npm package: @fantasy-color/rgba-to-rgb
Description: Transform RGBA objects to RGB objects
Author: Fernando Via Canel
Latest version: 2.1.0

# @fantasy-color/rgba-to-rgb

Transform a `RGBA` color object to a `RGB` color object.

```typescript
type rgbaToRgb = (color: RGBA) => RGB
```

Example usage:

```javascript
import rgbaToRgb from '@fantasy-color/rgba-to-rgb'

rgbaToRgb({
  red: 60,
  green: 32,
  blue: 23,
  alpha: 0.2
})
// { red: 60, green: 32, blue: 23 }
```
npm package: @fantasy3d/addons
Description: The addons package of 'Fantasy 3D'
Latest version: 0.2.0

# @fantasy3d/addons

<div align=center>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-1.png?raw=true" width=256 height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-2.png?raw=true" width=256 height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-3.png?raw=true" width=256, height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-4.png?raw=true" width=256 height=256>
</div>

The addons package of **Fantasy 3D**.

> [Fantasy 3D](https://fantasy3d.cn) is a **web-first** real-time interactive 3d visualization framework base on [three.js](https://threejs.org). Use **ECS(Entity-Component-System)** design and easy to use and light weight.Can be used to develop **digital twins**, **digital city**, **digital factory**, **3D GIS**, ect.

## Installation

install
```bash
npm install @fantasy3d/addons
```

import
```ts
import { OrbitController } from '@fantasy3d/addons';
```

## Links

- [Official Site](https://fantasy3d.cn)
- [Examples](https://fantasy3d.cn/examples/fantasy3d/examples.html)
- [Guide](https://fantasy3d.cn/guide/)
- [API](https://fantasy3d.cn/api/index.html)
- [Three.js](https://threejs.org)
npm package: @fantasy3d/core
Description: The core package of 'Fantasy 3D'
Latest version: 0.2.1

# @fantasy3d/core

[![logo](https://raw.githubusercontent.com/fantasy3d/.github/main/images/fantasy3d.jpg)](https://www.fantasy3d.cn)

The core package of **Fantasy 3D**.

> [Fantasy 3D](https://fantasy3d.cn) is a **web-first** real-time interactive 3d visualization framework base on [three.js](https://threejs.org). Use **ECS(Entity-Component-System)** design and easy to use and light weight.Can be used to develop **digital twins**, **digital city**, **digital factory**, **3D GIS**, ect.

## Installation

This libray requires the peer dependency [three](https://threejs.org).

. **install three**
```bash
npm install three
```

. **install @fantasy3d/core**
```bash
npm install @fantasy3d/core
```

## Usage

```ts
import { BoxGeometry, Euler, Mesh, MeshLambertMaterial, Vector3 } from 'three';
import { AmbientLight, DirectionalLight, Engine, MeshRenderer, Scene, SceneRenderer } from '@fantasy3d/core';

// Create Engine
const engine = new Engine( {

    // WebGL Options
    gl: {

        viewport: document.getElementById( 'viewport' ), // 渲染视口
        clearColor: 'orange' // 背景颜色

    }

} );

// Create Scene
const scene = new Scene( engine );

// Set SceneRenderer
scene.sceneRenderer = new SceneRenderer( engine );

// Create a Perspective Camera
const camera = scene.createPerspectiveCamera( {

    // Camera transform
    transform: {

        position: new Vector3( 0.0, 5.0, 5.0 ),
        lookAt: new Vector3( 0.0, 0.0, 0.0 )

    },

    // Camera attributes
    camera: { near: 0.1, far: 100.0 }

} );

// Root Entity
const { rootEntity } = scene;

// Add a AmbientLight
rootEntity.addComponent( AmbientLight, { intensity: 0.25 * Math.PI } );

// Add a DirectionalLight
rootEntity.addComponent( DirectionalLight, {

    intensity: Math.PI,
    position: new Vector3( 20.0, 20.0, 20.0 ),
    target: new Vector3( 0.0, 0.0, 0.0 )

} );

// Create a empty Entity
const entity = rootEntity.createChild( {

    transform: {

        position: new Vector3( 0.0, 2.0, 0.0 ),
        rotation: new Euler( 0.0, Math.PI / 4.0, 0.0 )

    }

} );

// Add a MeshRenderer
entity.addComponent( MeshRenderer, {

    mesh: new Mesh(

        new BoxGeometry( 4.0, 4.0, 4.0 ),
        new MeshLambertMaterial( { color: 'lightblue' } )

    )

} );
```

## Links

- [Official Site](https://fantasy3d.cn)
- [Examples](https://fantasy3d.cn/examples/fantasy3d/examples.html)
- [Guide](https://fantasy3d.cn/guide/)
- [API](https://fantasy3d.cn/api/index.html)
- [Three.js](https://threejs.org)
npm package: @fantasy3d/particlesystem
Description: The particle system package of 'Fantasy 3D'
Latest version: 0.1.0

# @fantasy3d/particlesystem

<div align=center>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-1.png?raw=true" width=256 height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-2.png?raw=true" width=256 height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-3.png?raw=true" width=256, height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-4.png?raw=true" width=256 height=256>
</div>

The particle system package of **Fantasy 3D**.

> [Fantasy 3D](https://fantasy3d.cn) is a **web-first** real-time interactive 3d visualization framework base on [three.js](https://threejs.org). Use **ECS(Entity-Component-System)** design and easy to use and light weight.Can be used to develop **digital twins**, **digital city**, **digital factory**, **3D GIS**, ect.

## Installation

install
```bash
npm install @fantasy3d/particlesystem
```

import
```ts
import { OrbitController } from '@fantasy3d/particlesystem';
```

## Links

- [Official Site](https://fantasy3d.cn)
- [Examples](https://fantasy3d.cn/examples/fantasy3d/examples.html)
- [Guide](https://fantasy3d.cn/guide/)
- [API](https://fantasy3d.cn/api/index.html)
- [Three.js](https://threejs.org)
npm package: @fantasy3d/postprocessing
Description: The postprocessing package of 'Fantasy 3D'
Latest version: 0.2.1

# @fantasy3d/postprocessing

<div align=center>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-5.png?raw=true" width=256 height=256>
    <img src="https://github.com/fantasy3d/.github/blob/main/images/fantasy3d-6.png?raw=true" width=256 height=256>
</div>

A [postprocessing](https://github.com/pmndrs/postprocessing) wrapper for **Fantasy 3D**.

> [Fantasy 3D](https://fantasy3d.cn) is a **web-first** real-time interactive 3d visualization framework base on [three.js](https://threejs.org). Use **ECS(Entity-Component-System)** design and easy to use and light weight.Can be used to develop **digital twins**, **digital city**, **digital factory**, **3D GIS**, ect.

## Installation

```bash
npm intall @fantasy3d/postprocessing
```

## Usage

```ts
import { Vector3 } from 'three';
import { AmbientLight, Engine, GLTFParser, Scene } from '@fantasy3d/core';
import { OrbitController } from '@fantasy3d/addons';
import { BloomEffect, EffectRenderer } from '@fantasy3d/postprocessing';

// Create engine
const engine = new Engine( {

    // WebGL options
    gl: {

        viewport: document.getElementById( 'viewport' ),
        clearColor: 'rgb( 36, 44, 49 )',
        powerPreference: "high-performance",
        antialias: false,
        stencil: false,
        depth: false

    }

} );

// Create effect renderer
const effectRenderer = new EffectRenderer( engine, { multisampling: 4, enableNormalPass: true } );

// Create bloom effect
const bloom = new BloomEffect( {

    mipmapBlur: true,
    intensity: 1.75,
    luminanceThreshold: 0.15,
    luminanceSmoothing: 0

} );

// Add bloom effect
effectRenderer.addEffect( bloom );

// Create scene
const scene = new Scene( engine );

// Set scene renderer
scene.sceneRenderer = effectRenderer;

// Active scene
scene.isActive = true;

// Create a perspective camera
const camera = scene.createPerspectiveCamera( {

    transform: { 
        
        position: new Vector3( 0, 5, 5 ),
        lookAt: new Vector3( 0, 0, 0 )
    },
    camera: { near: 0.1, far: 200.0 }

} );

// Add Orbitcontroller
camera.addComponent( OrbitController, { damping: true } );

// Add AmbientLight
const { rootEntity } = scene;
rootEntity.addComponent( AmbientLight, { intensity: Math.PI } );

// Load glb model
engine.resourceManager.loadGLTF( './assets/models/PrimaryIonDrive.glb' ).then( ( resource ) => {

    // Parse gltf resource
    const entity = GLTFParser.parse( resource );

    // Add to scene
    rootEntity.addChild( entity );

} );
```

## Links

- [Official Site](https://fantasy3d.cn)
- [Examples](https://fantasy3d.cn/examples/fantasy3d/examples.html)
- [Guide](https://fantasy3d.cn/guide/)
- [API](https://fantasy3d.cn/api/index.html)
- [Three.js](https://threejs.org)
- [Postprocessing](https://github.com/pmndrs/postprocessing)
npm package: @fantasyarcade/uint8array-utils
Description: Some helper functions for working with `Uint8Array` instances.
Author: Jason Frame
Latest version: 1.1.0

# uint8array-utils

Some helper functions for working with `Uint8Array` instances.

### `readFixedLengthAsciiString(array, offset, length)`

### `writeFixedLengthAsciiString(array, offset, length, str)`
npm package: @fantasygold/bling-sdk
Description: 🛠 An SDK for building applications on top of Bling Finance, forked from @uniswap/sdk.
Latest version: 1.0.0

# BlingFinance SDK



In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).

This modifies uniswap-sdk's UniswapV2Factory address. The new address for BlingSwap is  `0x`.

## Running tests

To run the tests, follow these steps. You must have at least node v10 and [yarn](https://yarnpkg.com/) installed.

First clone the repository:

```sh
git clone https://github.com/fantasygold/bling-sdk.git
```

Move into the bling-sdk working directory

```sh
cd bling-sdk/
```

Install dependencies

```sh
yarn install
```

Run tests

```sh
yarn test
```

You should see output like the following:

```sh
yarn run v1.22.4
$ tsdx test
 PASS  test/constants.test.ts
 PASS  test/pair.test.ts
 PASS  test/fraction.test.ts
 PASS  test/miscellaneous.test.ts
 PASS  test/entities.test.ts
 PASS  test/trade.test.ts

Test Suites: 1 skipped, 6 passed, 6 of 7 total
Tests:       3 skipped, 82 passed, 85 total
Snapshots:   0 total
Time:        5.091s
Ran all test suites.
✨  Done in 6.61s.
```
npm package: @fantasygold/fantasygold-opcodes
Description: The FANTASYGOLD opcodes map
Author: silence
Latest version: 0.0.1

# fantasygold-opcodes-js
The FANTASYGOLD opcodes map

## Installation
``` bash
npm install fantasygold-opcodes
```

## Setup
### Node.js
``` javascript
var ops = require('fantasygold-opcodes')
```
npm package: @fantasygold/fantasygoldjs
Description: The FGC JavaScript library for Smart Contract development.
Author: FantasyGold Core
Latest version: 1.0.0

The FGC JavaScript library for Smart Contract development.

See [documentation](https://fantasygoldproject.github.io/fantasygoldjs-doc/).

See [companion tutorial](https://github.com/fantasygoldproject/fantasygoldbook/blob/master/en/part2/erc20-js.md).

# Install

```
npm install fantasygoldjs
```

This is a sample code snippet that transfer FGC20 tokens:

```js
import { FantasyGoldRPC } from "fantasygoldjs"

const repoData = require("./solar.json")
const fantasygold = new FantasyGold("http://fantasygold:test@localhost:57810", repoData)

const myToken = fantasygold.contract(
  "zeppelin-solidity/contracts/token/CappedToken.sol",
)

async function transfer(fromAddr, toAddr, amount) {
  const tx = await myToken.send("transfer", [toAddr, amount], {
    senderAddress: fromAddr,
  })

  console.log("transfer tx:", tx.txid)
  console.log(tx)

  await tx.confirm(3)
  console.log("transfer confirmed")
}
```

The [full source code](https://github.com/fantasygold/fantasygoldbook-mytoken-fantasygoldjs-cli).

> This example uses async/await (supported natively by Node 8+).

# Running Tests

```
docker run -it --rm \
  --name fantasygoldjs \
  -v `pwd`:/dapp \
  -p 57810:57810 \
  fantasygold/fantasygoldportal
```

Configure FGC_RPC for deployment tool:

Enter into container:

```
docker exec -it fantasygoldjs sh
```

Generate initial blocks:

```
fcli importprivkey cMbgxCJrTYUqgcmiC1berh5DFrtY1KeU4PXZ6NZxgenniF1mXCRk
fcli generatetoaddress 600 fUbxboqjBRp96j3La8D1RYkyqx5uQbJPoW

fcli getbalance

2000000.00000000
```

Deploy test contracts:

```
export FGC_RPC=http://fantasygold:test@localhost:57810
export FGC_SENDER=fUbxboqjBRp96j3La8D1RYkyqx5uQbJPoW

sh deploy-test-contracts.sh
```

Build and run tests:

```
npm build
npm run test
```
npm package: @fantazer/api-rate-limiter
Description: library for limiting your api rate
Author: fantazer
Latest version: 1.0.4

# API Rate Limiter

A simple, in-memory rate limiting middleware for Express applications. This package helps prevent abuse by limiting the number of requests a client can make within a specified time period.

## Features

- Easy to integrate with any Express application.
- Limits are enforced based on IP address.
- Customizable limit and time window.

## Installation

```bash
npm install api-rate-limiter
npm package: @fantazer/markdown-to-html-converter
Description: Markdown to HTML converter
Author: fantazer
Latest version: 1.0.2

# Markdown to HTML Converter

A simple Node.js module for converting Markdown text to HTML using the `marked` library. This package provides an easy-to-use interface for transforming Markdown into HTML, with optional customization capabilities through `marked` options.

## Features

- Simple and easy to use.
- Converts Markdown to HTML.
- Customizable Markdown rendering via `marked` options.

## Installation

Install the package using npm:

```bash
npm install your-package-name