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

PeasyCam Broken with p5.js v0.7.2 September 02, 2018 #5

Open
CharlesFr opened this issue Oct 17, 2018 · 10 comments
Open

PeasyCam Broken with p5.js v0.7.2 September 02, 2018 #5

CharlesFr opened this issue Oct 17, 2018 · 10 comments

Comments

@CharlesFr
Copy link

Peasy cam doesn't load with the simple example provided in the readme - any ideas?

Uncaught TypeError: renderer.camera is not a function
    at EasyCam.apply (p5.easycam.js:608)
    at EasyCam.update (p5.easycam.js:591)
    at p5.easycam.js:429
    at callMethod (p5.js:55140)
    at Array.forEach (<anonymous>)
    at p5.redraw (p5.js:55148)
    at p5.<anonymous> (p5.js:48840)
    at p5.<anonymous> (p5.js:48742)
    at new p5 (p5.js:49029)
    at _globalInit (p5.js:48414)
@CharlesFr
Copy link
Author

CharlesFr commented Oct 17, 2018

Also, could you indicated how to initialise the view with the Z going up towards the top of the browser?

@msawired
Copy link

Getting the same issue from some users on OpenProcessing. Not sure hot to fix, but must a variable naming issue.

@jwdunn1
Copy link

jwdunn1 commented Nov 5, 2018

While we await the above PR approval, OpenProcessing users who want to use 0.7.2 with EasyCam can drop the following fix into setup() prior to invoking createEasyCam()

    // fix for EasyCam to work with p5 v0.7.2
    Dw.EasyCam.prototype.apply = function(n) {
      var o = this.cam;
      n = n || o.renderer,
      n && (this.camEYE = this.getPosition(this.camEYE), this.camLAT = this.getCenter(this.camLAT), this.camRUP = this.getUpVector(this.camRUP), n._curCamera.camera(this.camEYE[0], this.camEYE[1], this.camEYE[2], this.camLAT[0], this.camLAT[1], this.camLAT[2], this.camRUP[0], this.camRUP[1], this.camRUP[2]))
    };

For example: http:https://www.openprocessing.org/sketch/621401

@nevahid
Copy link

nevahid commented Feb 3, 2019

hi, i'm still having problem working with newer versions... please help..............

@jwdunn1
Copy link

jwdunn1 commented Feb 3, 2019

The fix I have posted above also works with p5 v0.7.3
Here is another example: https://www.openprocessing.org/sketch/645473

@nevahid
Copy link

nevahid commented Feb 4, 2019

hi again... thanks for your response... your code works just fine... i'm trying to continue working on it... thanks again

@nevahid
Copy link

nevahid commented Feb 4, 2019

why do i get this warning?
p5.min.js:3 You must first call texture() before using vertex() with image based u and v coordinates
many of it, repeatedly... consuming a lot

@jwdunn1
Copy link

jwdunn1 commented Feb 4, 2019

Off topic:
@nevahid A change was made on Jan 26: if calling vertex with 4 or more parameters, then a call must be made to texture() first.
github.com/processing/p5.js/pull/3483

@nevahid
Copy link

nevahid commented Feb 4, 2019

thanks a lot! after some modifications suggested by you, i got it working... and it seems mySketch.js should be loaded in body tag... don't know why, but it is working now...
thanks again

@jwdunn1
Copy link

jwdunn1 commented Aug 28, 2019

The fix I posted above also works with p5 v0.9.0
Example: https://editor.p5js.org/jwdunn1/sketches/1J8asex6f

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

4 participants