Code Monkey home page Code Monkey logo

tsparticles-preset-blossom-v1's Introduction

tsParticles Blossom Preset V1

jsDelivr npmjs npm

Sample

demo

This is my presset for tsparticles

You can find more details at tsparticles's document and its github repository

How to use it

React.js / Preact / Inferno

The syntax for React.js, Preact and Inferno is the same.

This sample uses the class component syntax, but you can use hooks as well (if the library supports it).

import Particles from "react-tsparticles";
import { Main } from "tsparticles";
import { loadBlossomFallingVer1 } from "tsparticles-preset-blossom-ver1";

export class ParticlesContainer extends React.PureComponent<IProps> {
  // this customizes the component tsParticles installation
  customInit(main: Main) {
    // this adds the preset to tsParticles, you can safely use the
    loadFirePreset(main);
  }

  render() {
    const options = {
      preset: "blossomFallVer1",
    };

    return <Particles options={options} init={this.customInit} />;
  }
}

If you preffer using function :

import Particles from "react-tsparticles";
import { loadBlossomFallingV1 } from "tsparticles-preset-blossom-ver1";
import { Main } from "tsparticles";
function particlesInit(Main) {
  loadBlossomFallingV1(Main);
}
export default function Blosom() {
  return (
    <Particles
      options={{
        preset: "blossomFallV1",
      }}
      init={particlesInit}
    />
  );
}

Customization

Important โš ๏ธ You can override all the options defining the properties like in any standard tsParticles installation.

const options = {
  background: {
    color: "",
  },
  preset: "blossomFallV1",
};

Options

You can find all options available here ๐Ÿ“–

tsparticles-preset-blossom-v1's People

Contributors

barryalvord avatar bibidentuhanoi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.