khan academy js

Quick Jump: ShapesComplex ShapesColorsTextTransformsEnvironmentMouseKeyboardMathTrigDate/TimeDebuggingJavaScript 

ProcessingJS

Colors

See also: colorModeredgreenbluealphahuesaturationbrightness

Text

See also: textWidthtextAscenttextDescenttextLeadingtextAlign

Transforms

See also: pushMatrix/popMatrixresetMatrixprintMatrix

Environment

See also: Program.assertEqualProgram.restartframeRate(fps) frameCountloop / noLoop

Mouse

Keyboard

  • key 
    Number representing which key is pressed
  • keyCode 
    Represents when a special key is pressed
  • keyIsPressed 
    True if a key is being pressed, false otherwise

Math

  • round(num) 
    Return nearest integer
  • ceil(num) 
    Return nearest integer of greater/equal value
  • floor(num) 
    Return nearest integer of lesser/equal value
  • PVector(x, y) 
    An object that describes a 2-dimensional vector

See also: magexpmapnormlerpnoisenoiseDetailRandom.nextGaussian

Trigonometry

See also: acosasinatanatan2radiansdegreesangleMode

Date & Time

  • millis() 
    Milliseconds elapsed since program start

Debugging

JavaScript

Our documentation does not cover the many ways to use JavaScript. Learn more at:

This reference is based on ProcessingJS reference and is licensed under the CC BY-NC-SA 2.0 license.

posted @ 2016-05-04 13:49  Mose  阅读(209)  评论(0编辑  收藏  举报