-
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1acc2af
commit addea19
Showing
24 changed files
with
42 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Vibrant from "./configs/browser"; | ||
import pipeline from "./pipeline"; | ||
import { Vibrant } from "./configs/browser"; | ||
import { pipeline } from "./pipeline"; | ||
|
||
Vibrant.use(pipeline); | ||
|
||
export default Vibrant; | ||
export { Vibrant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import BrowserImage from "@vibrant/image-browser"; | ||
import Vibrant from "./config"; | ||
import { BrowserImage } from "@vibrant/image-browser"; | ||
import { Vibrant } from "./config"; | ||
|
||
Vibrant.DefaultOpts.ImageClass = BrowserImage; | ||
|
||
export default Vibrant; | ||
export { Vibrant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import Vibrant from "@vibrant/core"; | ||
import { Vibrant } from "@vibrant/core"; | ||
|
||
Vibrant.DefaultOpts.quantizer = "mmcq"; | ||
Vibrant.DefaultOpts.generators = ["default"]; | ||
Vibrant.DefaultOpts.filters = ["default"]; | ||
|
||
export default Vibrant; | ||
export { Vibrant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import NodeImage from "@vibrant/image-node"; | ||
import Vibrant from "./configs/config"; | ||
import pipeline from "./pipeline"; | ||
import { NodeImage } from "@vibrant/image-node"; | ||
import { Vibrant } from "./configs/config"; | ||
import { pipeline } from "./pipeline"; | ||
|
||
Vibrant.DefaultOpts.ImageClass = NodeImage; | ||
Vibrant.use(pipeline); | ||
|
||
export default Vibrant; | ||
export { Vibrant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
import MMCQ from "@vibrant/quantizer-mmcq"; | ||
import DefaultGenerator from "@vibrant/generator-default"; | ||
import { MMCQ } from "@vibrant/quantizer-mmcq"; | ||
import { DefaultGenerator } from "@vibrant/generator-default"; | ||
|
||
import { BasicPipeline } from "@vibrant/core"; | ||
|
||
const pipeline = new BasicPipeline().filter | ||
export const pipeline = new BasicPipeline().filter | ||
.register( | ||
"default", | ||
(r: number, g: number, b: number, a: number) => | ||
a >= 125 && !(r > 250 && g > 250 && b > 250), | ||
) | ||
.quantizer.register("mmcq", MMCQ) | ||
.generator.register("default", DefaultGenerator); | ||
|
||
export default pipeline; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { runPipelineInWorker } from "@vibrant/core"; | ||
import pipeline from "./"; | ||
import { pipeline } from "./"; | ||
|
||
runPipelineInWorker(self, pipeline); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { WorkerPipeline } from "@vibrant/core"; | ||
import Vibrant from "./configs/browser"; | ||
import { Vibrant } from "./configs/browser"; | ||
|
||
import PipelineWorker from "./pipeline/index.worker?worker"; | ||
|
||
Vibrant.use(new WorkerPipeline(PipelineWorker as never)); | ||
|
||
export default Vibrant; | ||
export { Vibrant }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters