Geometrize Haxe is a Haxe library for recreating images with geometric primitives
Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta
// @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)