codeworld-base-0.2.0.0: Replacement base module for CodeWorld

Safe HaskellNone
LanguageHaskell98

Parameter

Description

Warning: This is an experimental API. It can change at any time.

Synopsis

Documentation

parametricDrawingOf :: ([Parameter], [Number] -> Picture) -> Program #

A drawing that depends on parameters. The first argument is a list of parameters. The second is a picture, which depends on the values of those parameters. Each number used to retrieve the picture is the value of the corresponding parameter in the first list.

slider :: Text -> Parameter #

A Parameter that can be adjusted continuously between 0 and 1.

toggle :: Text -> Parameter #

A Parameter that can be toggled between 0 (off) and 1 (on).

counter :: Text -> Parameter #

A Parameter that counts how many times it has been clicked.

constant :: (Text, Number) -> Parameter #

A Parameter with a constant value, and no way to change it.

random :: Text -> Parameter #

A Parameter that has a randomly chosen value. It offers a button to regenerate its value.

timer :: Text -> Parameter #

A Parameter that changes over time. It can be paused or reset.

converted :: (Parameter, Number -> Number) -> Parameter #

Adjusts the output of a parameter by passing it through a conversion function. Built-in parameters usually range from 0 to 1, and conversions can be used to rescale the output to a different range.

renamed :: (Parameter, Text) -> Parameter #

Changes the name of an existing parameter.