image-stroke-v2
Advanced tools
Comparing version 0.1.2 to 0.9.0
@@ -9,3 +9,9 @@ export declare type Options = { | ||
}; | ||
export default class ImageStroke { | ||
export declare class StrokeMethodFactory { | ||
static rotate(): StrokeMethod<'2d'>; | ||
static contour(): StrokeMethod<'2d'>; | ||
static distance(): StrokeMethod<'2d'>; | ||
static rotateByGl(): StrokeMethod<'gl'>; | ||
} | ||
export declare class ImageStroke { | ||
canvas: HTMLCanvasElement | null; | ||
@@ -24,1 +30,2 @@ glCanvas: HTMLCanvasElement | null; | ||
} | ||
export default ImageStroke; |
import { utils } from './utils'; | ||
import methodRotate from '../src/method-rotate'; | ||
import methodContour from '../src/method-contour'; | ||
import methodDistance from '../src/method-distance'; | ||
import methodRotateGl from '../src/method-rotate-by-gl'; | ||
const createCanvas = () => document.createElement('canvas'); | ||
export default class ImageStroke { | ||
export class StrokeMethodFactory { | ||
static rotate() { | ||
return methodRotate; | ||
} | ||
static contour() { | ||
return methodContour; | ||
} | ||
static distance() { | ||
return methodDistance; | ||
} | ||
static rotateByGl() { | ||
return methodRotateGl; | ||
} | ||
} | ||
export class ImageStroke { | ||
constructor(useMethod) { | ||
this.canvas = null; | ||
this.glCanvas = null; | ||
this.method = () => { }; | ||
this.useMethod = useMethod; | ||
@@ -56,1 +75,2 @@ } | ||
} | ||
export default ImageStroke; |
{ | ||
"name": "image-stroke-v2", | ||
"version": "0.1.2", | ||
"version": "0.9.0", | ||
"description": "Makes stroke for a image with transparent background.", | ||
"main": "./lib/src/index", | ||
"module": "./lib/src/index", | ||
"scripts": { | ||
@@ -18,3 +16,3 @@ "dev": "parcel example/index.html -d example-dist", | ||
"files": [ | ||
"lib" | ||
"lib/src" | ||
], | ||
@@ -21,0 +19,0 @@ "author": "jlcvp", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18197
16
458