diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/gfx3d/tests/test_overlap.html | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/gfx3d/tests/test_overlap.html')
-rw-r--r-- | includes/js/dojox/gfx3d/tests/test_overlap.html | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/includes/js/dojox/gfx3d/tests/test_overlap.html b/includes/js/dojox/gfx3d/tests/test_overlap.html deleted file mode 100644 index 19f63d5..0000000 --- a/includes/js/dojox/gfx3d/tests/test_overlap.html +++ /dev/null @@ -1,69 +0,0 @@ -<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" > -<head> -<title>Test of dojox.gfx3d.scheduler</title> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -<style type="text/css"> - @import "../../../dojo/resources/dojo.css"; - @import "../../../dijit/tests/css/dijitTests.css"; -</style> -<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script> -<script type="text/javascript"> - -dojo.require("dojox.gfx3d"); -var view = null; - -makeObjects = function(){ - var surface = dojox.gfx.createSurface("test", 500, 500); - view = surface.createViewport(); - var tas = [ - [{x: 100, y: 0, z: 0}, {x: 100, y: 100, z: 0}, {x: 50, y: 50, z: 50}], - [{x: 100, y: 0, z: 0}, {x: 100, y: 100, z: 0}, {x: 0, y: 70, z: 50}] - ]; - var fills = ["#0cc", "#c0c"]; - - var m = dojox.gfx3d.matrix; - for(var i = 0; i < tas.length; i++){ - console.debug(fills[i]); - view.createPolygon(tas[i]) - .setStroke({color: "blue", width: 1}) - .setFill(fills[i]); - } - var camera = dojox.gfx3d.matrix.normalize([m.cameraTranslate(0, -300, 0)]); - - view.applyCameraTransform(camera); - - view.render(); - - // set up the click handlers. - dojo.connect(dojo.byId("bsp"), "onclick", renderWithBSP); - dojo.connect(dojo.byId("zorder"), "onclick", renderWithZOrder); -}; - -render = function(title, render){ - dojo.byId("render").innerHTML = title; - view.setScheduler(render); - view.invalidate(); - view.render(); -}; - -renderWithBSP = function(){ - render("BSP", dojox.gfx3d.scheduler.bsp); -}; - -renderWithZOrder = function(){ - render("ZOrder", dojox.gfx3d.scheduler.zOrder); -}; - -dojo.addOnLoad(makeObjects); - -</script> -</head> -<body> -<h1>Scheduler Test</h1> -<p>There are two schedulers available in dojox.gfx3d, zOrder and BSP. zOrder is much simpler, and it performs quite well in most cases, it may fail in some rare cases, for example: two triangles share the same two vertice, and have the same Z value of the third vertex, in this case, they have the same z-order. They are rendered in arbitary order. In this case, BSP is the rescure.</p> -<p>Current render: <strong id="render">default</strong></p> -<p><button id="bsp">BSP</button> <button id="zorder">zOrder</button></p> -<div id="test" style="width: 500px; height: 500px;"></div> -<p>That's all Folks!</p> -</body> -</html> |