Skip to content

zohoMatt/canvas-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Tree

Intro

This project is a canvas experiment. You can adjust parameters to draw a perfect tree for yourself!
图片名称

Basic

  • Click the mouse to draw a tree using current settings on the control panel.
  • The control panel can be folded and unfolded.

Control panel

Based on dat.gui, a light-weight UI controller.

图片名称

message

Just a text description. As written, all settings will be applied on the next tree.

Shape Settings

Set the scale parameter.

Leaf Settings

  • drawLeaves
    True to draw leaves and False to disable.
  • leavesColor
    Set the color of leaves.
  • leavesWidth
    The leaves are rectangles. Use this to set the width of leaf rectangles.
  • leavesHeight
    Set the height of all leaves.

Branch Settings

  • spread
    Set the symmetry level.
  • branchWidth
    Set the thickness of branches.
  • maxBranchLength
    Set the maximum length of branches.
  • maxBranchGenerations
    All trees are binary trees. Use this to set the height of all trees.

Buttons

  • random
    Randomly generate a suite of settings.
  • clear
    Clear the canvas.

ChangeLog

v1.0.0

  • First released on Github pages.

About

A canvas experiment to draw trees.

Resources

Stars

Watchers

Forks

Packages

No packages published