-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
145 lines (97 loc) · 3.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" type="image/png" href="assets/logo/logo.png"/>
<link rel="stylesheet" href="docs/styles.css">
<script>
const TEXTURES = [
'Camouflage', 'Cave art', 'Circles', 'Clouds', 'Concrete', 'Cork',
'Dalmatian spots', 'Dyson sphere', 'Entangled', 'Fordite', 'Gas giant',
'Grid', 'Isolines', 'Karst rock', 'Marble', 'Neon lights', 'Planet',
'Photosphere', 'Polka dots', 'Processed wood', 'Protozoa', 'Runny eggs',
'Satin', 'Rough clay', 'Rust', 'Scepter head', 'Scream', 'Simplex noise',
'Stars', 'Tiger fur', 'Voronoi cells', 'Water drops', 'Watermelon',
'Wood', 'Zebra lines',
].sort();
const SHAPES = [
'Rotator', 'Scaler', 'Translator', 'Supersphere',
].sort();
const EXAMPLES = [
'Planet', 'Normal map', 'Wooden toys', 'Protozoa', 'Neck massage',
'Watermelon supersphere', 'Texture in motion', 'Matrixed data'
].sort();
</script>
</head>
<body style="max-width: 60em;">
<img class="logo" src="assets/logo/logo.png">
<h1>TSL Textures</h1>
<h3>Welcome. Pick a texture!</h3>
<br>
<br>
<!-- list of textures, generated by a script -->
<div id="textures" class="gallery"> </div>
<br>
<br>
<h3>Shape textures</h3>
<p style="max-width: 36em; margin: 1em auto;">
Shape textures affect the shape of a 3D model, not its colors. They run
in real-time just like the traditional textures. However, they require a sufficiently
dense net of vertices.
</p>
<br>
<br>
<!-- list of textures, generated by a script -->
<div id="shapes" class="gallery"></div>
<p style="max-width: 36em; margin: 1em auto;">
This project provides Three.js Shading Language (TSL) textures.
TSL textures are functions that generate textures at run-time on the GPU.
<a href="https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language">Learn more</a>
about TSL and what makes it special. Contributions to this project are very welcome
– either as new TSL textures or optimizations of existing ones.
The texture functions are avaiable
on <a href="https://github.com/boytchev/tsl-textures">GitHub</a>
and <a href="https://www.npmjs.com/package/tsl-textures">NPM</a>. You
may see them in action here:
</p>
<!-- list of textures, generated by a script -->
<div id="examples" class="gallery"> </div>
<div class="footnote">
<a href="docs/cookies.html">Cookies</a> ·
<a href="docs/licence.html">Licence</a> <!--·
<a href="docs/faq.html">FAQ</a>-->
</div>
<script>
function textureBlock( name )
{
var file = name.toLowerCase().replaceAll( ' ', '-' );
var html = '';
html += '<a class="style-block" href="./online/'+file+'.html">';
html += ' <div class="title">'+name+'</div>';
html += ' <img src="./docs/images/'+file+'.png">';
html += '</a>';
return html;
}
function exampleBlock( name )
{
var file = name.toLowerCase().replaceAll( ' ', '-' );
var html = '';
html += '<a class="style-block big-block" href="./examples/example-'+file+'.html">';
html += ' <div class="title">'+name+'</div>';
html += ' <img src="./examples/example-'+file+'.jpg">';
html += '</a>';
return html;
}
// creates a section of blocks
function section( id, names, block )
{
var html = '';
for( var name of names ) html += block( name )
document.getElementById( id ).innerHTML += html;
}
section( 'textures', TEXTURES, textureBlock );
section( 'shapes', SHAPES, textureBlock );
section( 'examples', EXAMPLES, exampleBlock );
</script>
</body>
</html>