Geometrize Haxe is a Haxe library for recreating images with geometric primitives
Този скрипт не може да бъде инсталиран директно. Това е библиотека за други скриптове и може да бъде използвана с мета-директива // @require https://update.greasyfork.org/scripts/585407/1866784/Geometrize%20Haxe%20Library.js
This is a standalone browser build of the original Geometrize algorithm. It exposes itself on globalThis.geometrize and uses a bundled Web Worker to iteratively approximate a target image with simple geometric shapes.
The script expects specific DOM elements to exist, such as runpausebutton, stepbutton, openimageinput, circles, lines, shapesaddedtext, maxshapescaptextedit, and currentsvgcontainer.
When initialized, it:
geometrize.setTargetCanvas(canvas).shapeJsonDatashapeSvgDatacurrentsvgcontainerThe script exposes helper methods on globalThis.geometrize:
geometrize.maingeometrize.getShapeJsonData()geometrize.getShapeSvgData()geometrize.getShapeCount()geometrize.setTargetCanvas(canvas)geometrize.setMaxShapeCount(limit)