0.0.7 • Published 7 years ago

eve-core v0.0.7

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

Eve Core

JSON and Canvas => Cool

Demo

gif demo

Live preview demo

How to use from browser

new Eve(Object)

How to use from npm

import Eve from 'eve-core'
// you can use require instead

new Eve(Object)

You can found full example from example/index.js

Options

This is API object options you can passed to object init.

NameTypeDefaultDescription
alignStringleftSet default align for text render if not set from template text align
backgroundStringundefinedYou can directly set default background with color name, or string url image, example: 'red'
canvasStringundefinedIf you have initialized canvas element,you don't have to init el object. So we can skip to create canvas element process.
downloadStringnullFill with your download element or leave it null
elString#cardmakerIf you don't have any canvas element initialized, you can pass element id you created to us. So we can create one for you.
enableSetToElementBooleantrueIf it's set to true, we passed name object template to your value as default value and description as placeholder DOM element if match with name attribute.
widthNumber400So yeah you can set width of your canvas
heightNumber250And you can set height of your canvas too
templateObject{}Pass your template config, so we can render it like expected.
streamElemTemplateBooleantrueIf it set to true, we update your template config real time if enableSetToElement set to true