-
-
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
8ee960c
commit 266f6b6
Showing
24 changed files
with
73 additions
and
84 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 Vibrant from "./config"; | ||
import BrowserImage from "@vibrant/image-browser"; | ||
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 Vibrant from "./configs/config"; | ||
import NodeImage from "@vibrant/image-node"; | ||
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 Vibrant from "./configs/browser"; | ||
import { WorkerPipeline } from "@vibrant/core"; | ||
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