All Projects → transitive-bullshit → react-starfield-animation

transitive-bullshit / react-starfield-animation

Licence: other
✨ Canvas-based starfield animation for React.

Programming Languages

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

Projects that are alternatives of or similar to react-starfield-animation

SubmiBot
Plugin do Eclipse para automatização do processo de submissão de tarefas na disciplina de LP2 - Computação@UFCG
Stars: ✭ 16 (-80.49%)
Mutual labels:  canvas
img-clipping
基于Canvas的一个h5移动端图片裁剪demo
Stars: ✭ 81 (-1.22%)
Mutual labels:  canvas
okeevis-render
a fast lightweight 2d graphic library
Stars: ✭ 22 (-73.17%)
Mutual labels:  canvas
canvas-constructor
An ES6 utility for canvas with built-in functions and chained methods.
Stars: ✭ 96 (+17.07%)
Mutual labels:  canvas
lottery-rotate
适配移动端rem布局的canvas大转盘抽奖插件
Stars: ✭ 15 (-81.71%)
Mutual labels:  canvas
jmonet
An easy-to-use toolkit for incorporating MacPaint / Microsoft Paint-like tools into a Java Swing or JavaFX application.
Stars: ✭ 27 (-67.07%)
Mutual labels:  canvas
snake-game-p5
The Snake Game made with p5.js 🐍🎮.
Stars: ✭ 18 (-78.05%)
Mutual labels:  canvas
canvas-td
A fully featured tower defense game built with <canvas>.
Stars: ✭ 31 (-62.2%)
Mutual labels:  canvas
AndroidZdog
Porting Zdog(Round, flat, designer-friendly pseudo-3D engine for canvas) to Android with kotlin
Stars: ✭ 22 (-73.17%)
Mutual labels:  canvas
TakingImageOfAView
An example on how to take screenshot of a particular view
Stars: ✭ 15 (-81.71%)
Mutual labels:  canvas
drawing-board
canvas-drawing-board
Stars: ✭ 23 (-71.95%)
Mutual labels:  canvas
turkeyvisited
Mark the cities you have visited in Turkey and share the map!
Stars: ✭ 82 (+0%)
Mutual labels:  canvas
maze-generator
A real-time JavaScript maze generator using the depth-first search algorithm
Stars: ✭ 13 (-84.15%)
Mutual labels:  canvas
idraw
A simple JavaScript framework for Drawing on the web.(一个面向Web绘图的JavaScript框架)
Stars: ✭ 436 (+431.71%)
Mutual labels:  canvas
JustDraw
A Test for Android Canvas Painting with JavaScript Engine
Stars: ✭ 42 (-48.78%)
Mutual labels:  canvas
canvas-merge-video-in-vue
canvas+vue 实现视频碎片合并 比较粗陋,欢迎fork 升级++
Stars: ✭ 21 (-74.39%)
Mutual labels:  canvas
vueShop
🙂collections
Stars: ✭ 72 (-12.2%)
Mutual labels:  canvas
city-tour
A procedurally generated city built with WebGL and three.js
Stars: ✭ 57 (-30.49%)
Mutual labels:  canvas
awesome-canvas
Canvas资源库大全中文版。An awesome Canvas packages and resources.
Stars: ✭ 288 (+251.22%)
Mutual labels:  canvas
huozi.js
A simple typography engine for CJK languages, especially designed for game rich-text. 用于游戏富文本的中日韩文字排印引擎。
Stars: ✭ 135 (+64.63%)
Mutual labels:  canvas

react-starfield-animation (demo)

Canvas-based starfield animation for React.

NPM Build Status JavaScript Style Guide

Demo

Install

npm install --save react-starfield-animation

Usage

Check out the demo.

import React, { Component } from 'react'

import StarfieldAnimation from 'react-starfield-animation'

class Example extends Component {
  render () {
    return (
      <StarfieldAnimation
        style={{
          position: 'absolute',
          width: '100%',
          height: '100%'
        }}
      />
    )
  }
}

Props

Property Type Default Description
numParticles number 300 Number of particles (stars) to use.
lineWidth number 2.0 Line width affecting particle size.
alphaFactor number 1.0 Scaling factor for particle opacity.
depth number 300 Scaling factor for particle depth.
... ... undefined Any other props are applied to the root canvas element.

Note that the canvas size will automatically be inferred based on available space via react-sizeme, so it should be really easy to use this component as a fullscreen background as in the demo.

Related

License

MIT © Travis Fischer

This module was bootstrapped with create-react-library.

Support my OSS work by following me on twitter twitter

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].