https://github.com/uvacoder/texgen.js
https://github.com/uvacoder/texgen.js
curated vercel
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/uvacoder/texgen.js
- Owner: Uvacoder
- License: mit
- Created: 2021-08-15T10:04:07.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-16T09:19:14.000Z (about 4 years ago)
- Last Synced: 2025-01-24T06:08:56.379Z (9 months ago)
- Topics: curated, vercel
- Language: JavaScript
- Homepage: https://texgen-js.vercel.app
- Size: 6.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# texgen.js
Procedural Texture Generator
### Usage
```javascript
var texture = new TG.Texture( 256, 256 )
.add( new TG.XOR().tint( 1, 0.5, 0.7 ) )
.add( new TG.SinX().frequency( 0.004 ).tint( 0.5, 0, 0 ) )
.mul( new TG.SinY().frequency( 0.004 ).tint( 0.5, 0, 0 ) )
.add( new TG.SinX().frequency( 0.0065 ).tint( 0.1, 0.5, 0.2 ) )
.add( new TG.SinY().frequency( 0.0065 ).tint( 0.5, 0.5, 0.5 ) )
.add( new TG.Noise().tint( 0.1, 0.1, 0.2 ) )
.toCanvas();document.body.appendChild( texture );
```