Comments (5)
from react.
Thank you for your reply !
I've tried the suggestions and added the below to my codes :
CSS Home
.main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
padding: 4rem 0;
}
.particlesContainer {
height: 100vh;
position : relative;
}
#tsparticles {
height: 100vh;
position: absolute;
left: 0;
right: 0;
margin: 0;
padding: 0;
z-index: 0;
}
Related to the Home component :
<div className={styles.particlesContainer}>
<Particles
id="tsparticles"
init={particlesInit}
loaded={particlesLoaded}
options={particlesOptions}
/>
</div>
Sadly it only affected sizes of my div but nothing changed at the level of the particles. These are still active on my component Technologies when I scroll down.
from react.
Have you changed the config? Please read carefully the post
from react.
Regarding the config, I've copy/paste yours for a try :
{
fullScreen: { enable: false, zIndex: 0 },
particles: {
color: {
value: "#ff0000",
animation: {
enable: true,
speed: 20,
sync: true,
},
},
lineLinked: {
blink: false,
color: "random",
consent: false,
distance: 30,
enable: true,
opacity: 0.3,
width: 0.5,
},
move: {
attract: {
enable: false,
rotate: {
x: 600,
y: 1200,
},
},
bounce: false,
direction: "none",
enable: true,
outMode: "bounce",
random: true,
speed: 0.5,
straight: false,
},
number: {
density: {
enable: false,
area: 2000,
},
limit: 0,
value: 200,
},
opacity: {
animation: {
enable: true,
minimumValue: 0.05,
speed: 2,
sync: false,
},
random: false,
value: 1,
},
shape: {
type: "circle",
},
size: {
animation: {
enable: false,
minimumValue: 0.1,
speed: 40,
sync: false,
},
random: true,
value: 1,
},
},
polygon: {
draw: {
enable: true,
lineColor: "rgba(255,255,255,0.2)",
lineWidth: 0.3,
},
move: {
radius: 10,
},
inlineArrangement: "equidistant",
scale: 0.5,
type: "inline",
url: "https://particles.js.org/images/smalldeer.svg",
},
};
It only takes a part of the screen
from react.
That's because you disabled the full screen css, now it's a standard div and you have to manage the css yourself.
from react.
Related Issues (20)
- Link in readme about particles container not working
- `console.dir` is left in code HOT 2
- Particles not showing. HOT 1
- How do i stop ts particles from taking the whole background and only the background of the div its in HOT 1
- Changing theme crashes page HOT 7
- hexagons preset is not working for me HOT 1
- Convert the component using hooks HOT 7
- Fast route changes causes component render outside #root HOT 1
- How to set it to render within a certain div range instead of the entire screen HOT 1
- tsparticles causing build to fail HOT 1
- How to change the fixed of canvas to absolute? HOT 1
- Update license to MIT same as @tsparticles/engine
- Please fix TypeScript support - object HOT 6
- Vector.js error HOT 1
- Next JS HOT 1
- Flickering Particles on projects build with React and Vite HOT 1
- [Feature Request] Support to React Native HOT 1
- Particles started loading very slowly recently HOT 2
- After these changes it seems not working with autoPlay: false HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.