{
  "id": "task_libraries:canvas/javascript",
  "path": "/exapedia/javascript-canvas-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript canvas libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript canvas libraries draw and update two-dimensional graphics in the browser through the HTML canvas element or SVG. Many of them keep each shape as an object that code can move, transform, or listen to for events. These libraries draw the diagrams, whiteboards, design editors, and games that run in web apps."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript canvas libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#roughjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#zrender",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#konva",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F169"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pixijs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fabric-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#antv-g",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#paper-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pfive",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#roughjs",
          "label": [
            {
              "t": "text",
              "text": "Rough.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F134"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "SVG output",
            "Canvas shape hit testing"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#roughjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#zrender",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#konva",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F169"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pixijs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#fabric-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#antv-g",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#paper-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F235"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pfive",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "roughjs",
          "name": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/rough-stuff/rough"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/roughjs"
            },
            {
              "label": "Docs",
              "href": "https://roughjs.com"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F269"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://roughjs.com",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F133"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/excalidraw/excalidraw",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "const generateArrowheadLinesToTip = (\n  generator: RoughGenerator,\n  arrowheadPoints: number[] | null,\n  lineOptions: Options,\n) => {\n  if (arrowheadPoints === null) {\n    return [];\n  }\n\n  const [x2, y2, x3, y3, x4, y4] = arrowheadPoints;\n\n  return [\n    generator.line(x3, y3, x2, y2, lineOptions),\n    generator.line(x4, y4, x2, y2, lineOptions),\n  ];\n};",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/excalidraw/excalidraw/blob/d732d4f3d50e6ac092ec6e86a4e04a40546a9395/packages/element/src/shape.ts#L313-L328",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=roughjs%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F133"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import rough from 'roughjs';\nconst rc = rough.canvas(document.getElementById('canvas'));\nrc.rectangle(10, 10, 100, 80);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/pshihn/rough/wiki",
                  "label": [
                    {
                      "t": "text",
                      "text": "Rough.js wiki"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F138"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "zrender",
          "name": [
            {
              "t": "fact",
              "fact": "F151"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ecomfe/zrender"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/zrender"
            },
            {
              "label": "Docs",
              "href": "https://github.com/ecomfe/zrender#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F270"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/ecomfe/zrender#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/apache/echarts",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export function makePath(\n    pathData: string,\n    opts: SVGPathOption,\n    rect: ZRRectLike,\n    layout?: 'center' | 'cover'\n): SVGPath {\n    const path = pathTool.createFromString(pathData, opts);\n    if (rect) {\n        if (layout === 'center') {\n            rect = centerGraphic(rect, path.getBoundingRect());\n        }\n        resizePath(path, rect);\n    }\n    return path;\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/apache/echarts/blob/34f4d927eafe251f26f63afd3aeefa30f2feba30/src/util/graphic.ts#L184-L198",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F166"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=zrender%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import * as zrender from 'zrender';\nconst zr = zrender.init(document.getElementById('main'));\nzr.add(new zrender.Circle({ shape: { cx: 80, cy: 80, r: 40 }, style: { fill: 'red' } }));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ecomfe.github.io/zrender-doc/public/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "api.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "konva",
          "name": [
            {
              "t": "fact",
              "fact": "F169"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/konvajs/konva"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/konva"
            },
            {
              "label": "Docs",
              "href": "https://konvajs.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F13"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://konvajs.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F169"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F21"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/konvajs/react-konva",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F183"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export function applyNodeProps(instance, props, oldProps = EMPTY_PROPS) {\n  // don't use zIndex in react-konva\n  if (!zIndexWarningShowed && 'zIndex' in props) {\n    console.warn(Z_INDEX_WARNING);\n    zIndexWarningShowed = true;\n  }\n\n  // check correct draggable usage\n  if (!dragWarningShowed && props.draggable) {\n    var hasPosition = props.x !== undefined || props.y !== undefined;\n    var hasEvents = props.onDragEnd || props.onDragMove;\n    if (hasPosition && !hasEvents) {\n      console.warn(DRAGGABLE_WARNING);\n      dragWarningShowed = true;\n    }\n  }\n\n  var updatedProps = {};\n  var hasUpdates = false;\n\n  // check old props\n  // we need to unset properties that are not in new props\n  // and remove all events\n  for (var key in oldProps) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var propChanged = oldProps[key] !== props[key];\n\n    // if that is a changed event, we need to remove it\n    if (isEvent && propChanged) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // Remove by namespace because react-konva binds at most one listener\n      // for each event in that namespace.\n      instance.off(eventName + EVENTS_NAMESPACE);\n    }\n    var toRemove = !props.hasOwnProperty(key);\n    if (!isEvent && toRemove) {\n      updatedProps[key] = undefined;\n      hasUpdates = true;\n    }\n  }\n\n  var strictUpdate = useStrictMode || props._useStrictMode;\n  const newEvents = {};\n\n  for (var key in props) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var toAdd = oldProps[key] !== props[key];\n    if (isEvent && toAdd) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // check that event is not undefined\n      if (props[key]) {\n        newEvents[eventName] = props[key];\n      }\n    }\n    if (\n      !isEvent &&\n      (props[key] !== oldProps[key] ||\n        (strictUpdate && props[key] !== instance.getAttr(key)))\n    ) {\n      hasUpdates = true;\n      updatedProps[key] = props[key];\n    }\n  }\n\n  if (hasUpdates) {\n    instance.setAttrs(updatedProps);\n    updatePicture(instance);\n  }\n\n  // subscribe to events AFTER we set attrs\n  // we need it to fix https://github.com/konvajs/react-konva/issues/471\n  // settings attrs may add events. Like \"draggable: true\" will add \"mousedown\" listener\n  for (var eventName in newEvents) {\n    // first clear any existing listeners, it is required for strict mode\n    instance.off(eventName + EVENTS_NAMESPACE);\n    // then attach new one\n    instance.on(eventName + EVENTS_NAMESPACE, newEvents[eventName]);\n  }\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/konvajs/react-konva/blob/be9feb46cacfdff6c4c3bb0277b222448c7c94f7/src/makeUpdates.ts#L38-L134",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20konva%20for%20editor%20JSON%20restoration%2C%20canvas%20node%20reconciliation%2C%20Bezier%20geometry%20and%20zoomed%20viewport%20coordinate%20conversion&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F169"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Konva from 'konva';\nconst stage = new Konva.Stage({ container: 'container', width: 300, height: 200 });\nconst layer = new Konva.Layer();\nlayer.add(new Konva.Circle({ x: 80, y: 80, radius: 40, fill: 'red' }));\nstage.add(layer);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://konvajs.org/docs/overview.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F174"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pixijs",
          "name": [
            {
              "t": "fact",
              "fact": "F185"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pixijs/pixijs"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/pixi.js"
            },
            {
              "label": "Docs",
              "href": "http://pixijs.com/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "http://pixijs.com/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/pixijs-userland/pixi-viewport",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "public toWorld<P extends PointData = Point>(x: number | PointData, y?: number): P\n    {\n        if (arguments.length === 2)\n        {\n            return this.toLocal<P>(new Point(x as number, y));\n        }\n\n        return this.toLocal<P>(x as PointData);\n    }",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/pixijs-userland/pixi-viewport/blob/e6423e72f1055f5446f015fa0eed3dc29c8a7f13/src/Viewport.ts#L412-L420",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F198"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20pixi.js%20for%20editor%20JSON%20restoration%2C%20canvas%20node%20reconciliation%2C%20Bezier%20geometry%20and%20zoomed%20viewport%20coordinate%20conversion&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Application, Graphics } from 'pixi.js';\nconst app = new Application();\nawait app.init({ width: 300, height: 200 });\ndocument.body.appendChild(app.canvas);\napp.stage.addChild(new Graphics().rect(20, 20, 100, 80).fill('red'));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://pixijs.download/v8.23.0/docs/app.Application.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "fabric-js",
          "name": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/fabricjs/fabric.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/fabric"
            },
            {
              "label": "Docs",
              "href": "http://fabricjs.com/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "http://fabricjs.com/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/xRyul/obsidian-image-converter",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F215"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "private clearAll() {\n\t\tif (!this.canvas) return;\n\t\n\t\tconst message = 'Are you sure you want to clear all annotations?';\n\t\tconst confirmText = 'Clear';\n\t\n\t\tnew ConfirmDialog(this.app, 'Clear Annotations', message, confirmText, () => {\n\t\t\tconst objects = this.canvas.getObjects();\n\t\t\t// Remove all objects except the background image (first object)\n\t\t\tobjects.slice(1).forEach(obj => this.canvas.remove(obj));\n\t\t\tthis.canvas.requestRenderAll();\n\t\t\tthis.saveState(); // IMPORTANT: Save the cleared state\n\t\t}).open();\n\t}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/xRyul/obsidian-image-converter/blob/e383c4dd4d1ea9852a14d75afad8f495f83d1298/src/ImageAnnotation.ts#L2598-L2611",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20fabric%20for%20editor%20JSON%20restoration%2C%20canvas%20node%20reconciliation%2C%20Bezier%20geometry%20and%20zoomed%20viewport%20coordinate%20conversion&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Canvas, Rect } from 'fabric';\nconst canvas = new Canvas('canvas', { width: 300, height: 200 });\ncanvas.add(new Rect({ left: 20, top: 20, width: 100, height: 80, fill: 'red' }));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://fabricjs.com/api/classes/canvas/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F206"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "antv-g",
          "name": [
            {
              "t": "fact",
              "fact": "F217"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/antvis/G"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@antv/g"
            },
            {
              "label": "Docs",
              "href": "https://github.com/antvis/g#readme"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F271"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/antvis/g#readme",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/antvis/G6",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "protected onPointerDown(event: IPointerEvent) {\n    if (!this.validate(event) || !this.isKeydown() || this.startPoint) return;\n    const { canvas, graph } = this.context;\n    const style = { ...this.options.style };\n\n    // 根据缩放比例调整 lineWidth\n    // Adjust lineWidth according to the zoom ratio\n    if (this.options.style.lineWidth) {\n      style.lineWidth = +this.options.style.lineWidth / graph.getZoom();\n    }\n\n    this.rectShape = new Rect({ id: 'g6-brush-select', style });\n    canvas.appendChild(this.rectShape);\n\n    this.startPoint = [event.canvas.x, event.canvas.y];\n  }",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/antvis/G6/blob/e64ab9af480b6f3a0a40db1c62a924d340c06ee1/packages/g6/src/behaviors/brush-select.ts#L144-L159",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F232"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40antv/g%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Canvas, Circle } from '@antv/g';\nimport { Renderer } from '@antv/g-canvas';\nconst canvas = new Canvas({ container: 'container', width: 300, height: 200, renderer: new Renderer() });\nawait canvas.ready;\ncanvas.appendChild(new Circle({ style: { cx: 80, cy: 80, r: 40, fill: 'red' } }));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://g.antv.antgroup.com/en/guide/getting-started",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "paper-js",
          "name": [
            {
              "t": "fact",
              "fact": "F235"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/paperjs/paper.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/paper"
            },
            {
              "label": "Docs",
              "href": "http://paperjs.org"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F88"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "http://paperjs.org",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F235"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/glenzli/paperjs-offset",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function offsetSegment(segment: paper.Segment, curve: paper.Curve, handleNormal: paper.Point, offset: number) {\n  const isFirst = segment.curve === curve;\n  // get offset vector\n  const offsetVector = (curve.getNormalAtTime(isFirst ? 0 : 1)).multiply(offset);\n  // get offset point\n  const point = segment.point.add(offsetVector);\n  const newSegment = new paper.Segment(point);\n  // handleOut for start segment & handleIn for terminal segment\n  const handle = (isFirst ? 'handleOut' : 'handleIn') as HandleType;\n  newSegment[handle] = segment[handle]!.add(handleNormal.subtract(offsetVector).divide(2));\n  return newSegment;\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/glenzli/paperjs-offset/blob/f3ed87fc640bc101f9d9454e1748a3e3c15b335e/src/offset_core.ts#L85-L96",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F248"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20projects%20using%20paper%20for%20editor%20JSON%20restoration%2C%20canvas%20node%20reconciliation%2C%20Bezier%20geometry%20and%20zoomed%20viewport%20coordinate%20conversion&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F235"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import paper from 'paper';\npaper.setup(document.getElementById('canvas'));\nnew paper.Path.Circle({ center: [80, 80], radius: 40, fillColor: 'red' });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://paperjs.org/tutorials/getting-started/using-javascript-directly/",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F240"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pfive",
          "name": [
            {
              "t": "fact",
              "fact": "F251"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/processing/p5.js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/p5"
            },
            {
              "label": "Docs",
              "href": "https://p5js.org"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F272"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://p5js.org",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F251"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/CodingTrain/Coding-Challenges",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F267"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function draw() {\n  background(0);\n\n  if (i < values.length) {\n    for (let j = 0; j < values.length - i - 1; j++) {\n      let a = values[j];\n      let b = values[j + 1];\n      if (a > b) {\n        swap(values, j, j + 1);\n      }\n    }\n  } else {\n    console.log('finished');\n    noLoop();\n  }\n  i++;\n\n  for (let i = 0; i < values.length; i++) {\n    stroke(255);\n    line(i, height, i, height - values[i]);\n  }\n}",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/CodingTrain/Coding-Challenges/blob/576bc7c1b60e2fadf4a18e81b06e359cda57751a/114_BubbleSortViz/P5/sketch.js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F266"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=p5%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F251"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "function setup() {\n  createCanvas(400, 400);\n}\nfunction draw() {\n  background(220);\n}\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://p5js.org/tutorials/get-started/",
                  "label": [
                    {
                      "t": "text",
                      "text": "get-started"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F256"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript canvas library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#konva",
          "label": [
            {
              "t": "text",
              "text": "Konva"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#fabric-js",
          "label": [
            {
              "t": "text",
              "text": "Fabric.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " keep each shape as an object with its own events and transforms, the model behind editors and whiteboards. "
        },
        {
          "t": "link",
          "href": "#pixijs",
          "label": [
            {
              "t": "text",
              "text": "PixiJS"
            }
          ]
        },
        {
          "t": "text",
          "text": " renders sprite and graphics scenes, and "
        },
        {
          "t": "link",
          "href": "#paper-js",
          "label": [
            {
              "t": "text",
              "text": "Paper.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " works with editable vector paths."
        }
      ]
    },
    {
      "q": "What is Rough.js?",
      "a": [
        {
          "t": "link",
          "href": "#roughjs",
          "label": [
            {
              "t": "text",
              "text": "Rough.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " draws lines, curves, arcs, polygons, circles, and ellipses in a hand-drawn, sketchy style on canvas or SVG. It has the most monthly downloads of these libraries, at "
        },
        {
          "t": "fact",
          "fact": "F134"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "q": "Konva vs Fabric: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Fabric.js ships built-in controls to move, scale, rotate, and skew objects, and its IText edits text directly on the canvas. Konva gives each shape its own events and drag behavior, and text editing goes through a DOM input."
        }
      ]
    },
    {
      "q": "Can users edit Konva text directly inside the canvas?",
      "a": [
        {
          "t": "fact",
          "fact": "F119"
        },
        {
          "t": "text",
          "text": " "
        },
        {
          "t": "fact",
          "fact": "F120"
        }
      ]
    },
    {
      "q": "Does saving Konva JSON preserve images and event handlers?",
      "a": [
        {
          "t": "fact",
          "fact": "F121"
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, konva",
      "display": "Konva",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, konva",
      "display": "14.9M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, konva",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, konva",
      "display": "10.9.1",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, konva",
      "display": "v10.9.1",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, konva",
      "display": "15.0K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Drags canvas objects, konva",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Edits text on canvas, konva",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Imports SVG artwork, konva",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Restores saved scenes, konva",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, konva",
      "display": "PNG",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, konva",
      "display": "npm install konva",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, konva",
      "display": "Provides a canvas scene graph with shape events, dragging, transforms, animation, and image export.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, konva",
      "display": "Gives each shape interaction events",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, konva",
      "display": "Handle dragging, transforms, and animation on individual scene nodes.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, konva",
      "display": "Restores serialized node trees",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, konva",
      "display": "Create a stage from JSON and reconnect application behavior afterward.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, konva",
      "display": "Text input needs DOM elements",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, konva",
      "display": "Overlay a native text input or textarea for editing.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations lead, konva",
      "display": "JSON omits images and handlers",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "limitations, konva",
      "display": "Restore image assets and event listeners after loading a saved stage.",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Quickstart, konva",
      "display": "import Konva from 'konva';\n\nconst container = document.createElement('div');\ndocument.body.appendChild(container);\n\nconst stage = new Konva.Stage({ container, width: 600, height: 400 });\nconst layer = new Konva.Layer();\nconst box = new Konva.Rect({\n  x: 50,\n  y: 50,\n  width: 120,\n  height: 80,\n  fill: '#00a8e8',\n  draggable: true,\n});\n\nlayer.add(box);\nstage.add(layer);\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function, konva",
      "display": "export function applyNodeProps(instance, props, oldProps = EMPTY_PROPS) {\n  // don't use zIndex in react-konva\n  if (!zIndexWarningShowed && 'zIndex' in props) {\n    console.warn(Z_INDEX_WARNING);\n    zIndexWarningShowed = true;\n  }\n\n  // check correct draggable usage\n  if (!dragWarningShowed && props.draggable) {\n    var hasPosition = props.x !== undefined || props.y !== undefined;\n    var hasEvents = props.onDragEnd || props.onDragMove;\n    if (hasPosition && !hasEvents) {\n      console.warn(DRAGGABLE_WARNING);\n      dragWarningShowed = true;\n    }\n  }\n\n  var updatedProps = {};\n  var hasUpdates = false;\n\n  // check old props\n  // we need to unset properties that are not in new props\n  // and remove all events\n  for (var key in oldProps) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var propChanged = oldProps[key] !== props[key];\n\n    // if that is a changed event, we need to remove it\n    if (isEvent && propChanged) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // Remove by namespace because react-konva binds at most one listener\n      // for each event in that namespace.\n      instance.off(eventName + EVENTS_NAMESPACE);\n    }\n    var toRemove = !props.hasOwnProperty(key);\n    if (!isEvent && toRemove) {\n      updatedProps[key] = undefined;\n      hasUpdates = true;\n    }\n  }\n\n  var strictUpdate = useStrictMode || props._useStrictMode;\n  const newEvents = {};\n\n  for (var key in props) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var toAdd = oldProps[key] !== props[key];\n    if (isEvent && toAdd) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // check that event is not undefined\n      if (props[key]) {\n        newEvents[eventName] = props[key];\n      }\n    }\n    if (\n      !isEvent &&\n      (props[key] !== oldProps[key] ||\n        (strictUpdate && props[key] !== instance.getAttr(key)))\n    ) {\n      hasUpdates = true;\n      updatedProps[key] = props[key];\n    }\n  }\n\n  if (hasUpdates) {\n    instance.setAttrs(updatedProps);\n    updatePicture(instance);\n  }\n\n  // subscribe to events AFTER we set attrs\n  // we need it to fix https://github.com/konvajs/react-konva/issues/471\n  // settings attrs may add events. Like \"draggable: true\" will add \"mousedown\" listener\n  for (var eventName in newEvents) {\n    // first clear any existing listeners, it is required for strict mode\n    instance.off(eventName + EVENTS_NAMESPACE);\n    // then attach new one\n    instance.on(eventName + EVENTS_NAMESPACE, newEvents[eventName]);\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project function reference, konva",
      "display": "makeUpdates.ts · applyNodeProps()",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project repository, konva",
      "display": "konvajs/react-konva",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project stars, konvajs/react-konva",
      "display": "6.4K",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Project push date, konvajs/react-konva",
      "display": "Oct 2026",
      "asOf": "2026-10-15"
    },
    "F28": {
      "label": "Library name, pixi.js",
      "display": "PixiJS",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Monthly downloads, pixi.js",
      "display": "7.0M",
      "asOf": "2026-11-15"
    },
    "F30": {
      "label": "License, pixi.js",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Package release, pixi.js",
      "display": "8.23.0",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Undated package release, pixi.js",
      "display": "v8.23.0",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Repository stars, pixi.js",
      "display": "48.7K",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Imports SVG artwork, pixi.js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Output formats, pixi.js",
      "display": "PNG",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, pixi.js",
      "display": "npm install pixi.js",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, pixi.js",
      "display": "Builds rendered scenes from sprites, graphics, text, and assets, with SVG texture or geometry loading.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, pixi.js",
      "display": "Loads SVG textures or geometry",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, pixi.js",
      "display": "Choose sprite textures or editable Graphics geometry for SVG artwork.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, pixi.js",
      "display": "Exports rendered content as PNG",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, pixi.js",
      "display": "Download a scene or object as a PNG image.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, pixi.js",
      "display": "Changing text rebuilds its texture",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, pixi.js",
      "display": "Use BitmapText for text that changes every frame.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, pixi.js",
      "display": "SVG textures lose vector scalability",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, pixi.js",
      "display": "Use Graphics geometry when SVG artwork must scale cleanly.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, pixi.js",
      "display": "import { Application, Assets, Sprite } from 'pixi.js';\n\n(async () =>\n{\n    // Create a new application\n    const app = new Application();\n\n    // Initialize the application\n    await app.init({ background: '#1099bb', resizeTo: window });\n\n    // Append the application canvas to the document body\n    document.body.appendChild(app.canvas);\n\n    // Load the bunny texture\n    const texture = await Assets.load('https://pixijs.com/assets/bunny.png');\n\n    // Create a bunny Sprite\n    const bunny = new Sprite(texture);\n\n    // Center the sprite's anchor point\n    bunny.anchor.set(0.5);\n\n    // Move the sprite to the center of the screen\n    bunny.x = app.screen.width / 2;\n    bunny.y = app.screen.height / 2;\n\n    app.stage.addChild(bunny);\n\n    // Listen for animate update\n    app.ticker.add((time) =>\n    {\n        // Just for fun, let's rotate mr rabbit a little.\n        // * Delta is 1 if running at 100% performance *\n        // * Creates frame-independent transformation *\n        bunny.rotation += 0.1 * time.deltaTime;\n    });\n})();\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, pixi.js",
      "display": "public toWorld<P extends PointData = Point>(x: number | PointData, y?: number): P\n    {\n        if (arguments.length === 2)\n        {\n            return this.toLocal<P>(new Point(x as number, y));\n        }\n\n        return this.toLocal<P>(x as PointData);\n    }\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, pixi.js",
      "display": "Viewport.ts · toWorld()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, pixi.js",
      "display": "pixijs-userland/pixi-viewport",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, pixijs-userland/pixi-viewport",
      "display": "1.2K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, pixijs-userland/pixi-viewport",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F52": {
      "label": "Library name, fabric",
      "display": "Fabric.js",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, fabric",
      "display": "5.0M",
      "asOf": "2026-11-15"
    },
    "F54": {
      "label": "License, fabric",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, fabric",
      "display": "7.4.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Undated package release, fabric",
      "display": "v7.4.0",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Repository stars, fabric",
      "display": "31.6K",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Drags canvas objects, fabric",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Edits text on canvas, fabric",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Imports SVG artwork, fabric",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Restores saved scenes, fabric",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Output formats, fabric",
      "display": "PNG, JSON, SVG",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, fabric",
      "display": "npm install fabric@6.4.3",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, fabric",
      "display": "Adds interactive objects, transform controls, editable text, and scene serialization to a canvas.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, fabric",
      "display": "Provides ready-made object controls",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, fabric",
      "display": "Move, scale, rotate, skew, and group objects with built-in interactions.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, fabric",
      "display": "Edits text directly on canvas",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, fabric",
      "display": "IText enters an editing state for interactive text input.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, fabric",
      "display": "Custom fields need export registration",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, fabric",
      "display": "Register application-specific properties before including them in serialized objects.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, fabric",
      "display": "<canvas id=\"canvas\" width=\"300\" height=\"300\"></canvas>\n\n<script src=\"https://cdn.jsdelivr.net/npm/fabric@6.4.3/dist/index.js\"></script>\n<script>\n  const canvas = new fabric.Canvas('canvas');\n  const rect = new fabric.Rect({\n    top: 100,\n    left: 100,\n    width: 60,\n    height: 70,\n    fill: 'red',\n  });\n  canvas.add(rect);\n</script>\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function, fabric",
      "display": "async loadJSON(jsonFile: string | object, callback?: () => void) {\n    // 确保元素存在id\n    const temp = typeof jsonFile === 'string' ? JSON.parse(jsonFile) : jsonFile;\n    const textPaths: Record<'id' | 'path', any>[] = [];\n    temp.objects.forEach((item: any) => {\n      !item.id && (item.id = uuid());\n      // 收集所有路径文本元素i-text，并设置path为null\n      if (item.type === 'i-text' && item.path) {\n        textPaths.push({ id: item.id, path: item.path });\n        item.path = null;\n      }\n    });\n\n    // hookTransform遍历\n    const tempTransform = await this._transform(temp);\n\n    jsonFile = JSON.stringify(tempTransform);\n    // 加载前钩子\n    this.editor.hooksEntity.hookImportBefore.callAsync(jsonFile, () => {\n      this.canvas.loadFromJSON(jsonFile, () => {\n        // 把i-text对应的path加上\n        this.renderITextPath(textPaths);\n        this.canvas.renderAll();\n        // 加载后钩子\n        this.editor.hooksEntity.hookImportAfter.callAsync(jsonFile, () => {\n          // 修复导入带水印的json无法清除问题 #359\n          this.editor?.updateDrawStatus &&\n            typeof this.editor.updateDrawStatus === 'function' &&\n            this.editor.updateDrawStatus(!!temp['overlayImage']);\n          this.canvas.renderAll();\n          callback && callback();\n          this.editor.emit('loadJson');\n        });\n      });\n    });\n  }\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project function reference, fabric",
      "display": "ServersPlugin.ts · loadJSON()",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project repository, fabric",
      "display": "ikuaitu/vue-fabric-editor",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project stars, ikuaitu/vue-fabric-editor",
      "display": "8.0K",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project push date, ikuaitu/vue-fabric-editor",
      "display": "Jul 2026",
      "asOf": "2026-07-21"
    },
    "F77": {
      "label": "Library name, paper",
      "display": "Paper.js",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Monthly downloads, paper",
      "display": "1.5M",
      "asOf": "2026-11-15"
    },
    "F79": {
      "label": "License, paper",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Package release, paper",
      "display": "0.17.0",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Undated package release, paper",
      "display": "v0.17.0",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Repository stars, paper",
      "display": "15.2K",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Drags canvas objects, paper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Imports SVG artwork, paper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Restores saved scenes, paper",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Output formats, paper",
      "display": "SVG",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Install, paper",
      "display": "npm install paper",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "What it does, paper",
      "display": "Provides a vector scene graph with paths, point geometry, SVG import, and project serialization.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths lead, paper",
      "display": "Imports SVG as editable items",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths, paper",
      "display": "Convert external SVG artwork into Paper.js project items.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, paper",
      "display": "Serializes complete vector projects",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, paper",
      "display": "Restore saved JSON data into a project.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations lead, paper",
      "display": "Node rendering needs extra packages",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations, paper",
      "display": "Use paper-jsdom-canvas for server-side canvas rendering.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Quickstart, paper",
      "display": "import paper from 'paper'\n// Or, with CommonJS: const paper = require('paper')\n\npaper.setup(document.getElementById('canvas'))\n\nconst { Path } = paper\nconst circle = new Path.Circle({\n  center: paper.view.center,\n  radius: 30,\n  fillColor: 'red'\n})\n\npaper.view.onFrame = event => {\n  circle.rotate(1)\n}\n",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project function, paper",
      "display": "function offsetSegment(segment: paper.Segment, curve: paper.Curve, handleNormal: paper.Point, offset: number) {\n  const isFirst = segment.curve === curve;\n  // get offset vector\n  const offsetVector = (curve.getNormalAtTime(isFirst ? 0 : 1)).multiply(offset);\n  // get offset point\n  const point = segment.point.add(offsetVector);\n  const newSegment = new paper.Segment(point);\n  // handleOut for start segment & handleIn for terminal segment\n  const handle = (isFirst ? 'handleOut' : 'handleIn') as HandleType;\n  newSegment[handle] = segment[handle]!.add(handleNormal.subtract(offsetVector).divide(2));\n  return newSegment;\n}\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project function reference, paper",
      "display": "offset_core.ts · offsetSegment()",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project repository, paper",
      "display": "glenzli/paperjs-offset",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project stars, glenzli/paperjs-offset",
      "display": "122",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project push date, glenzli/paperjs-offset",
      "display": "Oct 2026",
      "asOf": "2026-10-23"
    },
    "F101": {
      "label": "Developer need",
      "display": "Object selection and transform controls",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Why choose fabric",
      "display": "ready-made object manipulation controls",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need in introduction",
      "display": "object selection and transform controls",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Interactive shape scenes",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose konva",
      "display": "per-shape events and drag behavior",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "interactive shape scenes",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Editable SVG vector projects",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose paper",
      "display": "SVG converted into project items",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "editable SVG vector projects",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need",
      "display": "SVG textures and rendered scenes",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose pixi.js",
      "display": "a choice of SVG texture or Graphics rendering",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "SVG textures and rendered scenes",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "When to consider paper",
      "display": "SVG artwork should become editable vector project items",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Page introduction",
      "display": "JavaScript canvas libraries let application developers draw and manipulate graphics.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which JavaScript canvas library should I choose?",
      "display": "Fabric.js supplies built-in object interactions and controls.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Which JavaScript canvas library should I choose?",
      "display": "Konva provides events and transforms on individual scene nodes.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Which JavaScript canvas library should I choose?",
      "display": "Paper.js imports SVG artwork as editable project items.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Which JavaScript canvas library should I choose?",
      "display": "PixiJS supports SVG texture and Graphics rendering.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Can users edit Konva text directly inside the canvas?",
      "display": "Konva does not support direct Konva.Text editing and recommends native DOM inputs.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Can users edit Konva text directly inside the canvas?",
      "display": "Fabric IText has a native editing state.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Does saving Konva JSON preserve images and event handlers?",
      "display": "Images and event handlers must be manually restored after loading.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: How do I include custom Fabric.js properties in saved objects?",
      "display": "FabricObject.customProperties lists fields to serialize when toObject is called.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does importing an SVG always preserve editable vector objects?",
      "display": "Konva can render SVG through its Image shape.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does importing an SVG always preserve editable vector objects?",
      "display": "Paper imports SVG as project items.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does importing an SVG always preserve editable vector objects?",
      "display": "Pixi supports both textures and Graphics geometry.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Which PixiJS text type fits frequently changing text?",
      "display": "The Canvas Text implementation rerasterizes and uploads its texture when text or styles change.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Which PixiJS text type fits frequently changing text?",
      "display": "Its own text page recommends BitmapText for content changing every frame.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Why does an SVG texture lose quality when enlarged?",
      "display": "Pixi SVG textures do not retain vector scalability.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Why does an SVG texture lose quality when enlarged?",
      "display": "Its Graphics class supports scalable vector geometry.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: Can Paper.js render canvas output in Node?",
      "display": "paper-jsdom-canvas adds Node canvas rendering through Node-Canvas.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Is scene JSON the same as an exported PNG?",
      "display": "Paper imports serialized JSON as editable project data.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: Is scene JSON the same as an exported PNG?",
      "display": "Pixi renderer extraction downloads rendered content as PNG.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "Library name, roughjs",
      "display": "Rough.js",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Monthly downloads, roughjs",
      "display": "97.6M",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "License, roughjs",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Package release, roughjs",
      "display": "4.6.6",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Package release date, roughjs",
      "display": "Nov 2023",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Install, roughjs",
      "display": "npm install roughjs",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Quickstart, roughjs",
      "display": "import rough from 'roughjs';\nconst rc = rough.canvas(document.getElementById('canvas'));\nrc.rectangle(10, 10, 100, 80);\n",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Official description, roughjs",
      "display": "Create graphics using HTML Canvas or SVG with a hand-drawn, sketchy, appearance.",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Quickstart source file, roughjs",
      "display": "wiki (API recipe)",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Repository stars, roughjs",
      "display": "21.4K",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "SVG output, roughjs",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Canvas shape hit testing, roughjs",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Drawing role, roughjs",
      "display": "Sketch-styled primitives over Canvas2D or SVG",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "npm package identifier, roughjs",
      "display": "roughjs",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Project function, roughjs",
      "display": "const generateArrowheadLinesToTip = (\n  generator: RoughGenerator,\n  arrowheadPoints: number[] | null,\n  lineOptions: Options,\n) => {\n  if (arrowheadPoints === null) {\n    return [];\n  }\n\n  const [x2, y2, x3, y3, x4, y4] = arrowheadPoints;\n\n  return [\n    generator.line(x3, y3, x2, y2, lineOptions),\n    generator.line(x4, y4, x2, y2, lineOptions),\n  ];\n};",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Project source file, roughjs",
      "display": "packages/element/src/shape.ts",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project full_name, roughjs",
      "display": "excalidraw/excalidraw",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project stargazers_count, roughjs",
      "display": "135.9K",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Library name, zrender",
      "display": "ZRender",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Monthly downloads, zrender",
      "display": "38.2M",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "License, zrender",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Package release, zrender",
      "display": "6.1.0",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Package release date, zrender",
      "display": "May 2026",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Install, zrender",
      "display": "npm install zrender",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Quickstart, zrender",
      "display": "import * as zrender from 'zrender';\nconst zr = zrender.init(document.getElementById('main'));\nzr.add(new zrender.Circle({ shape: { cx: 80, cy: 80, r: 40 }, style: { fill: 'red' } }));\n",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Official description, zrender",
      "display": "A lightweight graphic library providing 2d draw for Apache ECharts",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Quickstart source file, zrender",
      "display": "api.html (API recipe)",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Repository stars, zrender",
      "display": "6.3K",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "SVG output, zrender",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Canvas shape hit testing, zrender",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Drawing role, zrender",
      "display": "Retained2D scene and Canvas/SVG painters",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "npm package identifier, zrender",
      "display": "zrender",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Project function, zrender",
      "display": "export function makePath(\n    pathData: string,\n    opts: SVGPathOption,\n    rect: ZRRectLike,\n    layout?: 'center' | 'cover'\n): SVGPath {\n    const path = pathTool.createFromString(pathData, opts);\n    if (rect) {\n        if (layout === 'center') {\n            rect = centerGraphic(rect, path.getBoundingRect());\n        }\n        resizePath(path, rect);\n    }\n    return path;\n}",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Project source file, zrender",
      "display": "src/util/graphic.ts",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Project full_name, zrender",
      "display": "apache/echarts",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Project stargazers_count, zrender",
      "display": "67.8K",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Library name, konva",
      "display": "Konva",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Monthly downloads, konva",
      "display": "15.3M",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "License, konva",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Package release, konva",
      "display": "10.9.1",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Package release date, konva",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Install, konva",
      "display": "npm install konva",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Quickstart, konva",
      "display": "import Konva from 'konva';\nconst stage = new Konva.Stage({ container: 'container', width: 300, height: 200 });\nconst layer = new Konva.Layer();\nlayer.add(new Konva.Circle({ x: 80, y: 80, radius: 40, fill: 'red' }));\nstage.add(layer);\n",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Repository stars, konva",
      "display": "15.0K",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "SVG output, konva",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Canvas shape hit testing, konva",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Drawing role, konva",
      "display": "Layered object scene with events and transforms",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "npm package identifier, konva",
      "display": "konva",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Project function, konva",
      "display": "export function applyNodeProps(instance, props, oldProps = EMPTY_PROPS) {\n  // don't use zIndex in react-konva\n  if (!zIndexWarningShowed && 'zIndex' in props) {\n    console.warn(Z_INDEX_WARNING);\n    zIndexWarningShowed = true;\n  }\n\n  // check correct draggable usage\n  if (!dragWarningShowed && props.draggable) {\n    var hasPosition = props.x !== undefined || props.y !== undefined;\n    var hasEvents = props.onDragEnd || props.onDragMove;\n    if (hasPosition && !hasEvents) {\n      console.warn(DRAGGABLE_WARNING);\n      dragWarningShowed = true;\n    }\n  }\n\n  var updatedProps = {};\n  var hasUpdates = false;\n\n  // check old props\n  // we need to unset properties that are not in new props\n  // and remove all events\n  for (var key in oldProps) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var propChanged = oldProps[key] !== props[key];\n\n    // if that is a changed event, we need to remove it\n    if (isEvent && propChanged) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // Remove by namespace because react-konva binds at most one listener\n      // for each event in that namespace.\n      instance.off(eventName + EVENTS_NAMESPACE);\n    }\n    var toRemove = !props.hasOwnProperty(key);\n    if (!isEvent && toRemove) {\n      updatedProps[key] = undefined;\n      hasUpdates = true;\n    }\n  }\n\n  var strictUpdate = useStrictMode || props._useStrictMode;\n  const newEvents = {};\n\n  for (var key in props) {\n    if (propsToSkip[key]) {\n      continue;\n    }\n    var isEvent = key.slice(0, 2) === 'on';\n    var toAdd = oldProps[key] !== props[key];\n    if (isEvent && toAdd) {\n      var eventName = key.substr(2).toLowerCase();\n      if (eventName.substr(0, 7) === 'content') {\n        eventName =\n          'content' +\n          eventName.substr(7, 1).toUpperCase() +\n          eventName.substr(8);\n      }\n      // check that event is not undefined\n      if (props[key]) {\n        newEvents[eventName] = props[key];\n      }\n    }\n    if (\n      !isEvent &&\n      (props[key] !== oldProps[key] ||\n        (strictUpdate && props[key] !== instance.getAttr(key)))\n    ) {\n      hasUpdates = true;\n      updatedProps[key] = props[key];\n    }\n  }\n\n  if (hasUpdates) {\n    instance.setAttrs(updatedProps);\n    updatePicture(instance);\n  }\n\n  // subscribe to events AFTER we set attrs\n  // we need it to fix https://github.com/konvajs/react-konva/issues/471\n  // settings attrs may add events. Like \"draggable: true\" will add \"mousedown\" listener\n  for (var eventName in newEvents) {\n    // first clear any existing listeners, it is required for strict mode\n    instance.off(eventName + EVENTS_NAMESPACE);\n    // then attach new one\n    instance.on(eventName + EVENTS_NAMESPACE, newEvents[eventName]);\n  }\n}",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Project source file, konva",
      "display": "src/makeUpdates.ts",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project full_name, konva",
      "display": "konvajs/react-konva",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project stargazers_count, konva",
      "display": "6.4K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Library name, pixi.js",
      "display": "PixiJS",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Monthly downloads, pixi.js",
      "display": "7.1M",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "License, pixi.js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Package release, pixi.js",
      "display": "8.23.0",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Package release date, pixi.js",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Install, pixi.js",
      "display": "npm install pixi.js",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Quickstart, pixi.js",
      "display": "import { Application, Graphics } from 'pixi.js';\nconst app = new Application();\nawait app.init({ width: 300, height: 200 });\ndocument.body.appendChild(app.canvas);\napp.stage.addChild(new Graphics().rect(20, 20, 100, 80).fill('red'));\n",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Repository stars, pixi.js",
      "display": "48.8K",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "SVG output, pixi.js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Canvas shape hit testing, pixi.js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Drawing role, pixi.js",
      "display": "GPU-oriented scene graph and raster extraction",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "npm package identifier, pixi.js",
      "display": "pixi.js",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Project function, pixi.js",
      "display": "public toWorld<P extends PointData = Point>(x: number | PointData, y?: number): P\n    {\n        if (arguments.length === 2)\n        {\n            return this.toLocal<P>(new Point(x as number, y));\n        }\n\n        return this.toLocal<P>(x as PointData);\n    }",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Project source file, pixi.js",
      "display": "src/Viewport.ts",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Project full_name, pixi.js",
      "display": "pixijs-userland/pixi-viewport",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project stargazers_count, pixi.js",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Library name, fabric",
      "display": "Fabric.js",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Monthly downloads, fabric",
      "display": "5.2M",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "License, fabric",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Package release, fabric",
      "display": "7.4.0",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Package release date, fabric",
      "display": "May 2026",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Install, fabric",
      "display": "npm install fabric",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Quickstart, fabric",
      "display": "import { Canvas, Rect } from 'fabric';\nconst canvas = new Canvas('canvas', { width: 300, height: 200 });\ncanvas.add(new Rect({ left: 20, top: 20, width: 100, height: 80, fill: 'red' }));\n",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Repository stars, fabric",
      "display": "31.6K",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "SVG output, fabric",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Canvas shape hit testing, fabric",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Serialization boundary, fabric",
      "display": "Promise-based JSON loading and object/SVG serialization",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "npm package identifier, fabric",
      "display": "fabric",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Project function, fabric",
      "display": "private clearAll() {\n\t\tif (!this.canvas) return;\n\t\n\t\tconst message = 'Are you sure you want to clear all annotations?';\n\t\tconst confirmText = 'Clear';\n\t\n\t\tnew ConfirmDialog(this.app, 'Clear Annotations', message, confirmText, () => {\n\t\t\tconst objects = this.canvas.getObjects();\n\t\t\t// Remove all objects except the background image (first object)\n\t\t\tobjects.slice(1).forEach(obj => this.canvas.remove(obj));\n\t\t\tthis.canvas.requestRenderAll();\n\t\t\tthis.saveState(); // IMPORTANT: Save the cleared state\n\t\t}).open();\n\t}\n",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Project source file, fabric",
      "display": "src/ImageAnnotation.ts",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Project full_name, fabric",
      "display": "xRyul/obsidian-image-converter",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Project stargazers_count, fabric",
      "display": "842",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Library name, @antv/g",
      "display": "@antv/g",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Monthly downloads, @antv/g",
      "display": "1.6M",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "License, @antv/g",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Package release, @antv/g",
      "display": "6.3.3",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Package release date, @antv/g",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Install, @antv/g",
      "display": "npm install @antv/g @antv/g-canvas",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Quickstart, @antv/g",
      "display": "import { Canvas, Circle } from '@antv/g';\nimport { Renderer } from '@antv/g-canvas';\nconst canvas = new Canvas({ container: 'container', width: 300, height: 200, renderer: new Renderer() });\nawait canvas.ready;\ncanvas.appendChild(new Circle({ style: { cx: 80, cy: 80, r: 40, fill: 'red' } }));\n",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Official description, @antv/g",
      "display": "A core module for rendering engine implements DOM API.",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Quickstart source file, @antv/g",
      "display": "guide/getting-started and Canvas.d.ts (API recipe)",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Repository stars, @antv/g",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "SVG output, @antv/g",
      "display": "Via plugin",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Canvas shape hit testing, @antv/g",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Backend model, @antv/g",
      "display": "DOM-like object APIs with separately selected renderer",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "npm package identifier, @antv/g",
      "display": "@antv/g",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Project function, @antv/g",
      "display": "protected onPointerDown(event: IPointerEvent) {\n    if (!this.validate(event) || !this.isKeydown() || this.startPoint) return;\n    const { canvas, graph } = this.context;\n    const style = { ...this.options.style };\n\n    // 根据缩放比例调整 lineWidth\n    // Adjust lineWidth according to the zoom ratio\n    if (this.options.style.lineWidth) {\n      style.lineWidth = +this.options.style.lineWidth / graph.getZoom();\n    }\n\n    this.rectShape = new Rect({ id: 'g6-brush-select', style });\n    canvas.appendChild(this.rectShape);\n\n    this.startPoint = [event.canvas.x, event.canvas.y];\n  }",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Project source file, @antv/g",
      "display": "packages/g6/src/behaviors/brush-select.ts",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Project full_name, @antv/g",
      "display": "antvis/G6",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Project stargazers_count, @antv/g",
      "display": "12.4K",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Library name, paper",
      "display": "Paper.js",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Monthly downloads, paper",
      "display": "1.5M",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "License, paper",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Package release, paper",
      "display": "0.17.0",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Package release date, paper",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Install, paper",
      "display": "npm install paper",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Quickstart, paper",
      "display": "import paper from 'paper';\npaper.setup(document.getElementById('canvas'));\nnew paper.Path.Circle({ center: [80, 80], radius: 40, fillColor: 'red' });\n",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Repository stars, paper",
      "display": "15.2K",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "SVG output, paper",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Canvas shape hit testing, paper",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Drawing role, paper",
      "display": "Vector geometry and Bézier path operations",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "npm package identifier, paper",
      "display": "paper",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Project function, paper",
      "display": "function offsetSegment(segment: paper.Segment, curve: paper.Curve, handleNormal: paper.Point, offset: number) {\n  const isFirst = segment.curve === curve;\n  // get offset vector\n  const offsetVector = (curve.getNormalAtTime(isFirst ? 0 : 1)).multiply(offset);\n  // get offset point\n  const point = segment.point.add(offsetVector);\n  const newSegment = new paper.Segment(point);\n  // handleOut for start segment & handleIn for terminal segment\n  const handle = (isFirst ? 'handleOut' : 'handleIn') as HandleType;\n  newSegment[handle] = segment[handle]!.add(handleNormal.subtract(offsetVector).divide(2));\n  return newSegment;\n}",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Project source file, paper",
      "display": "src/offset_core.ts",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Project full_name, paper",
      "display": "glenzli/paperjs-offset",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project stargazers_count, paper",
      "display": "122",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Library name, p5",
      "display": "p5.js",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Monthly downloads, p5",
      "display": "633.3K",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "License, p5",
      "display": "LGPL-2.1",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Package release, p5",
      "display": "2.4.0",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Package release date, p5",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Install, p5",
      "display": "npm install p5",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Quickstart, p5",
      "display": "function setup() {\n  createCanvas(400, 400);\n}\nfunction draw() {\n  background(220);\n}\n",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Official description, p5",
      "display": "npm version",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Quickstart source file, p5",
      "display": "tutorials/get-started (official sketch.js snippet)",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Repository stars, p5",
      "display": "24.4K",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "SVG output, p5",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Canvas shape hit testing, p5",
      "display": "Undocumented",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Drawing role, p5",
      "display": "Sketch lifecycle and drawing primitives",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "npm package identifier, p5",
      "display": "p5",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Project function, p5",
      "display": "function draw() {\n  background(0);\n\n  if (i < values.length) {\n    for (let j = 0; j < values.length - i - 1; j++) {\n      let a = values[j];\n      let b = values[j + 1];\n      if (a > b) {\n        swap(values, j, j + 1);\n      }\n    }\n  } else {\n    console.log('finished');\n    noLoop();\n  }\n  i++;\n\n  for (let i = 0; i < values.length; i++) {\n    stroke(255);\n    line(i, height, i, height - values[i]);\n  }\n}",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Project source file, p5",
      "display": "114_BubbleSortViz/P5/sketch.js",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Project full_name, p5",
      "display": "CodingTrain/Coding-Challenges",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Project stargazers_count, p5",
      "display": "191",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "What, roughjs",
      "display": "Draws lines, curves, arcs, polygons, circles, and ellipses in a hand-drawn style on canvas or SVG.",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "What, zrender",
      "display": "Draws the two-dimensional graphics underneath Apache ECharts.",
      "asOf": "2026-11-17"
    },
    "F271": {
      "label": "What, antv g",
      "display": "Renders graphics through DOM-compatible element and event APIs.",
      "asOf": "2026-11-17"
    },
    "F272": {
      "label": "What, p5",
      "display": "Draws shapes, text, and color on a canvas in a sketch that responds to the mouse.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript canvas libraries Fabric.js Konva Paper.js PixiJS code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
