Increased dimensions of sample object

This commit is contained in:
Joost Nieuwenhuijse 2012-01-20 16:36:55 +01:00
parent c1daa42647
commit d2cc093fab

View file

@ -56,7 +56,7 @@ function isChrome()
function onload() function onload()
{ {
gViewer = new Viewer(new CSG(), 600, 600, 5); gViewer = new Viewer(new CSG(), 600, 600, 50);
document.getElementById("viewer").appendChild(gViewer.gl.canvas); document.getElementById("viewer").appendChild(gViewer.gl.canvas);
if(isChrome()) if(isChrome())
{ {
@ -118,10 +118,10 @@ function getStl()
</table> </table>
<textarea id="code">var resolution = 16; // increase to get smoother corners (will get slow!) <textarea id="code">var resolution = 16; // increase to get smoother corners (will get slow!)
var cube1 = CSG.roundedCube({center: [0,0,0], radius: [1,1,1], roundradius: 0.2, resolution: resolution}); var cube1 = CSG.roundedCube({center: [0,0,0], radius: [10,10,10], roundradius: 2, resolution: resolution});
var sphere1 = CSG.sphere({center: [0.5, 0.5, 0.5], radius: 1, resolution: resolution }); var sphere1 = CSG.sphere({center: [5, 5, 5], radius: 10, resolution: resolution });
var sphere2 = sphere1.translate([1.2, 0.5, 0]); var sphere2 = sphere1.translate([12, 5, 0]);
var sphere3 = CSG.sphere({center: [2, 0, 0], radius: 3, resolution: resolution }); var sphere3 = CSG.sphere({center: [20, 0, 0], radius: 30, resolution: resolution });
var result = cube1; var result = cube1;
result = result.union(sphere1); result = result.union(sphere1);