Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 27 Jan 1998.
Re: Cantering MOOSE / anyone do gaits?

Re: Cantering MOOSE / anyone do gaits?

In article <34C...@wing.rug.nl>, Shimrod <csg...@wing.rug.nl>
wrote:
> 
> Dave Bird---St Hippo of Augustine wrote:
> >
[snip]
> > Can the Basic below be done in JavaScript i.e. the array stores
> > not FRAMES but LINES, and a frame is built dynamically from lines
> > (don't know how slow this would be), thus eliminating lots of
> > frames which are just the same object 4,8,12 etc spaces rightwards?
> > The animation shows a little dog doing the slow quadruped walk.
> >
> 
> [snip basic source]
> 
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~JAVASCRIPT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > Does JavaScript have basic-style string variables, concatenate,
> > and left$/right$/mid$?  can you do a bitwise and of variables??
> >
> 
> Yes, Yes, ??? and Yes.
> 
> JavaScript variables have no type, you can just do:
> 
> var str; // not really required either.
> str="Hello, world!";   or   str=1;   or   str=true; or whatever.
> 
> Concatenate:
> var str1,str2,str3;
> str1="Hello,";
> str2="world!";
> str3=str1+str2;  or  str1+=str2 // for non C-people: equal to
> str1=str1+str2
> 
> I'm not too familiar with basic, what does left$/mid$/right$ do or mean?
> 
> bitwise and:
> 
> var a,b,c;
> a=23475;
> b=43556;
> c=a & b;  or  a&=b;
> 
> So, a script that dynamically builds up frames:
> 
> [snip from here --->
> 
> <HTML>
> <HEAD><TITLE>Dynamically build up frames</TITLE></HEAD>
> <BODY>
> 
> <FORM NAME=f>
> <TEXTAREA NAME=t ROWS=8 COLS=60>
> </TEXTAREA>
> </FORM>
> 
> <SCRIPT LANGUAGE="JavaScript">
> 
> function MakeArray() {
>   for (i=0;i<MakeArray.arguments.length;i++)
> this[i]=MakeArray.arguments[i];
> }
> 
> // make the first frame: (the reason it looks distorted is because all
> \'s
> //                        have been replaced by \\'s)
> 
> frame=new Array(4);
> 
> frame[0] = new MakeArray(
>       "\\\\            /\\       \r\n",
>       " \\\\__________/  @--o   \r\n",
>       " |               ===   \r\n",
>       " |  _________    .''   \r\n",
>       " | |+\\       | |+|     \r\n",
>       " | |\\#\\      | |+|     \r\n",
>       ".|_|.'-'    .|_|-'     \r\n",
>       "                       \r\n"
> );
> 
> frame[1] = new MakeArray(
>       "  |\\           /\\      \r\n",
>       "   \\\\_________/  @--o  \r\n",
>       "   |              ===  \r\n",
>       "   |  ________    .''  \r\n",
>       "   | |+|      | |+|    \r\n",
>       "  / /\\+\\      \\#\\/     \r\n",
>       " .|_|'-'    ___|_|     \r\n",
>       "                       \r\n",
>       "                       \r\n"
> );
> 
> frame[2] = new MakeArray(
>       "  |\\           /\\      \r\n",
>       "   \\\\_________/  @--o  \r\n",
>       "   |              ===  \r\n",
>       "   |  ________    .''  \r\n",
>       "   \\ \\+|      | |+|    \r\n",
>       "    \\#\\\\      \\ \\/     \r\n",
>       "  ___\\_\\     _|_|      \r\n",
>       "                       \r\n"
> );
> 
> frame[3] = new MakeArray(
>       "    \\\\           /\\    \r\n",
>       "     \\\\_________/  @--o\r\n",
>       "     |              ===\r\n",
>       "     |  _________   .''\r\n",
>       "     \\ \\+|       | |+| \r\n",
>       "     | |+|       | |#| \r\n",
>       "    _\\_\\'      ..|_|-' \r\n",
>       "                       \r\n"
> );
> 
> // OK, we now have 4 frames (frame[0] trough frame[3]) which all contain
> // 8 lines (frame[X][0] through frame[X][7]). lets do the animating:
> 
> var loop=0;
> var count=0;
> 
> function animate() {
>   var str=""; // variable in which we build up the frame.
>   for (x=0;x<8;x++) {
>     for (y=0;y<loop;y++) {
>       str+="    ";  // loop times four spaces in front of each line
>     }
>     str+=frame[count][x];
>   }
>   document.f.t.value=str;
>   count++; // increase frame;
>   if (count==4) {
>     count=0;
>     loop++;
>     loop%=10;
>   }
>   setTimeout("animate()",60);
> }
> 
> animate();
> 
> </SCRIPT>
> </BODY>
> </HTML>
> 
> <-- until here ]
> 
> Script tested and it worked. You can see it on:
>   http://fmf.ml.org/~shimrod/asciiart/dynamic.html
> 
> Greetz,
> --
>                 (`.                 ____________________________
>                  \ `.              / __/ / / /     /_  /   /_  /
>                   )  `._..---._    \__ \   \ \ \_\ \   \ \ \_\ \
> \`.       __...---`         o  )   /___/_/_/_/_/ /_/_/_/___/___/
>  \ `._,--'           ,    ___,' Herman Hiddema ----------------------
>   ) ,-._          \  )   _,-'   ----------- mailto:shi...@fmf.ml.org
>  /,'    ``--.._____\/--''       http://fmf.ml.org/~shimrod ----------

It sort of worked for me. It worked better after I removed

"(the reason it looks distorted is because all
 \'s
 //                        have been replaced by \\'s)"

That little dog looks awfully stiff though and should walk right out of
the window and back in the other direction if the animation is going to
be on a continual loop.

Of course, it STILL doesn't work in MSIE 3.0 because of the proportional
font in the window.

NOTE: If you hit the reply button, add an "e" to the "freent";
its absense is to stop the torment of automatic mailers.
--
                  ,^     llizard aka ejm
 ---%^^^^^^^^^^^^^   cq5...@freenet.toronto.on.ca
   /    "    "   www.geocities.com/SoHo/Studios/9334/

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,95e1feafcd3e7471
X-Google-Attributes: gidf996b,public
From: llizard <cq5...@freent.toronto.on.ca>
Subject: Re: Cantering MOOSE / anyone do gaits?
Date: 1998/01/27
Message-ID: <34C...@freent.toronto.on.ca>
X-Deja-AN: 319791406
Content-Transfer-Encoding: 7bit
References: <CJ9...@xemu.demon.co.uk> <34C...@freent.toronto.on.ca> <34C...@freent.toronto.on.ca> <PBk...@xemu.demon.co.uk> <34C...@wing.rug.nl>
Content-Type: text/plain; charset=us-ascii
Organization: via Internetdirect, Canada; zone 5 (or is it 6A?)
MIME-Version: 1.0
Newsgroups: alt.ascii-art

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this message. This message was posted publicly to the newsgroup alt.ascii-art in 1998 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post