g-harel / blobs Goto Github PK
View Code? Open in Web Editor NEWrandom blob generation and animation
Home Page: https://blobs.dev
License: MIT License
random blob generation and animation
Home Page: https://blobs.dev
License: MIT License
Hi, thank you for this library. I want to build a similiar blob effect like on the discord login page
When you go to the page, you will see the blob effect in the top left corner. After you entered your crendentials, the blob fills the whole window.
How can i build this blob with movement using your library?
I am still a beginner of blobs so could you provide an example so i can better understand of how can i use it?
When I import the animate blobs like this (or any other way) in typescript
import { canvasPath } from "blobs/v2/animate";
I keep getting the error TS2306: File 'blobs/v2/animate/index.js' is not a module. It works just fine. But it throws the error.
Any ideas?
Hi I've been tinkering to try to get the fill to apply an image but it's not working
This is my current approach from scavenging stack overflow. A lot of the answers are pretty old but I'm not sure why they wouldn't work.
const blobSvgString = blobs2.svg(
{
seed: plant.botanicalName,
extraPoints: 5,
randomness: 2,
size: 1000
},
{
fill: 'url(#blob-image)'
}
);
const blobContainer = document.getElementById('blob');
blobContainer.innerHTML = blobSvgString;
const defsMarkup = `
<defs>
<pattern id="blob-image" patternUnits="userSpaceOnUse" width="1000" height="1000">
<image href="url(/images/iridescent-gradient.png)" x="0" y="0" width="1000" height="1000" />
</pattern>
</defs>
`;
const range = document.createRange();
const fragment = range.createContextualFragment(defsMarkup);
const svgEl = document.querySelector('#blob svg');
svgEl.insertBefore(fragment, svgEl.firstChild);
Wondering if you can provide any insight or if I'm not using it right. Thanks :) !!
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.