0.0.1 • Published 1 year ago
@magicpattern/js-sdk v0.0.1
Installation
With NPM
npm i @magicpattern/js-sdk
With yarn
yarn add @magicpattern/js-sdk
Usage
Be aware that we restrict the integration of MagicPattern by platforms at the moment. Are you interested? Hit me up at jim@magicpattern.design
import { openMagicPattern } from '@magicpattern/js-sdk';
async function() {
try {
const blob = await openMagicPattern(
{
provider: "YOUR PRODUCT'S NAME", // The name of your own product
toolId: "TOOL_ID_TO_OPEN", // Optional: input image to editor
canChangeTool: false, // Optional: can the user choose a different tool
width: 1200, // Optional
height: 900, // Optional
}
);
// do something with the blob, e.g. create an object url to show it in an img tag:
// URL.createObjectURL(blob);
} catch (error) {
// error handling
}
}
0.0.1
1 year ago