Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
kovacsv committed Nov 9, 2013
2 parents 8bd77b3 + 1bdfc0b commit 2102dcd
Show file tree
Hide file tree
Showing 39 changed files with 948 additions and 455 deletions.
165 changes: 85 additions & 80 deletions build/jsmodeler.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions documentation/demo/demonstration.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@
{
var floating = document.getElementById ('floating');
var svgcontent = document.getElementById ('svgcontent');
var svgSettings = new JSM.SVGSettings (demo.viewer.cameraMove, demo.viewer.settings['fieldOfView'], demo.viewer.settings['nearClippingPlane'], demo.viewer.settings['farClippingPlane']);
JSM.ExportBodyToSVG (demo.body, null, svgSettings, svgcontent);
var drawSettings = new JSM.DrawSettings (demo.viewer.cameraMove, demo.viewer.settings['fieldOfView'], demo.viewer.settings['nearClippingPlane'], demo.viewer.settings['farClippingPlane'], false, true);
var drawer = new JSM.SVGDrawer (svgcontent);
JSM.DrawProjectedBody (demo.body, null, drawSettings, drawer);
svgcontent.style.display = 'block';
floating.style.display = 'block';
}
Expand Down
9 changes: 5 additions & 4 deletions documentation/examples/solids.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
function ChangeShowFaces ()
{
var check = document.getElementById ('showfacescheck');
viewer.hiddenLine = check.checked;
viewer.settings.drawMode = check.checked ? 'HiddenLinePainter' : 'Wireframe';
viewer.Draw ();
}

Expand Down Expand Up @@ -163,7 +163,8 @@
var viewerSettings = {
cameraEyePosition : [3, 2, 3],
cameraCenterPosition : [0.0, 0.0, 0.0],
cameraUpVector : [0.0, 0.0, 1.0]
cameraUpVector : [0.0, 0.0, 1.0],
drawMode : 'HiddenLinePainter'
};

window.onresize = Resize;
Expand All @@ -173,8 +174,8 @@
document.getElementById ('showfacescheck').checked = true;
document.getElementById ('coloredfacescheck').checked = true;

viewer = new JSM.SVGViewer ();
var success = viewer.Start ('example', viewerSettings, true);
viewer = new JSM.SoftwareViewer ();
var success = viewer.Start ('example', viewerSettings);

SetBody (lastName);
}
Expand Down
106 changes: 106 additions & 0 deletions sandbox/canvasviewer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<!--
Author: Kovacs Viktor
Homepage: http://www.kovacsv.hu
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7;" >
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<!-- JSModeler includes start -->
<script type="text/javascript" src="../src/core/jsm.js"></script>
<script type="text/javascript" src="../src/core/timer.js"></script>
<script type="text/javascript" src="../src/geometry/determinant.js"></script>
<script type="text/javascript" src="../src/geometry/matrix.js"></script>
<script type="text/javascript" src="../src/geometry/coord.js"></script>
<script type="text/javascript" src="../src/geometry/coordutils.js"></script>
<script type="text/javascript" src="../src/geometry/coordsystem.js"></script>
<script type="text/javascript" src="../src/geometry/coordsystemutils.js"></script>
<script type="text/javascript" src="../src/geometry/sector.js"></script>
<script type="text/javascript" src="../src/geometry/sectorutils.js"></script>
<script type="text/javascript" src="../src/geometry/line.js"></script>
<script type="text/javascript" src="../src/geometry/lineutils.js"></script>
<script type="text/javascript" src="../src/geometry/transformation.js"></script>
<script type="text/javascript" src="../src/geometry/transformationutils.js"></script>
<script type="text/javascript" src="../src/geometry/plane.js"></script>
<script type="text/javascript" src="../src/geometry/planeutils.js"></script>
<script type="text/javascript" src="../src/geometry/projection.js"></script>
<script type="text/javascript" src="../src/geometry/convexhull.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/modeler/body.js"></script>
<script type="text/javascript" src="../src/modeler/bodyutils.js"></script>
<script type="text/javascript" src="../src/modeler/adjacencylist.js"></script>
<script type="text/javascript" src="../src/modeler/cututils.js"></script>
<script type="text/javascript" src="../src/modeler/textureutils.js"></script>
<script type="text/javascript" src="../src/modeler/model.js"></script>
<script type="text/javascript" src="../src/modeler/material.js"></script>
<script type="text/javascript" src="../src/modeler/generator.js"></script>
<script type="text/javascript" src="../src/modeler/solidgenerator.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../src/extras/extgenerator.js"></script>
<script type="text/javascript" src="../src/extras/painter.js"></script>
<script type="text/javascript" src="../src/extras/drawing.js"></script>
<script type="text/javascript" src="../src/extras/subdivision.js"></script>
<script type="text/javascript" src="../src/extras/svgtomodel.js"></script>
<script type="text/javascript" src="../src/extras/csg.js"></script>
<script type="text/javascript" src="../src/viewer/mouse.js"></script>
<script type="text/javascript" src="../src/viewer/touch.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/viewer/viewer.js"></script>
<script type="text/javascript" src="../src/viewer/softwareviewer.js"></script>
<!-- JSModeler includes end -->
<script type="text/javascript" src="contourbody.js"></script>
<title>Example</title>

<script type="text/javascript">
var viewer = null;
var body = null;

function Load ()
{
var viewerSettings = {
cameraEyePosition : [2.0, 2.0, 2.0],
cameraCenterPosition : [0.0, 0.0, 0.0],
cameraUpVector : [0, 0, 1],
drawMode : 'HiddenLineFrontFacing'
};

viewer = new JSM.SoftwareViewer ();
var success = viewer.Start ('example', viewerSettings);

//var body = TestBody0 ();
//var body = GenerateContourSolid ('Tetrahedron', 0.1);
//body = JSM.CatmullClarkSubdivision (body, 4);
var body = JSM.GenerateCuboid (1, 1, 1);

var materials = new JSM.Materials ();
materials.AddMaterial (new JSM.Material (0xcc0000, 0xcc0000));
materials.AddMaterial (new JSM.Material (0x0000cc, 0x0000cc));

body.GetPolygon (1).SetMaterialIndex (0);
body.GetPolygon (2).SetMaterialIndex (1);

viewer.AddBody (body, materials);
viewer.Draw ();
}

window.onload = function ()
{
Load ();
}
</script>

</head>

<body>
<canvas id="example" width="800" height="500"></canvas>
</body>

</html>
23 changes: 15 additions & 8 deletions sandbox/charts.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<head>

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" src="../build/three.min.js"></script>
<!-- JSModeler includes start -->
<script type="text/javascript" src="../src/core/jsm.js"></script>
<script type="text/javascript" src="../src/core/timer.js"></script>
<script type="text/javascript" src="../src/geometry/determinant.js"></script>
<script type="text/javascript" src="../src/geometry/matrix.js"></script>
<script type="text/javascript" src="../src/geometry/coord.js"></script>
Expand All @@ -24,14 +27,13 @@
<script type="text/javascript" src="../src/geometry/lineutils.js"></script>
<script type="text/javascript" src="../src/geometry/transformation.js"></script>
<script type="text/javascript" src="../src/geometry/transformationutils.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/geometry/plane.js"></script>
<script type="text/javascript" src="../src/geometry/planeutils.js"></script>
<script type="text/javascript" src="../src/geometry/projection.js"></script>
<script type="text/javascript" src="../src/geometry/convexhull.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/modeler/body.js"></script>
<script type="text/javascript" src="../src/modeler/bodyutils.js"></script>
<script type="text/javascript" src="../src/modeler/adjacencylist.js"></script>
Expand All @@ -41,15 +43,20 @@
<script type="text/javascript" src="../src/modeler/material.js"></script>
<script type="text/javascript" src="../src/modeler/generator.js"></script>
<script type="text/javascript" src="../src/modeler/solidgenerator.js"></script>
<script type="text/javascript" src="../src/modeler/csg.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../src/extras/extgenerator.js"></script>
<script type="text/javascript" src="../src/extras/painter.js"></script>
<script type="text/javascript" src="../src/extras/drawing.js"></script>
<script type="text/javascript" src="../src/extras/subdivision.js"></script>
<script type="text/javascript" src="../src/extras/svgtomodel.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../build/three.min.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/extras/csg.js"></script>
<script type="text/javascript" src="../src/viewer/mouse.js"></script>
<script type="text/javascript" src="../src/viewer/touch.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/viewer/viewer.js"></script>
<script type="text/javascript" src="../src/viewer/softwareviewer.js"></script>
<!-- JSModeler includes end -->
<title>Example</title>

<script type="text/javascript">
Expand Down
25 changes: 16 additions & 9 deletions sandbox/contourbody.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<head>

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" src="../build/three.min.js"></script>
<!-- JSModeler includes start -->
<script type="text/javascript" src="../src/core/jsm.js"></script>
<script type="text/javascript" src="../src/core/timer.js"></script>
<script type="text/javascript" src="../src/geometry/determinant.js"></script>
<script type="text/javascript" src="../src/geometry/matrix.js"></script>
<script type="text/javascript" src="../src/geometry/coord.js"></script>
Expand All @@ -24,32 +27,36 @@
<script type="text/javascript" src="../src/geometry/lineutils.js"></script>
<script type="text/javascript" src="../src/geometry/transformation.js"></script>
<script type="text/javascript" src="../src/geometry/transformationutils.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/geometry/plane.js"></script>
<script type="text/javascript" src="../src/geometry/planeutils.js"></script>
<script type="text/javascript" src="../src/geometry/projection.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/geometry/convexhull.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/modeler/body.js"></script>
<script type="text/javascript" src="../src/modeler/bodyutils.js"></script>
<script type="text/javascript" src="../src/modeler/adjacencylist.js"></script>
<script type="text/javascript" src="../src/modeler/subdivision.js"></script>
<script type="text/javascript" src="../src/modeler/cututils.js"></script>
<script type="text/javascript" src="../src/modeler/textureutils.js"></script>
<script type="text/javascript" src="../src/modeler/model.js"></script>
<script type="text/javascript" src="../src/modeler/material.js"></script>
<script type="text/javascript" src="../src/modeler/generator.js"></script>
<script type="text/javascript" src="../src/modeler/solidgenerator.js"></script>
<script type="text/javascript" src="../src/modeler/csg.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../src/extras/extgenerator.js"></script>
<script type="text/javascript" src="../src/extras/painter.js"></script>
<script type="text/javascript" src="../src/extras/drawing.js"></script>
<script type="text/javascript" src="../src/extras/subdivision.js"></script>
<script type="text/javascript" src="../src/extras/svgtomodel.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../build/three.min.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/extras/csg.js"></script>
<script type="text/javascript" src="../src/viewer/mouse.js"></script>
<script type="text/javascript" src="../src/viewer/touch.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/viewer/viewer.js"></script>
<script type="text/javascript" src="../src/viewer/softwareviewer.js"></script>
<!-- JSModeler includes end -->

<script type="text/javascript" src="contourbody.js"></script>
<title>Example</title>
Expand Down
24 changes: 15 additions & 9 deletions sandbox/convexhull.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<head>

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" src="../build/three.min.js"></script>
<!-- JSModeler includes start -->
<script type="text/javascript" src="../src/core/jsm.js"></script>
<script type="text/javascript" src="../src/core/timer.js"></script>
<script type="text/javascript" src="../src/geometry/determinant.js"></script>
<script type="text/javascript" src="../src/geometry/matrix.js"></script>
<script type="text/javascript" src="../src/geometry/coord.js"></script>
Expand All @@ -24,14 +27,13 @@
<script type="text/javascript" src="../src/geometry/lineutils.js"></script>
<script type="text/javascript" src="../src/geometry/transformation.js"></script>
<script type="text/javascript" src="../src/geometry/transformationutils.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/geometry/plane.js"></script>
<script type="text/javascript" src="../src/geometry/planeutils.js"></script>
<script type="text/javascript" src="../src/geometry/projection.js"></script>
<script type="text/javascript" src="../src/geometry/convexhull.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/geometry/polygon.js"></script>
<script type="text/javascript" src="../src/geometry/polygonutils.js"></script>
<script type="text/javascript" src="../src/geometry/bsptree.js"></script>
<script type="text/javascript" src="../src/modeler/body.js"></script>
<script type="text/javascript" src="../src/modeler/bodyutils.js"></script>
<script type="text/javascript" src="../src/modeler/adjacencylist.js"></script>
Expand All @@ -41,16 +43,20 @@
<script type="text/javascript" src="../src/modeler/material.js"></script>
<script type="text/javascript" src="../src/modeler/generator.js"></script>
<script type="text/javascript" src="../src/modeler/solidgenerator.js"></script>
<script type="text/javascript" src="../src/modeler/csg.js"></script>
<script type="text/javascript" src="../src/modeler/camera.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../src/extras/extgenerator.js"></script>
<script type="text/javascript" src="../src/extras/painter.js"></script>
<script type="text/javascript" src="../src/extras/drawing.js"></script>
<script type="text/javascript" src="../src/extras/subdivision.js"></script>
<script type="text/javascript" src="../src/extras/svgtomodel.js"></script>
<script type="text/javascript" src="../src/modeler/exporter.js"></script>
<script type="text/javascript" src="../build/three.min.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/extras/csg.js"></script>
<script type="text/javascript" src="../src/viewer/mouse.js"></script>
<script type="text/javascript" src="../src/viewer/touch.js"></script>
<script type="text/javascript" src="../src/viewer/converter.js"></script>
<script type="text/javascript" src="../src/viewer/viewer.js"></script>
<script type="text/javascript" src="legogenerator.js"></script>
<script type="text/javascript" src="../src/viewer/softwareviewer.js"></script>
<!-- JSModeler includes end -->
<title>Example</title>

<script type="text/javascript">
Expand Down
Loading

0 comments on commit 2102dcd

Please sign in to comment.