emeraldpay / hashicon Goto Github PK
View Code? Open in Web Editor NEWGenerates a beautiful representation of any hash.
License: Apache License 2.0
Generates a beautiful representation of any hash.
License: Apache License 2.0
TBD
Does hashicon support node.js now? There is document
in hashicon.cjs.js
, so it won't work for node. I just require
the package. Any mistakes I've made?
If hashicon can output base64 encoded string of the icon, it will be great.
Seems that repo got moved to different org and now link https://etcdevteam.github.io/hashicon/examples/ is broken:
I couldn't see an easy way to use params in react. Could you provide an example? ๐๐ผ
I wanted to modify light
to make the 3d effect more pronounced.
I love this package, however I am using this in a very space constrained application, and the inclusion of the text-encoding
package adds 615kb to my uncompressed bundle size (single largest dep by far). It's also deprecated.
I'd be happy to help get this working.
Load up https://etcdevteam.github.io/hashicon/examples/ in Edge or IE and you will see it doesnt load the icons. Ive implemented it using React and get a few js errors in the console.
Both the hashicon demo site and my localhost get this:
Will support for Edge and IE be added?
Rendering error: ReferenceError: document is not defined
at createCanvas (/home/username/app/node_modules/@emeraldpay/hashicon/lib/utils.js:36:18)
at Object.renderer [as default] (/home/username/app/node_modules/@emeraldpay/hashicon/lib/renderer.js:31:18)
at Object.hashicon (/home/username/app/node_modules/@emeraldpay/hashicon/lib/index.js:53:33)
at Hashicon.render (/home/username/app/node_modules/@emeraldpay/hashicon-react/lib/component.js:51:31)
at /home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:796:21
at measureLifeCyclePerf (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:795:25)
at ReactCompositeComponentWrapper._renderValidatedComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:822:32)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:362:30)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29) ReferenceError: document is not defined
at createCanvas (/home/username/app/node_modules/@emeraldpay/hashicon/lib/utils.js:36:18)
at Object.renderer [as default] (/home/username/app/node_modules/@emeraldpay/hashicon/lib/renderer.js:31:18)
at Object.hashicon (/home/username/app/node_modules/@emeraldpay/hashicon/lib/index.js:53:33)
at Hashicon.render (/home/username/app/node_modules/@emeraldpay/hashicon-react/lib/component.js:51:31)
at /home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:796:21
at measureLifeCyclePerf (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:75:12)
at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:795:25)
at ReactCompositeComponentWrapper._renderValidatedComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:822:32)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:362:30)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactCompositeComponentWrapper.performInitialMount (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:371:34)
at ReactCompositeComponentWrapper.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactCompositeComponent.js:258:21)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29)
at Object.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactReconciler.js:46:35)
at ReactDOMComponent.mountChildren (/home/username/app/node_modules/react-dom/lib/ReactMultiChild.js:238:44)
at ReactDOMComponent._createContentMarkup (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:653:32)
at ReactDOMComponent.mountComponent (/home/username/app/node_modules/react-dom/lib/ReactDOMComponent.js:520:29)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.