GenoCode Getting startedThe languageCreatures Open the app

Creatures › Flapper

Flapper: A little bird that beats its wings and bobs as time goes by.

Flapper

A little bird that beats its wings and bobs as time goes by.

5 genes · moves by itself

Open in GenoCodeDownload Flapper.genie

Genes

The values that change when Flapper mutates, breeds and morphs.

GeneWhat it doesRangeValue
bodyany huehsv(200, 0.7, 0.9, 1)
tipsany huehsv(320, 0.7, 1, 1)
flaphow far the wings beat0 to 7035
speedwing beats per second0.2 to 4, by ratios1.5
spanfeathers in each wing3 to 12, steps of 16

The code

creature Flapper
// A little bird that beats its wings and bobs as time goes by.

gene body  = hsv(200, 0.7, 0.9) in hsv(0, 0.3, 0.5)..hsv(360, 1, 1)
gene tips  = hsv(320, 0.7, 1) in hsv(0, 0.3, 0.5)..hsv(360, 1, 1)
gene flap  = 35  in 0..70         // how far the wings beat
gene speed = 1.5 in 0.2..4 log    // wing beats per second
gene span  = 6   in 3..12 step 1  // feathers in each wing

let skin = gradient(body, tips)

move (0, 0.3 * wave(time * speed), 0)
pitch 35  // lean towards the viewer, so the wings show

branch {
  colour body
  lay { grow (1.6, 1.4, 2.2) }
  forward 1.2
  move (0, 0.5, 0)
  lay { grow 1.1 }
  colour tips
  shape cone
  forward 0.7
  lay { grow (0.3, 0.3, 0.6) }
}

symmetric x {
  wing
}

part wing {
  yaw 90
  forward 0.6
  pitch -flap * wave(time * speed)
  repeat span as i {
    colour skin(i / (span - 1))
    forward 0.45
    lay { grow (0.7, 0.15, 0.9 - 0.05 * i) }
  }
}

background {
  fill gradient(hsv(220, 0.6, 0.15), hsv(200, 0.5, 0.45))
}

← CobraAll creaturesFlowerball →