Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: smoke originating at bottom of full document height? #3

Closed
boldc opened this issue Nov 8, 2016 · 1 comment
Closed

Question: smoke originating at bottom of full document height? #3

boldc opened this issue Nov 8, 2016 · 1 comment

Comments

@boldc
Copy link

boldc commented Nov 8, 2016

Hi, I love this smoke effect, thank you for making it available on github!!!

Is it possible to place an emitter on the bottom of the page, if the page height is greater than the viewport height (i.e., 'below the fold')? Could you post an example of how this could be done? I've tried a few things, but my nascent javascript skills have been unsuccessful.

Thanks again!

@bijection
Copy link
Owner

You can place the emitter anywhere on your canvas element - here's an example with a tall canvas element:

<canvas id="canvas"></canvas>
<script src="smoke.js"></script>
<script>
    var canvas = document.getElementById('canvas')
    var ctx = canvas.getContext('2d')
    canvas.width = 1000
    canvas.height = 4000

    var party = smokemachine(ctx)

    party.start()

    party.addsmoke(500,3500,10) 

</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants