Skip to content

Latest commit

 

History

History
132 lines (107 loc) · 1.94 KB

documentation.md

File metadata and controls

132 lines (107 loc) · 1.94 KB

CanvasConverse Documentation

(Generated from generateDocumentation.js to clipboard - 2025/01/03th.)

Methods

constructor(/** still need to call init */)
init(canvas, options = {})
rectangle({
    x,
    y,
    w,
    h,
    rotation = 0 /* degrees */,
    rotationX /* x position of rotation */,
    rotationY /* y position of rotation */,
    fill,
    stroke,
    physics,
    addObject = true,
  })
triangle({
    x1,
    y1,
    x2,
    y2,
    x3,
    y3,
    rotation = 0 /* degrees */,
    rotationX /* x position of rotation */,
    rotationY /* y position of rotation */,
    fill,
    physics,
    addObject = true,
  })
ellipse({
    x,
    y,
    r,
    rx,
    ry,
    fill,
    centerRotation = 0 /* degrees */,
    centerStartAngle = 0 /* degrees */,
    centerEndAngle = 360 /* degrees */,
    rotation = 0 /* degrees */,
    rotationX /* x position of rotation */,
    rotationY /* y position of rotation */,
    counterclockwise = false,
    physics,
    addObject = true,
  })
line({
    x1,
    y1,
    x2,
    y2,
    lineWidth,
    stroke,
    rotation = 0 /* degrees */,
    rotationX /* x position of rotation */,
    rotationY /* y position of rotation */,
    physics,
    addObject = true,
  })
draw({
      rotation = 0 /* degrees */,
      rotationX /* x position of rotation */,
      rotationY /* y position of rotation */,
      fill,
      physics,
      addObject = true,
    },
    callbackWithContext)
group(objectToAttachTo, arrayOfObjectsToAttach = [])
clear()

Properties

objects: object

NaivePhysics Documentation

(Generated from generateDocumentation.js to clipboard - 2025/01/03th.)

Methods

constructor(canvasConverse)

Properties

canvasConverse: object

objects: undefined

canvas: undefined

context: undefined

bounceCoefficient: number

collisionCoefficient: number

gravityCoefficient: number