Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MasatoMakino/threejs-shader-materials
Collection of shader materials for three.js
https://github.com/MasatoMakino/threejs-shader-materials
Last synced: 2 days ago
JSON representation
Collection of shader materials for three.js
- Host: GitHub
- URL: https://github.com/MasatoMakino/threejs-shader-materials
- Owner: MasatoMakino
- License: mit
- Created: 2019-06-30T02:59:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T07:10:08.000Z (7 months ago)
- Last Synced: 2024-04-09T03:24:39.832Z (7 months ago)
- Language: JavaScript
- Size: 22 MB
- Stars: 272
- Watchers: 9
- Forks: 26
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# threejs-shader-materials
> Collection of shader materials for three.js
[![ReadMe Card](https://github-readme-stats.vercel.app/api/pin/?username=MasatoMakino&repo=threejs-shader-materials)](https://github.com/MasatoMakino/threejs-shader-materials)
## Demo
[![ Demo Page ](https://github.com/MasatoMakino/threejs-shader-materials/raw/main/readme/demo.gif)](https://masatomakino.github.io/threejs-shader-materials/demo/)
[Demo page](https://masatomakino.github.io/threejs-shader-materials/demo/)
## Getting Started
### Install
```bash
npm install @masatomakino/threejs-shader-materials --save-dev
```### Import
threejs-shader-materials is composed of ES6 modules and TypeScript d.ts files.
At first, import classes,
```js
import { HexGridMaterial } from "threejs-shader-materials";
```and set material.
```js
const geo = new SphereGeometry(10, 64, 64);
const mat = new HexGridMaterial();
const mesh = new Mesh(geo, mat);
scene.add(mesh);
```## API documents
[API documents](https://masatomakino.github.io/threejs-shader-materials/api/)
## License
[MIT licensed](LICENSE).