Chalkboard - v3.0.1
    Preparing search index...

    Function line3D

    • Draws a three-dimensional line (or rather, a two-dimensional line with three-dimensional perspective).

      Parameters

      • x1: number

        The first x-coordinate

      • y1: number

        The first y-coordinate

      • z1: number

        The first z-coordinate

      • x2: number

        The second x-coordinate

      • y2: number

        The second y-coordinate

      • z2: number

        The second z-coordinate

      • context: CanvasRenderingContext2D = ...

      Returns void

      // Note: you must have a canvas tag somewhere.

      // Draws a line on the screen from (0, 0, 0) to (200, 100, -10)
      Chalkboard.geom.line3D(0, 0, 0, 200, 100, -10);