Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" >
2
<head>
3
<title>Polygon test of dojox.gfx3d.</title>
4
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
<style type="text/css">
6
	@import "../../../dojo/resources/dojo.css";
7
	@import "../../../dijit/tests/css/dijitTests.css";
8
</style>
9
<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
10
<script type="text/javascript">
11
 
12
dojo.require("dojox.gfx3d");
13
 
14
makeObjects = function(){
15
	var surface = dojox.gfx.createSurface("test", 500, 500);
16
	var view = surface.createViewport();
17
	var poly = [{x: 0, y: 0, z: 0}, {x: 0, y: 100, z: 0}, {x: 100, y: 100, z: 0}, {x: 100, y: 0, z: 0}];
18
 
19
	var m = dojox.gfx3d.matrix;
20
	t = view.createPolygon(poly)
21
		.setStroke({color: "blue", width: 1})
22
		.setFill("#cc0");
23
 
24
	var camera = dojox.gfx3d.matrix.normalize([
25
		m.cameraRotateXg(30),
26
		m.cameraRotateYg(30),
27
		//m.cameraRotateZg(15),
28
		m.cameraTranslate(-0, 0, 0)
29
	]);
30
 
31
	view.applyCameraTransform(camera);
32
	view.render();
33
};
34
 
35
dojo.addOnLoad(makeObjects);
36
 
37
</script>
38
</head>
39
<body>
40
<h1>Polygon Test</h1>
41
<div id="test" style="width: 500px; height: 500px;"></div>
42
<p>That's all Folks!</p>
43
</body>
44
</html>