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

P5 implementation conflicts with Vue.js #4

Open
christianechevarria opened this issue Sep 11, 2019 · 0 comments
Open

P5 implementation conflicts with Vue.js #4

christianechevarria opened this issue Sep 11, 2019 · 0 comments

Comments

@christianechevarria
Copy link
Member

When vue inhabits the same scope as the p5 canvas the canvas no longer works.

Works:

<div class="columns">
          <div class="column">
            <!-- P5 canvas -->
            <canvas id="canvas" width="450" height="512"> </canvas>
            <div class="field game-slider">
              <label class="label has-text-white">Speed</label>
              <input id="speedSlider" class="slider has-output is-small" step="1" min="0" max="10" value="1" type="range">
              <output id="speed" for="speedSlider">1</output>
            </div>
          </div>
          <div id="app" class="column"> <!-- Vue app scope -->
            <span class="banner-text has-text-white">

Doesn't work:

<div id="app" class="columns"> <!-- Vue app scope -->
          <div class="column">
            <!-- P5 canvas -->
            <canvas id="canvas" width="450" height="512"> </canvas>
            <div class="field game-slider">
              <label class="label has-text-white">Speed</label>
              <input id="speedSlider" class="slider has-output is-small" step="1" min="0" max="10" value="1" type="range">
              <output id="speed" for="speedSlider">1</output>
            </div>
          </div>
          <div class="column">
            <span class="banner-text has-text-white">

If we follow the techniques detailed in this article we can get around this, but it might take updating the p5 version and it is unknown what that will do to the current implementation

Will leave this for now until other features are successfully added

@christianechevarria christianechevarria changed the title Current implementation of P5 has a conflict with Vue.js P5 implementation conflicts with Vue.js Sep 11, 2019
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

1 participant