changeset 933:e45ad25a1462

Add the preview page.
author wycc
date Wed, 10 Nov 2010 07:57:35 +0800
parents bd9b0142fc7e
children 5dedeedf0408
files nodejs/examples/mce/README nodejs/examples/mce/background2.png nodejs/examples/mce/main.svg nodejs/examples/mce/mainmenu.js nodejs/examples/mce/preview.svg
diffstat 5 files changed, 226 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nodejs/examples/mce/README	Wed Nov 10 07:57:35 2010 +0800
@@ -0,0 +1,10 @@
+Scene 1: Main category
+
+1. Start to load all pictures and save them in the file system.
+2. Load the main screen and move all pictures to the correct positions.
+3. Show the cursor and do animation to scale it.
+4. After the animation, start to listent to keys and move the cursor.
+5. If the key is enter, load the next scene.
+
+
+Scene 2:
Binary file nodejs/examples/mce/background2.png has changed
--- a/nodejs/examples/mce/main.svg	Tue Nov 09 07:41:52 2010 +0800
+++ b/nodejs/examples/mce/main.svg	Wed Nov 10 07:57:35 2010 +0800
@@ -129,18 +129,18 @@
       <image
          sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat0.png"
          xlink:href="./cat0.png"
-         inkscape:bbox-height="286.7168"
-         inkscape:bbox-width="200"
-         inkscape:bbox-y="462.7648"
-         inkscape:bbox-x="117.64285"
-         inkscape:transform-center-y="0"
+         y="302.88058"
+         x="117.64285"
+         id="image3058"
+         height="286.7168"
+         width="200"
+         inkscape:label=""
          inkscape:transform-center-x="0"
-         inkscape:label=""
-         width="200"
-         height="286.7168"
-         id="image3058"
-         x="117.64285"
-         y="302.88058" />
+         inkscape:transform-center-y="0"
+         inkscape:bbox-x="117.64285"
+         inkscape:bbox-y="462.7648"
+         inkscape:bbox-width="200"
+         inkscape:bbox-height="286.7168" />
     </g>
     <g
        id="g2923"
@@ -154,18 +154,18 @@
       <image
          sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat1.png"
          xlink:href="./cat1.png"
-         inkscape:bbox-height="291.09415"
-         inkscape:bbox-width="200"
-         inkscape:bbox-y="455.42856"
-         inkscape:bbox-x="359.21432"
-         inkscape:transform-center-y="0"
+         y="305.83948"
+         x="359.21432"
+         id="image3116"
+         height="291.09415"
+         width="200"
+         inkscape:label=""
          inkscape:transform-center-x="0"
-         inkscape:label=""
-         width="200"
-         height="291.09415"
-         id="image3116"
-         x="359.21432"
-         y="305.83948" />
+         inkscape:transform-center-y="0"
+         inkscape:bbox-x="359.21432"
+         inkscape:bbox-y="455.42856"
+         inkscape:bbox-width="200"
+         inkscape:bbox-height="291.09415" />
     </g>
     <g
        id="g2926"
@@ -179,18 +179,18 @@
       <image
          sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat2.png"
          xlink:href="./cat2.png"
-         inkscape:bbox-height="286.7168"
-         inkscape:bbox-width="200"
-         inkscape:bbox-y="458.28571"
-         inkscape:bbox-x="599.07141"
-         inkscape:transform-center-y="0"
+         y="307.35968"
+         x="599.07141"
+         id="image3174"
+         height="286.7168"
+         width="200"
+         inkscape:label=""
          inkscape:transform-center-x="0"
-         inkscape:label=""
-         width="200"
-         height="286.7168"
-         id="image3174"
-         x="599.07141"
-         y="307.35968" />
+         inkscape:transform-center-y="0"
+         inkscape:bbox-x="599.07141"
+         inkscape:bbox-y="458.28571"
+         inkscape:bbox-width="200"
+         inkscape:bbox-height="286.7168" />
     </g>
     <g
        id="g2929"
@@ -204,18 +204,18 @@
       <image
          sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat3.png"
          xlink:href="./cat3.png"
-         inkscape:bbox-height="289.10892"
-         inkscape:bbox-width="200"
-         inkscape:bbox-y="456.71426"
-         inkscape:bbox-x="821.35712"
-         inkscape:transform-center-y="0"
+         y="306.539"
+         x="821.35712"
+         id="image3232"
+         height="289.10892"
+         width="200"
+         inkscape:label=""
          inkscape:transform-center-x="0"
-         inkscape:label=""
-         width="200"
-         height="289.10892"
-         id="image3232"
-         x="821.35712"
-         y="306.539" />
+         inkscape:transform-center-y="0"
+         inkscape:bbox-x="821.35712"
+         inkscape:bbox-y="456.71426"
+         inkscape:bbox-width="200"
+         inkscape:bbox-height="289.10892" />
     </g>
     <path
        sodipodi:type="star"
@@ -241,7 +241,7 @@
        inkscape:bbox-width="74.005762"
        inkscape:bbox-height="84.436636" />
     <path
-       transform="matrix(-0.99874276,-0.05012887,0.05012887,-0.99874276,913.7162,630.18191)"
+       transform="matrix(-0.99874276,-0.05012887,0.05012887,-0.99874276,1659.4305,613.03905)"
        inkscape:transform-center-y="-0.445031"
        inkscape:transform-center-x="-11.802598"
        d="m -145.71429,228.07648 -37.22481,-19.93682 -37.22481,-19.93682 35.87819,-22.26922 35.8782,-22.26923 1.34662,42.20604 1.34661,42.20605 z"
@@ -259,9 +259,87 @@
        style="fill:#00c280;fill-opacity:1"
        sodipodi:type="star"
        inkscape:label="rightarrow"
-       inkscape:bbox-x="1069.1389"
-       inkscape:bbox-y="558.22454"
+       inkscape:bbox-x="1814.8532"
+       inkscape:bbox-y="575.3674"
        inkscape:bbox-width="73.898841"
        inkscape:bbox-height="84.440967" />
+    <g
+       inkscape:bbox-height="289.10892"
+       inkscape:bbox-width="200"
+       inkscape:bbox-y="456.71426"
+       inkscape:bbox-x="1035.3571"
+       inkscape:transform-center-y="0"
+       inkscape:transform-center-x="0"
+       inkscape:label="cat4"
+       id="g2931"
+       transform="translate(214,0)">
+      <image
+         sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat4.png"
+         xlink:href="./cat4.png"
+         inkscape:bbox-height="289.10892"
+         inkscape:bbox-width="200"
+         inkscape:bbox-y="456.71426"
+         inkscape:bbox-x="1035.3571"
+         inkscape:transform-center-y="0"
+         inkscape:transform-center-x="0"
+         inkscape:label=""
+         width="200"
+         height="289.10892"
+         id="image2933"
+         x="821.35712"
+         y="306.539" />
+    </g>
+    <g
+       transform="translate(438,0)"
+       id="g2935"
+       inkscape:label="cat5"
+       inkscape:transform-center-x="0"
+       inkscape:transform-center-y="0"
+       inkscape:bbox-x="1259.3571"
+       inkscape:bbox-y="456.71426"
+       inkscape:bbox-width="200"
+       inkscape:bbox-height="289.10892">
+      <image
+         sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat5.png"
+         xlink:href="./cat5.png"
+         y="306.539"
+         x="821.35712"
+         id="image2937"
+         height="289.10892"
+         width="200"
+         inkscape:label=""
+         inkscape:transform-center-x="0"
+         inkscape:transform-center-y="0"
+         inkscape:bbox-x="1259.3571"
+         inkscape:bbox-y="456.71426"
+         inkscape:bbox-width="200"
+         inkscape:bbox-height="289.10892" />
+    </g>
+    <g
+       inkscape:bbox-height="289.10892"
+       inkscape:bbox-width="200"
+       inkscape:bbox-y="456.71426"
+       inkscape:bbox-x="1475.3571"
+       inkscape:transform-center-y="0"
+       inkscape:transform-center-x="0"
+       inkscape:label="cat6"
+       id="g2939"
+       transform="translate(654,0)">
+      <image
+         sodipodi:absref="/home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/./cat6.png"
+         xlink:href="./cat6.png"
+         inkscape:bbox-height="289.10892"
+         inkscape:bbox-width="200"
+         inkscape:bbox-y="456.71426"
+         inkscape:bbox-x="1475.3571"
+         inkscape:transform-center-y="0"
+         inkscape:transform-center-x="0"
+         inkscape:label=""
+         width="200"
+         height="289.10892"
+         id="image2941"
+         x="821.35712"
+         y="306.539" />
+    </g>
   </g>
 </svg>
--- a/nodejs/examples/mce/mainmenu.js	Tue Nov 09 07:41:52 2010 +0800
+++ b/nodejs/examples/mce/mainmenu.js	Wed Nov 10 07:57:35 2010 +0800
@@ -25,7 +25,7 @@
     var i;
     var self = this;
     this.items=[];
-    for(i=0;i<4;i++) {
+    for(i=0;i<8;i++) {
 	this.items.push(app.get("cat"+i));
     }
     this.app = app;
@@ -150,7 +150,7 @@
 }
 
 MainMenu.prototype.changePage=function() {
-    this.app.loadSVG("browser.svg");    
+    this.app.loadSVG("preview.svg");    
 }
 
 exports.MainMenu=MainMenu;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nodejs/examples/mce/preview.svg	Wed Nov 10 07:57:35 2010 +0800
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="1920"
+   height="1080"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   inkscape:transform-center-x="0"
+   inkscape:transform-center-y="0"
+   sodipodi:docname="New document 1">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+    <inkscape:perspective
+       id="perspective2987"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="375"
+     inkscape:cy="520"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1680"
+     inkscape:window-height="976"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     inkscape:transform-center-x="0"
+     inkscape:transform-center-y="0"
+     transform="translate(0,27.637817)">
+    <image
+       y="-27.637817"
+       x="0"
+       inkscape:bbox-height="1080"
+       inkscape:bbox-width="1920"
+       inkscape:bbox-y="3.8281246e-07"
+       inkscape:bbox-x="0"
+       inkscape:transform-center-y="0"
+       inkscape:transform-center-x="0"
+       id="image2989"
+       height="1080"
+       width="1920"
+       xlink:href="file:///home/wycc/devel/md6/MadButterfly/nodejs/examples/mce/background2.png" />
+  </g>
+</svg>