Skip to content

Commit 906dc3d

Browse files
committed
0.0.4
1 parent c2a98ff commit 906dc3d

File tree

29 files changed

+51
-109
lines changed

29 files changed

+51
-109
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -162,59 +162,6 @@ jobs:
162162
name: bindings-${{ matrix.settings.target }}
163163
path: ${{ env.APP_NAME }}.*.node
164164
if-no-files-found: error
165-
# build-freebsd:
166-
# runs-on: macos-12
167-
# name: Build FreeBSD
168-
# steps:
169-
# - uses: actions/checkout@v3
170-
# with:
171-
# submodules: true
172-
# - name: Build
173-
# id: build
174-
# uses: vmactions/freebsd-vm@v0
175-
# env:
176-
# DEBUG: napi:*
177-
# RUSTUP_HOME: /usr/local/rustup
178-
# CARGO_HOME: /usr/local/cargo
179-
# RUSTUP_IO_THREADS: 1
180-
# with:
181-
# envs: DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS
182-
# usesh: true
183-
# mem: 3000
184-
# prepare: |
185-
# pkg install -y -f curl node libnghttp2 llvm cmake # Install the llvm package to fix the libclang error
186-
# curl -qL https://www.npmjs.com/install.sh | sh
187-
# npm install --location=global --ignore-scripts yarn
188-
# curl https://sh.rustup.rs -sSf --output rustup.sh
189-
# sh rustup.sh -y --profile minimal --default-toolchain beta
190-
# rustup component add rustfmt
191-
# export PATH="/usr/local/cargo/bin:$PATH"
192-
# echo "~~~~ rustc --version ~~~~"
193-
# rustc --version
194-
# echo "~~~~ node -v ~~~~"
195-
# node -v
196-
# echo "~~~~ yarn --version ~~~~"
197-
# yarn --version
198-
# run: |
199-
# export PATH="/usr/local/cargo/bin:$PATH"
200-
# pwd
201-
# ls -lah
202-
# whoami
203-
# env
204-
# freebsd-version
205-
# yarn install
206-
# yarn build
207-
# strip -x *.node
208-
# yarn test
209-
# rm -rf node_modules
210-
# rm -rf target
211-
# rm -rf .yarn/cache
212-
# - name: Upload artifact
213-
# uses: actions/upload-artifact@v3
214-
# with:
215-
# name: bindings-freebsd
216-
# path: ${{ env.APP_NAME }}.*.node
217-
# if-no-files-found: error
218165
test-macOS-windows-binding:
219166
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
220167
needs:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @neplex/vectorizer
22

3-
A simple Node.js library to convert raster images into svg using [VTracer](https://github.com/visioncortex/vtracer).
3+
A simple Node.js library to convert raster images into svg using [VTracer](https://github.com/visioncortex/vtracer), with time complexity of `O(n)`.
44

55
## Installation
66

__test__/data/result-bw.svg

Lines changed: 1 addition & 1 deletion
Loading

__test__/data/result-firefox.svg

Lines changed: 1 addition & 1 deletion
Loading

__test__/data/result-photo.svg

Lines changed: 1 addition & 1 deletion
Loading

__test__/data/result-poster.svg

Lines changed: 1 addition & 1 deletion
Loading

__test__/data/result-raw.svg

Lines changed: 1 addition & 1 deletion
Loading

__test__/data/result.svg

Lines changed: 1 addition & 1 deletion
Loading

example/index.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const config = {
1616
maxIterations: 2,
1717
};
1818

19+
const begin = performance.now();
1920
const result = await vectorize(src, config);
21+
const end = performance.now();
22+
23+
console.log(`[Anime Girl Vectorization] Time: ${(end - begin).toFixed(2)}ms`);
2024

2125
await writeFile('./example/result.svg', result);

example/result.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)