I’ve made a fairly large change to this build: The tab bar now scrolls off the screen to show more code. Scrolling up immediately brings it back. Let me know what you think about this change.
The fixes are outlined in the release notes.
However there are some things that have not been fixed:
saveProjectTab() use when explicitly naming the current project
unable to import photos in landscape mode mentioned by @tnlogy (cannot reproduce this one)
unable to run Graphics Styles example mentioned by @Codeslinger (cannot reproduce)
I’d like to consider renaming the BLEND_* constants as mentioned by @mpilgrem as well. It’s not pleasant to have the BLEND_ prefix used in so many instances.
@simeon - I really like the tab bar feature, the extra space, while only a couple of lines, is very welcome when typing directly on my iPad.
Any plans to be have it in the shaderlab too ?
Concerning the shaderlab, can we get and option to hide the preview for fullscreen code?
I’ll second renaming the blend constants. They’re a pain to type with the underscores and you have to type a large segment of the name before you can see the name in the autocomplete list.
I found out what the problem with GraphicsStyle is for me. It contains some UTF-8 non-breaking spaces “0xc2 0xa0”. I think my installation is one year old, the occurrence of nbsps in the examples may have been eliminated now. If I delete these spaces the code runs as expected. This seems to be similar to the problem I had on the desktop where Lua rejected nbsps. But Codea was able to run such scripts in the past, what happened?
Tab in same project: contents are cleared, tab still exists. Is the tab supposed to stay there or be deleted? If I want to clear the contents and keep the tab I’d rather set it to “”.
.@Simeon I recall in another thread that you had plans to delete the tab if the contents param to saveProjectTab() was nil…are there plans to include this behavior in 1.5? I have an idea for a remote project bootstrap sort of thing, but it will depend on that behavior. It would awesome I’d it does make it into 1.5
--
-- Print Test
--
-- Produces differently formatted output in Codea 1.4.6(15)
-- and beta 1.5(12). In the beta, tab characters are treated like
-- single space characters
function setup()
-- Produces the same output in beta:
print("a", "b", "c")
print("a\\tb\\tc")
print("a b c")
-- Produces the same output in beta:
print(1, 2, 3)
print(tostring(1).."\\t"..tostring(2).."\\t"..tostring(3))
print(tostring(1).." "..tostring(2).." "..tostring(3))
end
function draw() background(0) end
There is still a refresh glitch with “selecting” and deleting a single word (undo feature has the same refresh issue).
Also, I’m having issues using arrays as uniforms
m.shader.c = { vec3(1, 1, 1), vec3(1, 1, 1) }
uniform lowp vec3 c[];
is that code not supposed to work ?
There are a few display glitches with commenting:
Any “+” you add after a comment will make the a number of characters starting from the end of the line appear white instead of green.
Here, the last character appears white
--++
```
C type comments "green" out the code as a regular -- comment would, but they obviously don't work.
Block comments aren't displayed properly
--[[
this is not "greened" out
]]
```
Finally, the += button still does variable = variable + in the glsl editor but that's not really a bug.
Cheers
I really like the idea of being able to build a shader with a string (you can really customize shaders).
However, i just can’t get it to work (nothing gets displayed, as if shader error)
Can anyone tell me how they get it running ?
function setup()
vertexSource =
" attribute vec4 position;"..
" void main()"..
" {"..
" gl_Position = position;"..
" }"
fragmentSource =
" void main()"..
" {"..
" gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);"..
" }"
m = mesh()
m.shader = shader()
m.shader.vertexProgram = vertexSource
m.shader.fragmentProgram = fragmentSource
m:addRect(0,0, WIDTH, HEIGHT)
end
function draw()
m:draw()
end
```
edit: ok got it to work..
myShader = shader()
myShader.vertexProgram = vertexSource
myShader.fragmentProgram = fragmentSource
m = mesh()
m.shader = myShader
....
```
@Simeon - the + glitch that affect highlighting also happens with strings, which is actually more annoying :P
BUG PASTE PROJECT unless i did sthg wrong, i think the ‘long press on +’ to paste a project from the clipboard works only when the project has tabs. It is a bit annoying in the case of short projects made of 1 tab only.
.@bortels (continuing an old discussion) hello! I have finally managed to store user information by going to PHP. You can have a look at my final solution at http://jmv38.comze.com/CODEA/server.php
I have found the site ‘ready to use’ on the web. Actually, i had to work a couple days to understand how to make mySql work on my web host, but that’s done now. And i am pretty happy of the result. Thank for giving me the initial impulse!