wufe / react-particles-js

Particles.js for React
https://rpj.bembi.dev/
MIT License
1.15k stars 106 forks source link

Render children in canvas #97

Closed orangecoding closed 4 years ago

orangecoding commented 5 years ago

When using react-particle-js, it would be super convenient, to be able to render children within the canvas, so that I can render div's on top of the canvas.

so instead of

<div className={className}>
                <canvas
                    ref={this.loadCanvas}
                    className={canvasClassName}
                    style={{
                        ...this.props.style,
                        width,
                        height
                    }}
                />
            </div>

it would be cool to do something like this:

<div className={className}>
                <canvas
                    ref={this.loadCanvas}
                    className={canvasClassName}
                    style={{
                        ...this.props.style,
                        width,
                        height
                    }}
                >
                                    {this.props.children}
                                </canvas>
            </div>
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.