# Needle MaterialX

Web runtime support to load and display MaterialX materials in Needle Engine and three.js

## Installation
`npm i @needle-tools/materialx`  

## Examples
- [three.js Example on Stackblitz](https://stackblitz.com/edit/needle-materialx-example?file=main.js,package.json,index.html)

## How to use

### Use with Needle Engine

```ts
import { useNeedleMaterialX } from "@needle-tools/materialx/needle";
// Simply call this function in global scope as soon as possible
useNeedleMaterialX();
```

### Use with three.js

```ts
import { useNeedleMaterialX } from "@needle-tools/materialx";
// Call the function with your GLTFLoader instance
useNeedleMaterialX(<yourGltfLoaderInstance>);
```


<br />

# Contact ✒️
<b>[🌵 Needle](https://needle.tools)</b> • 
[Github](https://github.com/needle-tools) • 
[Twitter](https://twitter.com/NeedleTools) • 
[Discord](https://discord.needle.tools) • 
[Forum](https://forum.needle.tools) • 
[Youtube](https://www.youtube.com/@needle-tools)

