74 lines
2.2 KiB
Plaintext
74 lines
2.2 KiB
Plaintext
%Animal 1.4
|
|
title "AnimalScript Tutorial Animation"
|
|
author "Michael Scholz, Ulf Gebhardt"
|
|
{
|
|
text "header" "List element demo" at (20, 30) depth 1 font SansSerif size 24 bold
|
|
rectangle "hRect" offset (-5, -5) from "header" NW offset (5, 5) from "header" SE depth 2 fillColor white
|
|
}
|
|
{
|
|
codeGroup "listSource" at (10, 200) color black highlightColor blue
|
|
addCodeLine "1. Generate first list element" to "listSource"
|
|
addCodeLine "2. Set link of first list element to null" to "listSource"
|
|
addCodeLine "3. Generate new list element" to "listSource"
|
|
addCodeLine "4. Clear link of second list element" to "listSource"
|
|
addCodeLine "5. Link first with second list element" to "listSource"
|
|
addCodeLine "6. Generate new list element" to "listSource"
|
|
addCodeLine "7. Link new with second element" to "listSource"
|
|
addCodeLine "8. Link first with new element" to "listSource"
|
|
addCodeLine "9. Transform into 'nice' list structure" to "listSource"
|
|
}
|
|
{
|
|
highlightCode on "listSource" line 0
|
|
listelement "elemA" (100, 80) text "Elem1" pointers 1 after 20 ticks
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 0
|
|
highlightCode on "listSource" line 1
|
|
clearLink "elemA"
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 1
|
|
highlightCode on "listSource" line 2
|
|
listelement "elemB" offset (130, 0) from "elemA" NE text "Elem2" pointers 1
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 2
|
|
highlightCode on "listSource" line 3
|
|
clearLink "elemB"
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 3
|
|
highlightCode on "listSource" line 4
|
|
setLink "elemA" to "elemB" within 20 ticks
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 4
|
|
highlightCode on "listSource" line 5
|
|
listelement "elemC" offset (80, 50) from "elemA" NW text "Elem3" pointers 1
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 5
|
|
highlightCode on "listSource" line 6
|
|
setLink "elemA" to "elemC" within 20 ticks
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 6
|
|
highlightCode on "listSource" line 7
|
|
setLink "elemC" link 1 to "elemB"
|
|
}
|
|
{
|
|
unhighlightCode on "listSource" line 7
|
|
highlightCode on "listSource" line 8
|
|
line "moveLine1" offset (0, 0) from "elemC" SE offset (0, 0) from "elemB" SW hidden
|
|
move "elemC" type "translateWithFixedTip" via "moveLine1" after 20 ticks within 20 ticks
|
|
move "elemA" type "setTip #1" via "moveLine1" after 20ms within 20 ticks
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|