Dave Pagurek

Results 425 comments of Dave Pagurek
trafficstars

> Could we use the starting point and direction of a shape's perimeter to infer the texture map, instead of requiring the user to pass in texture coordinates? I think...

@leslieyip02 thanks for catching that! My mistake, the inside of the branch was missing the `elt.` prefix. I've updated the sketch to now have this: ```js if (this.src.elt && this.src.elt.naturalWidth...

@kate-grant right, [according to MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalWidth) it can sometimes be 0 when it exists, so we should probably check if both exist and are truthy before using them. > I would...

I've made a little library that works like the above, in case anyone's interested! https://github.com/davepagurek/p5.buildGeometry I'm going to try using it for a little while to see if there are...

Do you think the documentation for `drawingContext` would be a good spot for that? Maybe updating the example there and adding some comments in the code to explain?

Another option might be as [a tutorial on the p5js site](https://p5js.org/learn/), maybe accompanied with some other `drawingContext` features one might want to use such as using `.clip()` and linear/radial gradients?...

Hey! A core part of the performance here is that data is being sent to the GPU more often than necessary to keep the texture updated. Chrome might optimize this...

I'm going to mark this as closed now that framebuffers have been added to p5. That should have more reliable performance across browsers. Feel free to continue the discussion if...

If you create a `new p5.Vector(...)` and pass in `_fromRadians` and `_toRadians` implementations into the constructor as the first two arguments, then `isPInst` records that the vector contains a reference...

You're right that it would have access to those properties in that case! The issue is that you would then have to call it on an instance of a vector,...