https://github.com/monogrid/lut-loader
📽 A webpack loader that allows to bundle LUT files as PNG
https://github.com/monogrid/lut-loader
Last synced: 9 months ago
JSON representation
📽 A webpack loader that allows to bundle LUT files as PNG
- Host: GitHub
- URL: https://github.com/monogrid/lut-loader
- Owner: MONOGRID
- License: mit
- Created: 2018-06-14T14:50:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-21T08:52:53.000Z (over 7 years ago)
- Last Synced: 2025-02-03T12:48:58.274Z (11 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lut-loader
A webpack loader that enable to bundle LUT files as PNG
## Installation
```bash
npm install lut-loader
```
or
```bash
yarn add lut-loader
```
## Webpack Configuration
You can use lut-loader in combination with other loaders.
For example, if you want to parse a .cube file and import it as PNG directly in your source code you have to do:
``` js
module: {
rules: [{
test: /\.cube$/,
use: [
{
loader: 'file-loader',
options: {
name: utils.assetsPath('assets/lut/[name].[hash:7].png')
}
},
{
loader: 'lut-loader'
}
]
}]
}
```
or if you want to obtain only the buffer data:
``` js
module: {
rules: [{
test: /\.cube$/,
use: [
{
loader: 'lut-loader'
}
]
}]
}
```
example of usage:
``` js
import LUTNight from './assets/luts-source/night.cube'
// ...
applyPngLut(LUTNight)
```