summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/movie15/dice.js
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:44:40 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:44:40 +0000
commitb4fc5f639874db951177ec539299d20908adb654 (patch)
tree52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/movie15/dice.js
parentdec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff)
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/movie15/dice.js')
-rw-r--r--Master/texmf-dist/doc/latex/movie15/dice.js56
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/movie15/dice.js b/Master/texmf-dist/doc/latex/movie15/dice.js
new file mode 100644
index 00000000000..0b752c53b59
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/movie15/dice.js
@@ -0,0 +1,56 @@
+//first remove any scene lights
+var lightIndex = scene.lights.count - 1;
+for (; lightIndex >= 0; lightIndex--)
+{
+ scene.lights.removeByIndex(lightIndex);
+}
+
+////set background color
+//changer = new RenderEventHandler();
+//changer.onEvent = function(event)
+//{
+// event.canvas.background.setColor(new Color(1,1,1));
+//}
+//runtime.addEventHandler(changer);
+
+//add our own lighting
+lights = new Object();
+lights.init = function()
+{
+ //from left
+ l1 = scene.createLight();
+ l1.color.set3(1,1,1);
+ l1.brightness = .4;
+ l1.direction.set3(1,0,0); //NB: direction, not source!
+
+ //from right
+ l2 = scene.createLight();
+ l2.color.set3(1,1,1);
+ l2.brightness = .4;
+ l2.direction.set3(-1,0,0);
+
+ //from bottom
+ l3 = scene.createLight();
+ l3.color.set3(1,1,1);
+ l3.brightness = .4;
+ l3.direction.set3(0,0,1);
+
+ //from top
+ l4 = scene.createLight();
+ l4.color.set3(1,1,1);
+ l4.brightness = .4;
+ l4.direction.set3(0,0,-1);
+
+ //from front
+ l5 = scene.createLight();
+ l5.color.set3(1,1,1);
+ l5.brightness = .4;
+ l5.direction.set3(0,1,0);
+
+ //from back
+ l6 = scene.createLight();
+ l6.color.set3(1,1,1);
+ l6.brightness = .4;
+ l6.direction.set3(0,-1,0);
+}
+lights.init();