Pixl demos #4639
Replies: 1 comment
-
Posted at 2018-05-16 by @gfwilliams Yes, I'll add a section on it to the Pixl reference at http://www.espruino.com/Pixl.js in the next few hours. Posted at 2018-05-16 by davidhay TBH - I'd prefer an explicit assignment myself - but understand the thinking. Hopefully no one uses 'g' as a variable name! Posted at 2018-05-16 by @allObjects @davidhay - absolutely! think about all the code that is already going on... and now reserving a single char variable name is a no-no for me... I tried to come up with a solution... but cannot really think of one. Posted at 2018-05-16 by Wilberforce We need to remember we are on a micro here... any long name takes up precious jsvars. Length 1-4 still fits in a var, however I'm not sure Posted at 2018-05-17 by davidhay well yes, but how much extra (compiled) space does an explicit assignment take? ie:
Posted at 2018-05-17 by @gfwilliams
It's not about the compiled space, it was about allowing people to take it out the box and start using the graphics right away with the minimum amount of boilerplate required.
I can add |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-05-16 by davidhay
In most of the demos there is a variable 'g' that refers to the graphics display. In the Pixl, where is that defined? Is it 'built-in' in some way?
see: http://www.espruino.com/Pico+Flappy+Bird+Game
Beta Was this translation helpful? Give feedback.
All reactions