Skip to content

Commit 0c39fd8

Browse files
committed
Mod to Mexican Wave
1 parent 835c95e commit 0c39fd8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

resources/codex/code/step9.ecs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
! The Mexican Wave
22

3+
script Wave
4+
35
div Container
46
div Rectangle
57
variable Height
@@ -32,9 +34,9 @@
3234
set the style of Rectangle to
3335
`position:absolute;width:9%;background:peru;`
3436
cat `display:inline-block;margin-left:0.5%`
35-
set style `top` of Rectangle to `50%`
37+
set style `top` of Rectangle to 200
3638
set style `left` of Rectangle to `calc(10% * ` cat N cat `)`
37-
set style `height` of Rectangle to `100px`
39+
set style `height` of Rectangle to `1px`
3840
add 1 to N
3941
end
4042

@@ -71,7 +73,8 @@ Loop:
7173
clear AllDone ! not finished yet
7274
if Time is greater than Start
7375
begin
74-
put sin Angle radius 100 into Height
76+
put cos Angle radius 100 into Height
77+
negate Height
7578
set style `top` of Rectangle to `calc(50% - ` cat Height cat `px)`
7679
set style `height` of Rectangle to `calc(100px + ` cat Height cat `px)`
7780
add 1 to Angle

0 commit comments

Comments
 (0)