khan academy js

Quick Jump: Shapes, Complex Shapes, Colors, Text, Transforms, Environment, Mouse, Keyboard, Math, Trig, Date/Time, Debugging, JavaScript 

ProcessingJS

Colors

See also: colorMode, red, green, blue, alpha, hue, saturation, brightness

Text

See also: textWidth, textAscent, textDescent, textLeading, textAlign

Transforms

See also: pushMatrix/popMatrix, resetMatrix, printMatrix

Environment

See also: Program.assertEqual, Program.restart, frameRate(fps) frameCount, loop / 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: mag, exp, map, norm, lerp, noise, noiseDetail, Random.nextGaussian

Trigonometry

See also: acos, asin, atan, atan2, radians, degrees, angleMode

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  阅读(294)  评论(0)    收藏  举报