By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML embedding js processing pde in html


New Coder
i'm cannibalizing an example i found online to embed a simple js processing file in html, but the canvas is appearing blank for me. i have absolutely no html experience- just want to put a js file on a web browser.

here's the html file in case it's a simple issue

<!-- saved from url=(0053)https://cs.nyu.edu/~kapp/cs101/processing_on_the_web/ -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Processing on the Web</title>
        <script type="text/javascript" src="processing.js"></script>
        <style type="text/css">
            pre {
                background-color: #EEE;
                padding: 15px;
            #theCanvas {
                width: 500px;
                margin: auto;
                border: 5px solid black;
                display: block;
    <style type="text/css">@font-face {
  font-family: "PjsEmptyFont";


        <p>here's the js app:</p>
        <canvas id="theCanvas" data-processing-sources="ui_template.pde" tabindex="0" width="400" height="800" style="image-rendering: -webkit-optimize-contrast !important;"></canvas>


<span style="position: absolute; top: 0px; left: 0px; opacity: 0; font-family: PjsEmptyFont, fantasy;">AAAAAAAA</span></body></html>

if not, i posted the whole folder on github https://github.com/CANSLP/ui_template

thanks for any help at all!

New Threads

Latest posts

Buy us a coffee!

Top Bottom