aboutsummaryrefslogtreecommitdiff
path: root/includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2008-11-14 15:39:19 +0000
commit1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch)
tree3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html
parent104d59099e048688c4dbac37d72137006e396558 (diff)
downloadsemanticscuttle-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_camerarotate_shaded.html')
-rw-r--r--includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html97
1 files changed, 0 insertions, 97 deletions
diff --git a/includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html b/includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html
deleted file mode 100644
index e9c0312..0000000
--- a/includes/js/dojox/gfx3d/tests/test_camerarotate_shaded.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
-<head>
- <title>Camera rotate of dojox.gfx3d.</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";
- @import "../../../dijit/themes/tundra/tundra.css";
- </style>
- <script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: false"></script>
- <script type="text/javascript" src="../object.js"></script>
- <script type="text/javascript" src="../scheduler.js"></script>
- <script type="text/javascript">
-
- dojo.require("dojox.gfx3d");
-
- var angles = {x: 30, y: 30, z: 0};
- var cube = null;
- var view = null;
-
- rotate = function() {
- var m = dojox.gfx3d.matrix;
-
- if(dojo.byId('rx').checked){
- angles.x += 1;
- }
- if(dojo.byId('ry').checked){
- angles.y += 1;
- }
- if(dojo.byId('rz').checked){
- angles.z += 1;
- }
- var t = m.normalize([
- m.cameraTranslate(-300, -200, 0),
- m.cameraRotateXg(angles.x),
- m.cameraRotateYg(angles.y),
- m.cameraRotateZg(angles.z)
- ]);
- console.debug(t);
- view.setCameraTransform(t);
- view.render();
- }
-
- makeObjects = function(){
- var surface = dojox.gfx.createSurface("test", 500, 500);
- view = surface.createViewport();
-
- view.setLights([{direction: {x: -10, y: -5, z: 5}, color: "white"}],
- {color:"white", intensity: 2}, "white");
-
- var c = {bottom: {x: 0, y: 0, z: 0}, top :{x: 100, y: 100, z: 100}};
- var xaxis = [{x: 0, y: 0, z: 0}, {x: 200, y: 0, z: 0}];
- var yaxis = [{x: 0, y: 0, z: 0}, {x: 0, y: 200, z: 0}];
- var zaxis = [{x: 0, y: 0, z: 0}, {x: 0, y: 0, z: 200}];
-
- var m = dojox.gfx3d.matrix;
-
- view.createEdges(xaxis).setStroke({color: "red", width: 1});
- view.createEdges(yaxis).setStroke({color: "green", width: 1});
- view.createEdges(zaxis).setStroke({color: "blue", width: 1});
-
- // setStroke({color: "lime", width: 1}).
- cube = view.createCube(c).setFill({ type: "plastic", finish: "dull", color: "lime" });
-
- var camera = dojox.gfx3d.matrix.normalize([
- m.cameraTranslate(-300, -200, 0),
- m.cameraRotateXg(angles.x),
- m.cameraRotateYg(angles.y),
- m.cameraRotateZg(angles.z),
- ]);
-
- view.applyCameraTransform(camera);
- view.render();
- window.setInterval(rotate, 50);
- };
-
- dojo.addOnLoad(makeObjects);
-
- </script>
-</head>
-<body class="tundra">
- <h1>Camera rotate</h1>
- <p>The cube is in the center (0, 0, 0): The color of X, Y, Z axes are red, green, blue. The view renders all the objects
- in each frame, the <em>conservative</em> drawer is used.</p>
- <form>
- <input id="rx" type="checkbox" name="rotateX" checked="true" value="on"/>
- <label for="rx"> Rotate around X-axis</label> <br/>
- <input id="ry" type="checkbox" name="rotateY" checked="false" value="off"/>
- <label for="ry"> Rotate around Y-axis</label> <br/>
- <input id="rz" type="checkbox" name="rotateZ" checked="false" value="off"/>
- <label for="rz"> Rotate around Z-axis</label> <br/>
- </form>
-
- <div id="test" style="width: 500px; height: 500px;"></div>
- <p>That's all Folks!</p>
-</body>
-</html>