├── .editorconfig
├── .eslintrc.json
├── .gitignore
├── .npmignore
├── README.md
├── docs
├── ArrayBuffer.html
├── ArrayBuffer.js.html
├── CreateContextWebgl.html
├── Extension.html
├── Extension.js.html
├── Foo.html
├── FrameBuffer.html
├── FrameBuffer.js.html
├── IndexBuffer.html
├── IndexBuffer.js.html
├── Object3D.html
├── Object3D.js.html
├── Program.html
├── Program.js.html
├── State.html
├── State.js.html
├── Webgl.html
├── Webgl.js.html
├── fonts
│ ├── OpenSans-Bold-webfont.eot
│ ├── OpenSans-Bold-webfont.svg
│ ├── OpenSans-Bold-webfont.woff
│ ├── OpenSans-BoldItalic-webfont.eot
│ ├── OpenSans-BoldItalic-webfont.svg
│ ├── OpenSans-BoldItalic-webfont.woff
│ ├── OpenSans-Italic-webfont.eot
│ ├── OpenSans-Italic-webfont.svg
│ ├── OpenSans-Italic-webfont.woff
│ ├── OpenSans-Light-webfont.eot
│ ├── OpenSans-Light-webfont.svg
│ ├── OpenSans-Light-webfont.woff
│ ├── OpenSans-LightItalic-webfont.eot
│ ├── OpenSans-LightItalic-webfont.svg
│ ├── OpenSans-LightItalic-webfont.woff
│ ├── OpenSans-Regular-webfont.eot
│ ├── OpenSans-Regular-webfont.svg
│ ├── OpenSans-Regular-webfont.woff
│ ├── OpenSans-Semibold-webfont.eot
│ ├── OpenSans-Semibold-webfont.svg
│ ├── OpenSans-Semibold-webfont.ttf
│ ├── OpenSans-Semibold-webfont.woff
│ ├── OpenSans-SemiboldItalic-webfont.eot
│ ├── OpenSans-SemiboldItalic-webfont.svg
│ ├── OpenSans-SemiboldItalic-webfont.ttf
│ └── OpenSans-SemiboldItalic-webfont.woff
├── global.html
├── index.clsA.html
├── index.html
├── module.exports_module.exports.html
├── screenshot.png
├── scripts
│ ├── linenumber.js
│ └── prettify
│ │ ├── Apache-License-2.0.txt
│ │ ├── lang-css.js
│ │ └── prettify.js
└── styles
│ ├── jsdoc-default.css
│ ├── prettify-jsdoc.css
│ └── prettify-tomorrow.css
├── package-lock.json
├── package.json
├── public
├── assets
│ └── img
│ │ ├── colors.jpg
│ │ ├── ground_asphalt_05_normal.jpg
│ │ ├── height.png
│ │ └── normal.png
├── index.html
└── main.js
├── snipnet
├── functions.glsl
└── shaders
│ ├── attractor.frag
│ ├── attractor.vert
│ ├── base.frag
│ ├── base.vert
│ ├── bg.frag
│ ├── bg.vert
│ ├── bg
│ ├── bg.frag
│ └── bg.vert
│ ├── debug.vert
│ ├── envMap.frag
│ ├── envMap.vert
│ ├── floor.frag
│ ├── floor.vert
│ ├── floor
│ ├── floor.frag
│ └── floor.vert
│ ├── instancing.frag
│ ├── instancing.vert
│ ├── line
│ ├── base.frag
│ ├── base.vert
│ └── sim.frag
│ ├── matcap.frag
│ ├── matcap.vert
│ ├── normal.frag
│ ├── particles
│ ├── particle.frag
│ ├── particle.vert
│ ├── position.frag
│ ├── sim.frag
│ └── velocity.frag
│ ├── sphere.frag
│ ├── sphere.vert
│ ├── texture.frag
│ ├── textureCube.frag
│ └── textureCube.vert
└── src
├── DefaultConfig.js
├── buildExperiment.js
├── dev
├── Broadcaster.js
├── Query.js
├── Screenshot.js
└── SuperConfig.js
├── experiments
├── index.js
├── particles
│ ├── Scene.js
│ ├── System.js
│ └── shaders
│ │ ├── basic.vert
│ │ ├── instancing.frag
│ │ ├── instancing.vert
│ │ └── sim.frag
└── spring
│ ├── Scene.js
│ └── shaders
│ ├── basic.vert
│ ├── instancing.frag
│ ├── instancing.vert
│ └── sim.frag
├── gl
├── camera
│ ├── Camera.js
│ ├── OrthographicCamera.js
│ └── PerspectiveCamera.js
├── const
│ ├── webglConst.js
│ └── webglNumber.js
├── core
│ ├── ArrayBuffer.js
│ ├── Extension.js
│ ├── FrameBuffer.js
│ ├── IndexBuffer.js
│ ├── Object3D.js
│ ├── Program.js
│ ├── State.js
│ ├── Texture.js
│ ├── Texture3D.js
│ ├── TextureCube.js
│ └── Webgl.js
├── high
│ ├── BasicMaterial.js
│ ├── Geometry.js
│ ├── Mesh.js
│ ├── Primitive.js
│ └── Shader.js
├── index.js
├── math
│ ├── Ray.js
│ └── Vector3.js
├── post
│ ├── BlendPass.js
│ ├── BloomPass.js
│ ├── BoxBlurPass.js
│ ├── BrightnessContrastPass.js
│ ├── Composer.js
│ ├── Composerori.js
│ ├── DofPass.js
│ ├── FXAAPass.js
│ ├── FullBoxBlurPass.js
│ ├── InvertPass.js
│ ├── NoisePass.js
│ ├── Pass.js
│ ├── TiltPass.js
│ ├── ToonPass.js
│ └── shaders
│ │ ├── blend.frag
│ │ ├── boxBlur.frag
│ │ ├── boxBlur.vert
│ │ ├── brightness-contrast.frag
│ │ ├── default.frag
│ │ ├── default.vert
│ │ ├── dof.frag
│ │ ├── fxaa.frag
│ │ ├── invert.frag
│ │ ├── noise.frag
│ │ ├── tilt.frag
│ │ └── toon.frag
├── shaders
│ ├── basic.frag
│ └── basic.vert
└── utils
│ ├── ArrayUtils.js
│ ├── Debug.js
│ ├── DeviceOrientationControl.js
│ ├── FBOHelper.js
│ ├── HitDetect.js
│ ├── Loader.js
│ ├── ObjParser.js
│ ├── OrbitalCameraControl.js
│ ├── PingPong.js
│ ├── UIID.js
│ ├── Utils.js
│ └── fallback.js
└── index.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = tab
5 | end_of_line = lf
6 | charset = utf-8
7 | trim_trailing_whitespace = true
8 | insert_final_newline = true
9 | max_line_length = 150
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log
3 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | *.log
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Webgl tools [](http://github.com/badges/stability-badges)
2 |
3 | ## Doc only for fun
4 |
5 | ## [http://gl.jojo.ninja/doc](http://gl.jojo.ninja/doc)
6 |
7 | ## Instalation
8 | ```bash
9 | git clone https://github.com/JordanMachado/webgl-tool
10 | npm install
11 | ```
12 |
13 | ## Run it
14 | ```bash
15 | npm start
16 | ```
17 |
18 | ### Experiments
19 |
20 | ## [http://gl.jojo.ninja/](http://gl.jojo.ninja/)
21 |
22 | * [Particles](http://gl.jojo.ninja/experiments/particles/)
23 | * [Instanced lines](http://gl.jojo.ninja/experiments/instanced-lines/)
24 | * [Shadow particles](http://gl.jojo.ninja/experiments/shadow-particles/)
25 | * [Curly](http://gl.jojo.ninja/experiments/curly/)
26 |
27 |
28 | 
29 |
30 |
31 |
32 | # Inspiration & Ressources
33 |
34 | * [Alfrid](https://github.com/yiwenl/Alfrid) by [@yiwen_lin](https://twitter.com/yiwen_lin?lang=en)
35 |
36 | * [nanoGL](https://github.com/plepers/nanogl) by [@plepers](https://github.com/plepers)
37 |
38 | * [medium](https://github.com/amelierosser/medium) by [@amelierosser](https://twitter.com/ixviii_io?lang=en)
39 |
40 | * [THREE.js](https://github.com/mrdoob/three.js/) by a lot of people ^^
41 |
42 | * [webglfundamentals](https://webglfundamentals.org/) by [greggman](https://github.com/greggman)
43 |
44 | * [learningwebgl](https://learnopengl.com/) by [JOEY DE VRIES](https://joeydevries.com/#home)
45 |
46 | * [learningwebgl](http://learningwebgl.com/blog/?page_id=1217)
47 |
48 | * [tojicode]( https://blog.tojicode.com/) by [tojiro](https://twitter.com/Tojiro?lang=fr)
49 |
--------------------------------------------------------------------------------
/docs/CreateContextWebgl.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
Class: CreateContextWebgl
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | CreateContextWebgl(bar)
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
new CreateContextWebgl(bar)
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | Constructs a new Foo by setting bar to `bar`
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
Parameters:
64 |
65 |
66 |
67 |
68 |
69 |
70 | Name |
71 |
72 |
73 | Type |
74 |
75 |
76 |
77 |
78 |
79 | Description |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 | bar |
89 |
90 |
91 |
92 |
93 |
94 | *
95 |
96 |
97 |
98 | |
99 |
100 |
101 |
102 |
103 |
104 | Thing representing some data |
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 | - Source:
144 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
19 |
20 |
Class: Foo
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | Foo()
32 |
33 | Foo fooing bars
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
Constructor
45 |
46 |
47 |
48 |
new Foo()
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 | - Source:
95 |
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 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
19 |
20 |
Global
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
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 | Methods
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | append(containeropt)
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | Append the renderer into an htmlElement
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | Parameters:
127 |
128 |
129 |
130 |
131 |
132 |
133 | Name |
134 |
135 |
136 | Type |
137 |
138 |
139 | Attributes |
140 |
141 |
142 |
143 | Default |
144 |
145 |
146 | Description |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 | container |
156 |
157 |
158 |
159 |
160 |
161 | object
162 |
163 |
164 |
165 | |
166 |
167 |
168 |
169 |
170 | <optional>
171 |
172 |
173 |
174 |
175 |
176 | |
177 |
178 |
179 |
180 |
181 |
182 | document.body
183 |
184 | |
185 |
186 |
187 | html element to add the canvas |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 | - Source:
227 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
19 |
20 |
Class: clsA
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | clsA()
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
new clsA()
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 | - Source:
91 |
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 |
146 |
147 |
148 |
149 |
150 |
151 |