Skip to content
Peter Lager edited this page Apr 18, 2025 · 12 revisions

Using Turtle Graphics and Turtle Text in your own webpages?

To use these these in your in your own webpage add the following code to the HTML in your webpage

  <script language="javascript" type="text/javascript"
    src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics@1.0.0/dist/lib/tg.min.js">
  </script>

  <script language="javascript" type="text/javascript"
    src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics@1.0.0/dist/lib/tt.min.js">
  </script>

replacing 1.0.0 with the library version number you wish to use.

If you don't include a version number, the latest available version will be used i.e.

  <script language="javascript" type="text/javascript"
    src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics/dist/lib/tg.min.js">
  </script>

  <script language="javascript" type="text/javascript"
    src="https://cdn.jsdelivr.net/gh/quarks/turtle-graphics/dist/lib/tt.min.js">
  </script>

Turtle Text is an extension to the Turtle Graphics library and will not work without it.

About turtle Graphics

Turtle graphics came into being in the late 1960s when Seymour Papert added support for it to the Logo programming language. Since then there have been numerous implementations of both Logo and Turtle Graphics in several programming languages. Python includes a turtle graphics module as part of its standard library.

This library implementation is written in pure JavaScript and has no other dependencies although the examples use p5js because it provides a simple framework to demonstrate the library.

Clone this wiki locally