All Projects → hustcc → Canvas Nest.js

hustcc / Canvas Nest.js

Licence: mit
♋ Interactive Particle / Nest System With JavaScript and Canvas, no jQuery.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Canvas Nest.js

Layaair discard
This is old LayaAir veriosn writetten by ActionScript 3.0 ,now LayaAir is using TypeScript as the Engine Script,Please use https://github.com/layabox/LayaAir instead.
Stars: ✭ 1,858 (-53.15%)
Mutual labels:  particles, html5, canvas
Vue Canvas Nest
💫 A Vue.js background component for canvas-nest.
Stars: ✭ 136 (-96.57%)
Mutual labels:  particles, html5-canvas, canvas
Black
World's fastest HTML5 2D game engine   🛸
Stars: ✭ 174 (-95.61%)
Mutual labels:  particles, html5, canvas
Canvas101
Learning Canvas series
Stars: ✭ 28 (-99.29%)
Mutual labels:  html5-canvas, html5, canvas
Icon Machine
Web application for randomly generating pixel art icons.
Stars: ✭ 73 (-98.16%)
Mutual labels:  html5-canvas, html5, canvas
Ribbon.js
🎀 Only 1kb javascript gist to generate a ribbon in your website with HTML5 canvas.
Stars: ✭ 189 (-95.23%)
Mutual labels:  html5-canvas, html5, canvas
The Matrix Effect
The incredible effect of rain of letters in the style of the Matrix trilogy.
Stars: ✭ 109 (-97.25%)
Mutual labels:  html5-canvas, html5, canvas
One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-94.83%)
Mutual labels:  html5-canvas, html5, canvas
Proton
Javascript particle animation library
Stars: ✭ 1,958 (-50.63%)
Mutual labels:  particles, canvas
Phaser Examples
Contains hundreds of source code examples and related media for the Phaser HTML5 Game Framework.
Stars: ✭ 1,680 (-57.64%)
Mutual labels:  particles, canvas
Konfetti
Celebrate more with this lightweight confetti particle system 🎊
Stars: ✭ 2,278 (-42.56%)
Mutual labels:  particles, canvas
Front Ui
😄 🎨 Collect some front-end special effects (收集一些前端特效)
Stars: ✭ 259 (-93.47%)
Mutual labels:  html5, canvas
Canvas Test
🎮 happy canvas
Stars: ✭ 1,722 (-56.58%)
Mutual labels:  particles, canvas
Canvas Confetti
🎉 on-demand confetti gun
Stars: ✭ 2,394 (-39.64%)
Mutual labels:  particles, canvas
Disintegrate
A small JS library to break DOM elements into animated Canvas particles.
Stars: ✭ 251 (-93.67%)
Mutual labels:  particles, canvas
Dynamic effect
平时练习的一些前端动效,基于HTML5,CSS3,Canvas,Svg
Stars: ✭ 264 (-93.34%)
Mutual labels:  html5, canvas
awesome-canvas
Canvas资源库大全中文版。An awesome Canvas packages and resources.
Stars: ✭ 288 (-92.74%)
Mutual labels:  canvas, html5-canvas
Canvas
HTML5 Canvas API implementation for Microsoft Blazor
Stars: ✭ 319 (-91.96%)
Mutual labels:  html5-canvas, canvas
Hstardoc
My blogs write with markdown.
Stars: ✭ 297 (-92.51%)
Mutual labels:  html5, canvas
Melonjs
a fresh & lightweight javascript game engine
Stars: ✭ 3,721 (-6.18%)
Mutual labels:  html5, canvas

canvas-nest.js

A nest background of website draw on canvas. 中文 Readme 帮助文档.

npm npm npm gzip

screenshot

Feature

  • It does not depend on jQuery and original javascrpit is used.
  • Small size, only 2 Kb.
  • Easy to implement, simple configuration.
  • You do not have to be a web developer to use it.
  • Modularized with area rendering.

Install

# use npm
npm install --save canvas-nest.js

# or use yarn
yarn add canvas-nest.js

Usage

  • Script tag

Insert the code below between <body> and </body>.

<script src="dist/canvas-nest.js"></script>

Strongly suggest to insert before the tag </body>, as the following:

<html>
<head>
	...
</head>
<body>
	...
	...
	<script src="dist/canvas-nest.js"></script>
</body>
</html>

Then ok! Please do not add the code in the <head> </head>.

  • Modular usage (Area render)

After installation, you can import this as module.

There is only one API, use it as below:

import CanvasNest from 'canvas-nest.js';

const config = {
  color: '255,0,0',
  count: 88,
};

// Using config rendering effect at 'element'.
const cn = new CanvasNest(element, config);

// destroy
cn.destroy();

Configuration

  • color: color of lines, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
  • pointColor: color of points, default: '0,0,0'; RGB values: (R,G,B).(note: use ',' to separate.)
  • opacity: the opacity of line (0~1), default: 0.5.
  • count: the number of lines, default: 99.
  • zIndex: z-index property of the background, default: -1.

Example:

  • Script tag
<script type="text/javascript" color="0,0,255" opacity='0.7' zIndex="-2" count="99" src="dist/canvas-nest.js"></script>
  • Modular usage (Area render)
{
  color: '0,0,255',
  opacity: 0.7,
  zIndex: -2,
  count: 99,
};

Note: If the Configuration isn't customized, default values are available as well.

Related projects

Used by

  • A Tool: a convenient tool box.

License

MIT@hustcc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].