mirror of https://github.com/teverse/teverse
Compare commits
13 Commits
9c7cd0d0e2
...
ef40aa99e4
Author | SHA1 | Date |
---|---|---|
Sanjay Bhadra | ef40aa99e4 | |
teverse | 6c75e1f150 | |
teverse | e21c0d6c29 | |
Jay | ff7349f77b | |
Jay | 603e4e49c2 | |
Jay | 8285c56bec | |
Sanjay | edd5bce75c | |
teverse | a940f65df4 | |
teverse | 82cbb27e60 | |
Jay | f932d61dd5 | |
teverse | f71dcddd81 | |
Jay | 747aad5a7d | |
Jay | 6550805520 |
|
@ -41,7 +41,79 @@ return {
|
||||||
"Run unpacked app",
|
"Run unpacked app",
|
||||||
"code",
|
"code",
|
||||||
function ()
|
function ()
|
||||||
teverse.apps:promptAppDirectory()
|
|
||||||
|
-- backwards compatibility
|
||||||
|
if _TEV_VERSION_MINOR < 25 then
|
||||||
|
return teverse.apps:promptAppDirectory()
|
||||||
|
end
|
||||||
|
|
||||||
|
local recents = teverse.apps:recentDirectories()
|
||||||
|
if #recents == 0 then
|
||||||
|
teverse.apps:promptAppDirectory()
|
||||||
|
else
|
||||||
|
local backdrop = teverse.construct("guiFrame", {
|
||||||
|
parent = teverse.interface,
|
||||||
|
size = guiCoord(1, 100, 1, 100),
|
||||||
|
position = guiCoord(0, -50, 0, -50),
|
||||||
|
backgroundColour = colour(0, 0, 0),
|
||||||
|
backgroundAlpha = 0.0,
|
||||||
|
zIndex = 10
|
||||||
|
})
|
||||||
|
|
||||||
|
teverse.tween:begin(backdrop, 0.2, {
|
||||||
|
backgroundAlpha = 0.8
|
||||||
|
})
|
||||||
|
|
||||||
|
local dialog = teverse.construct("guiFrame", {
|
||||||
|
parent = backdrop,
|
||||||
|
size = guiCoord(0, 200, 0, 100),
|
||||||
|
position = guiCoord(0.5, -100, 0.5, -50),
|
||||||
|
backgroundColour = colour(1, 1, 1),
|
||||||
|
strokeRadius = 2,
|
||||||
|
dropShadowAlpha = 0.15,
|
||||||
|
strokeAlpha = 0.05
|
||||||
|
})
|
||||||
|
|
||||||
|
teverse.tween:begin(dialog, 0.2, {
|
||||||
|
size = guiCoord(0, 500, 0, 200),
|
||||||
|
position = guiCoord(0.5, -250, 0.5, -100)
|
||||||
|
}, "outQuad")
|
||||||
|
|
||||||
|
local prompt = teverse.construct("guiIcon", {
|
||||||
|
parent = dialog,
|
||||||
|
size = guiCoord(0.3, 0, 1, 0),
|
||||||
|
position = guiCoord(0.7, 0, 0, 0),
|
||||||
|
iconMax = 40,
|
||||||
|
iconColour = colour.rgb(74, 140, 122),
|
||||||
|
backgroundAlpha = 0.05,
|
||||||
|
backgroundColour = colour(0, 0, 0),
|
||||||
|
iconType = "faSolid",
|
||||||
|
iconId = "folder-open"
|
||||||
|
})
|
||||||
|
|
||||||
|
prompt:on("mouseLeftUp", function()
|
||||||
|
teverse.apps:promptAppDirectory()
|
||||||
|
end)
|
||||||
|
|
||||||
|
local y = 0
|
||||||
|
for _,v in pairs(recents) do
|
||||||
|
|
||||||
|
local trigger = teverse.construct("guiTextBox", {
|
||||||
|
parent = dialog,
|
||||||
|
size = guiCoord(0.7, -20, 0, 18),
|
||||||
|
position = guiCoord(0, 10, 0, y),
|
||||||
|
backgroundAlpha = 0.0,
|
||||||
|
text = v,
|
||||||
|
textSize = 18
|
||||||
|
})
|
||||||
|
|
||||||
|
trigger:on("mouseLeftUp", function()
|
||||||
|
teverse.apps:runRecent(v)
|
||||||
|
end)
|
||||||
|
|
||||||
|
y = y + 20
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,14 @@ $output v_normal, v_colour, v_position, v_pbr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <teverse.sh>
|
#include <teverse.sh>
|
||||||
|
#define __BUFFER_XX(_name, _type, _reg, _access) \
|
||||||
|
layout(std430, binding=_reg) _access buffer _name ## Buffer \
|
||||||
|
{ \
|
||||||
|
_type _name[]; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BUFFER_RO(_name, _type, _reg) __BUFFER_XX(_name, _type, _reg, readonly)
|
||||||
|
|
||||||
BUFFER_RO(normalData, vec4, 2);
|
BUFFER_RO(normalData, vec4, 2);
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
|
@ -32,8 +40,8 @@ void main()
|
||||||
gl_Position = mul(u_viewProj, vec4(wpos, 1.0) );
|
gl_Position = mul(u_viewProj, vec4(wpos, 1.0) );
|
||||||
|
|
||||||
vec3 normal = a_normal.xyz * 2.0 - 1.0;
|
vec3 normal = a_normal.xyz * 2.0 - 1.0;
|
||||||
vec3 wnormal = instMul(normalMatrix, vec4(normal.xyz, 0.0));
|
vec3 wnormal = instMul(normalMatrix, normal.xyz);
|
||||||
v_normal = encodeNormalUint(normalize(wnormal.xyz));
|
v_normal = encodeNormalUint(normalize(wnormal.xyz));
|
||||||
v_colour = i_data4;
|
v_colour = i_data4;
|
||||||
v_position = gl_Position;
|
v_position = gl_Position.xyz;
|
||||||
}
|
}
|
|
@ -89,7 +89,7 @@ void main()
|
||||||
vec3 V = normalize(uniformCameraPosition.xyz - wpos);
|
vec3 V = normalize(uniformCameraPosition.xyz - wpos);
|
||||||
|
|
||||||
vec3 F0 = vec3(0.04, 0.04, 0.04);
|
vec3 F0 = vec3(0.04, 0.04, 0.04);
|
||||||
F0 = mix(F0, colour, metallic);
|
F0 = mix(F0, colour.xyz, metallic);
|
||||||
|
|
||||||
vec3 L = lightDir;
|
vec3 L = lightDir;
|
||||||
vec3 H = normalize(V + L);
|
vec3 H = normalize(V + L);
|
||||||
|
@ -110,5 +110,5 @@ void main()
|
||||||
// add to outgoing radiance Lo
|
// add to outgoing radiance Lo
|
||||||
float NdotL = max(dot(normal.xyz, L), 0.0);
|
float NdotL = max(dot(normal.xyz, L), 0.0);
|
||||||
|
|
||||||
gl_FragColor = vec4(((kD * colour / PI + specular) * lightColour * NdotL), colour.w);
|
gl_FragColor = vec4(((kD * colour.xyz / PI + specular) * lightColour * NdotL), colour.w);
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
local pingScale = 300
|
local pingScale = 300
|
||||||
local downloadScale = 1024 * 1
|
local downloadScale = 1024 * 5
|
||||||
local uploadScale = 1024 * 1
|
local uploadScale = 1024 * 5
|
||||||
|
|
||||||
return function()
|
return function()
|
||||||
local main = teverse.construct("guiFrame", {
|
local main = teverse.construct("guiFrame", {
|
||||||
|
|
Loading…
Reference in New Issue