Get started with tsparticles-shape-star CDN
MIT licensed
TSParticles-shape-star is a particle system shape in Three.js library, creating star-shaped particles.
Tags:- tsparticles
- particles.js
- particlesjs
- particles
- particle
- canvas
- jsparticles
- xparticles
- particles-js
- particles-bg
- particles-bg-vue
- particles-ts
- particles.ts
- react-particles-js
- react-particles.js
- react-particles
- react
- reactjs
- vue-particles
- ngx-particles
- angular-particles
- particleground
- vue
- vuejs
- preact
- preactjs
- jquery
- angularjs
- angular
- typescript
- javascript
- animation
- web
- html5
- web-design
- webdesign
- css
- html
- css3
- animated
- background
- confetti
- fireworks
- fireworks-js
- confetti-js
- confettijs
- fireworksjs
- canvas-confetti
Stable version
Copied!
How to start using tsparticles-shape-star CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with tsparticles-shape-star CDN - cdnhub.io</title>
<style>
body { margin: 0; }
canvas { width: 100vw; height: 100vh; }
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/worksans.min.css"></script>
<script src="https://cdn.jsdelivr.net/npm/@tweenjs/tween.min/dist/TWEEN.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/Detector.js"></script>
<script src="https://cdn.cdnhub.io/tsparticles-shape-star/2.12.0/tsparticles.shape.star.min.js"></script>
<script>
if (!Detector.webgl) {
console.error('WebGL not supported');
return;
}
const particleContainer = document.createElement('div');
particleContainer.style.position = 'fixed';
particleContainer.style.top = '0';
particleContainer.style.left = '0';
particleContainer.style.width = '100%';
particleContainer.style.height = '100%';
document.body.appendChild(particleContainer);
const particlesInit = async () => {
const particles = new TSParticles.Star({
container: particleContainer,
numParticles: 100,
shapeType: 'star',
size: 5,
opacity: 0.5,
color: '#ff7f50',
position: { x: 50, y: 50, z: 0 },
move: {
direction: 'none',
enable: false,
},
});
particles.addToContainer();
};
particlesInit();
</script>
</body>
</html>
Copied!
Copied!