<s> from __future__ import absolute_import , division , print_function , unicode_literals <EOL> """<STR_LIT>""" <EOL> import random , time <EOL> import demo <EOL> import pi3d <EOL> BACKGROUND = ( <NUM_LIT:0.0> , <NUM_LIT:0.0> , <NUM_LIT:0.0> , <NUM_LIT:0.0> ) <EOL> DISPLAY = pi3d . Display . create ( background = BACKGROUND , frames_per_second = <NUM_LIT:20> ) <EOL> SHADER = pi3d . Shader ( '<STR_LIT>' ) <EOL> TEXTURE = pi3d . Texture ( '<STR_LIT>' ) <EOL> BERRY_COUNT = <NUM_LIT:20> <EOL> RASPBERRIES = [ ] <EOL> for b in range ( BERRY_COUNT ) : <EOL> size = random . uniform ( <NUM_LIT:0.5> , <NUM_LIT> ) <EOL> rasp = pi3d . ImageSprite ( texture = TEXTURE , shader = SHADER , w = size , h = size ) <EOL> dist = random . uniform ( <NUM_LIT> , <NUM_LIT> ) <EOL> rasp . position ( random . uniform ( - <NUM_LIT:1.0> , <NUM_LIT:1.0> ) * dist , <EOL> random . uniform ( <NUM_LIT:0.0> , <NUM_LIT> ) * dist , <EOL> dist ) <EOL> rasp . rotateToZ ( random . uniform ( <NUM_LIT:0.0> , <NUM_LIT> ) ) <EOL> RASPBERRIES . append ( rasp ) <EOL> DISPLAY . add_sprites ( rasp ) <EOL> KEYBOARD = pi3d . Keyboard ( ) <EOL> while DISPLAY . loop_running ( ) : <EOL> for b in RASPBERRIES : <EOL> b . translateY ( - <NUM_LIT:0.1> ) <EOL> b . rotateIncZ ( <NUM_LIT:1> ) <EOL> if b . y ( ) < - <NUM_LIT:2> * b . z ( ) : <EOL> b . positionX ( ( random . uniform ( <NUM_LIT:0.0> , <NUM_LIT> ) - <NUM_LIT:1> ) * b . z ( ) ) <EOL> b . translateY ( <NUM_LIT> * b . z ( ) ) <EOL> k = KEYBOARD . read ( ) <EOL> if k > - <NUM_LIT:1> : <EOL> if k == <NUM_LIT> : <EOL> KEYBOARD . close ( ) <EOL> DISPLAY . stop ( ) <EOL> break <EOL> elif k == <NUM_LIT> : <EOL> pi3d . screenshot ( '<STR_LIT>' ) </s>
