# P5 js 3D texture not loaded on iOS

**URL:** <https://discourse.processing.org/t/p5-js-3d-texture-not-loaded-on-ios/11562>\
**Category:** Coding Questions\
**Created:** [May 24, 2019, 6:01pm UTC](https://discourse.processing.org/t/p5-js-3d-texture-not-loaded-on-ios/11562 "2019-05-24T18:01:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [May 26, 2019, 2:40pm UTC](https://discourse.processing.org/t/p5-js-3d-texture-not-loaded-on-ios/11562/2 "2019-05-26T14:40:40Z")

</div>

Possibly a javascript compile error that passes on your desktop, but not mobile? See related dicussion:

> [@Why does my p5js game not work for iPhones?](https://discourse.processing.org/t/why-does-my-p5js-game-not-work-for-iphones/891/4):
>
> So I got everything to display on my iPhone 4 by eliminating two js bugs. First I had a couple functions which I set a default value for the parameters. Apparently this is a no-no in js but Android and PC let it slide. If you use default params in js they have to be of the ‘null / false’ variety. Second, I used a few for loops of the following variety: for (let card of cards) { card.x++; } These didn’t work and I switched them to: for (var i = 0; i \< cards.length - 1; i++) { cards[…

If not, a quick test: If you change draw3Ddirect, does the sketch display something on iOS? For example, try using it to draw simple boxes without textures, or to draw 2D shapes. My guesses to start looking would be some issue with iOS and texture, renderer, or specific canvas / PGraphics sizes / aspect ratios.

How are you viewing it on iOS – through the editor link?

---

_[View the full topic](https://discourse.processing.org/t/p5-js-3d-texture-not-loaded-on-ios/11562)._
