|
174 | 174 |
|
175 | 175 | addLink("Superellipsoid", link0 = function() { |
176 | 176 | "use strict"; |
177 | | - pushSettings(allsettings, function(allsettings) { |
| 177 | + pushSettings(allsettings, shapeGroup, function(allsettings) { |
178 | 178 | var surf = new Superellipsoid( |
179 | 179 | allsettings["superel-x"], |
180 | 180 | allsettings["superel-y"], |
|
194 | 194 |
|
195 | 195 | addLink("Klein bottle", function() { |
196 | 196 | "use strict"; |
197 | | - pushSettings(allsettings, function() { |
| 197 | + pushSettings(allsettings, shapeGroup, function() { |
198 | 198 | return makeMesh( |
199 | 199 | new KleinBottle()); |
200 | 200 | }, {}); |
201 | 201 | }); |
202 | 202 | addLink("Surface of revolution for f(x) = sin x", function() { |
203 | 203 | "use strict"; |
204 | | - pushSettings(allsettings, function() { |
| 204 | + pushSettings(allsettings, shapeGroup, function() { |
205 | 205 | return makeMesh(H3DU.SurfaceOfRevolution.fromFunction(function(x) { |
206 | 206 | return Math.sin(x); |
207 | 207 | }, -Math.PI, Math.PI, [1, 0, 0])); |
208 | 208 | }, {}); |
209 | 209 | }); |
210 | 210 | addLink("Surface of revolution for f(x) = x<sup>2</sup>", function() { |
211 | 211 | "use strict"; |
212 | | - pushSettings(allsettings, function() { |
| 212 | + pushSettings(allsettings, shapeGroup, function() { |
213 | 213 | return makeMesh(H3DU.SurfaceOfRevolution.fromFunction(function(x) { |
214 | 214 | return x * x; |
215 | 215 | }, -1, 1, [1, 0, 0])); |
216 | 216 | }, {}); |
217 | 217 | }); |
218 | 218 | addLink("...for f(x) = x<sup>2</sup>+0.01", function() { |
219 | 219 | "use strict"; |
220 | | - pushSettings(allsettings, function() { |
| 220 | + pushSettings(allsettings, shapeGroup, function() { |
221 | 221 | return makeMesh(H3DU.SurfaceOfRevolution.fromFunction(function(x) { |
222 | 222 | return x * x + 0.01; |
223 | 223 | }, -1, 1, [1, 0, 0])); |
224 | 224 | }, {}); |
225 | 225 | }); |
226 | 226 | addLink("Cylinder", function() { |
227 | 227 | "use strict"; |
228 | | - pushSettings(allsettings, function() { |
| 228 | + pushSettings(allsettings, shapeGroup, function() { |
229 | 229 | return makeMesh(H3DU.SurfaceOfRevolution.fromFunction(function() { |
230 | 230 | return 1; |
231 | 231 | }, -1, 1, [0, 1, 0])); |
232 | 232 | }, {}); |
233 | 233 | }); |
234 | 234 | addLink("Cone", function() { |
235 | 235 | "use strict"; |
236 | | - pushSettings(allsettings, function() { |
| 236 | + pushSettings(allsettings, shapeGroup, function() { |
237 | 237 | return makeMesh(H3DU.SurfaceOfRevolution.fromFunction(function(x) { |
238 | 238 | x += -1; |
239 | 239 | return x / 2; |
|
242 | 242 | }); |
243 | 243 | addLink("Torus as Surface of Revolution", function() { |
244 | 244 | "use strict"; |
245 | | - pushSettings(allsettings, function() { |
| 245 | + pushSettings(allsettings, shapeGroup, function() { |
246 | 246 | return makeMesh(H3DU.SurfaceOfRevolution.torus(1, 0.125)); |
247 | 247 | }, {}); |
248 | 248 | }); |
249 | 249 | addLink("Möbius-like strip", function() { |
250 | 250 | "use strict"; |
251 | | - pushSettings(allsettings, function(allsettings) { |
| 251 | + pushSettings(allsettings, shapeGroup, function(allsettings) { |
252 | 252 | return makeMesh( |
253 | 253 | new MoebiusLikeStrip( |
254 | 254 | allsettings["moeb-maj"], |
|
264 | 264 |
|
265 | 265 | addLink("Supertoroid", function() { |
266 | 266 | "use strict"; |
267 | | - pushSettings(allsettings, function(allsettings) { |
| 267 | + pushSettings(allsettings, shapeGroup, function(allsettings) { |
268 | 268 | return makeMesh( |
269 | 269 | new Supertoroid( |
270 | 270 | allsettings["superto-x"], |
|
284 | 284 |
|
285 | 285 | addLink("Möbius strip", function() { |
286 | 286 | "use strict"; |
287 | | - pushSettings(allsettings, function(allsettings) { |
| 287 | + pushSettings(allsettings, shapeGroup, function(allsettings) { |
288 | 288 | return makeMesh( |
289 | 289 | new MoebiusStrip( |
290 | 290 | allsettings["moeb2-r"], |
|
299 | 299 | var bsplineSurf = null; |
300 | 300 | addLink("B-Spline Surface", function() { |
301 | 301 | "use strict"; |
302 | | - pushSettings(allsettings, function() { |
| 302 | + pushSettings(allsettings, shapeGroup, function() { |
303 | 303 | var bspline = []; |
304 | 304 | for(var i = 0;i <= 5;i++) { |
305 | 305 | var c = []; |
|
0 commit comments