# graphics: keystroke simplification routine

• 03-29-2009, 09:52 PM
blackbudd
graphics: keystroke simplification routine
Graphics program written in Javascript for webpage: simplify keystrokes

There are a lot of keystrokes involved in making a color move from one position to the next.

legPos[0]=new Array(0,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,LD,L)
//legPos where [0] is relative to the body and each "LD" is relative to the previous part of the leg. ie) The knee joint is 6 LD's down from 0.

openingLGS=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,0,22,0)
//openingLGS describes the movement of the legPos

as you can see, there is much repetitive keystroking.

LASOrder=openingLGS.concat(stall1LGS)
//concat arrays to prevent huge lines of instructions. LASOrder puts the segments together; where stall1LGS represents an array of 15 zeros.

Still I had to type the stall1LGS array initially and it only useful when I need 15 zeros.

Maybe you can help with this part. I could use a time saver. I need an array that gives an increment of "0" to the previous array position.

n0=[]
n0[0]=[0]
n0[1]=[0,0]
n0[2]=[0,0,0]

thru a fifty count. It looks like an easy loop, but I'm struggling with it. And, really it's not ideal because I'll have to keystroke stroke brackets. The best I can come up with is to make an alphanumeric N012 represent 12 zeros.

## X vBulletin 4.2.2 Debug Information

• Page Generation 0.09870 seconds
• Memory Usage 2,343KB
• Queries Executed 11 (?)
Template Usage (19):
• (1)footer
• (1)gobutton
• (1)navbar_moderation
• (1)navbar_noticebit
• (2)option
• (1)spacer_close
• (1)spacer_open

Phrase Groups Available (3):
• global
• postbit
Included Files (19):
• ./global.php
• ./includes/class_bootstrap.php
• ./includes/init.php
• ./includes/class_core.php
• ./includes/config.php
• ./includes/functions.php
• ./includes/class_friendly_url.php
• ./includes/class_hook.php
• ./includes/class_bootstrap_framework.php
• ./vb/vb.php
• ./vb/phrase.php
• ./includes/functions_calendar.php
• ./includes/class_bbcode_alt.php
• ./includes/class_bbcode.php
• ./includes/functions_bigthree.php
• ./includes/functions_notice.php

Hooks Called (41):
• init_startup
• init_startup_session_setup_start
• database_pre_fetch_array
• database_post_fetch_array
• init_startup_session_setup_complete
• global_bootstrap_init_start
• global_bootstrap_init_complete
• cache_permissions
• fetch_foruminfo
• global_state_check
• global_bootstrap_complete
• global_start
• style_fetch
• global_setup_complete
• bbcode_fetch_tags
• bbcode_create
• bbcode_parse_start
• bbcode_parse_complete_precache
• bbcode_parse_complete
• cache_templates
• cache_templates_process
• template_register_var
• template_render_output
• fetch_template_start
• fetch_template_complete
• parse_templates