начинаю переписывать рендер движка на SDL для кроссплатформенности и удобства.
<html>
<style>
html {
background: #ccf;
}
.ball{
width: 64px;
height: 64px;
background: #070707;
}
</style>
<div class="ball"></div>
<script>
var pos_y = 0;
var pos_x = 0;
var dir_y = 1;
var dir_x = 1;
var max_y_screen = (window.innerHeight - 115);
var max_x_screen = (window.innerWidth - 115);
var ball = document.getElementsByClassName("ball")[0];
function draw() {
pos_y += 5 * dir_y;
pos_x += 5 * dir_x;
if (pos_y >= max_y_screen || pos_y <= 0) dir_y *= -1;
if (pos_x >= max_x_screen || pos_x <= 0) dir_x *= -1;
ball.style.transform = "translate(" + pos_x + "px," + pos_y + "px)";
requestAnimationFrame(draw);
}
draw();
</script>
</html>
приколяху сделал на работе)
draw.html
1 KB
линуксоиды (арчебои) вот вам заставка ожидания)
у кого не белые списки то оказывается до сих пор работает WARP
😁2
HCPP DEV
у кого не белые списки то оказывается до сих пор работает WARP
я думал что его давно забанили. Но оказывается хуй там
float cpos_y = 0;
float cpos_x = 0;
float cdir_y = 1;
float cdir_x = 1;
float cmax_y_screen = 0;
float cmax_x_screen = 0;
float cspeed = 256;
void fun_dvd_logo() {
cpos_y += cspeed * cdir_y * ImGui::GetIO().DeltaTime;
cpos_x += cspeed * cdir_x * ImGui::GetIO().DeltaTime;
cmax_y_screen = PahomEngine->cast->unicast<int64_t,float>(PahomEngine->i64WindowSize[1]) - 80.0f;
cmax_x_screen = PahomEngine->cast->unicast<int64_t, float>(PahomEngine->i64WindowSize[0]) - 80.0f;
if (cpos_y >= cmax_y_screen || cpos_y <= 0) cdir_y *= -1;
if (cpos_x >= cmax_x_screen || cpos_x <= 0) cdir_x *= -1;
ImGui::SetCursorPos({ cpos_x, cpos_y });
ImGui::Image(PahomEngine->ImageData.TextureArray[4], { 80.0f,80.0f });
ImGui::SetCursorPos({ cpos_x, cpos_y + 80.0f });
PahomEngine->Text("x: {} y: {}\nw: {} h: {}", cpos_x, cpos_y, cmax_x_screen, cmax_y_screen);
}
перенес анимацию в движок)
бедные вайбкодеры ))) А мне похуй. Я как делал сам так и делаю. Думайте.
Forwarded from concertzaal
ChatGPT и Claude не работают по всему миру — обе компании официально признали проблему.
мировая офисная продуктивность рухнула в 0 за последние 30 минут😄
@concertzaal
мировая офисная продуктивность рухнула в 0 за последние 30 минут
@concertzaal
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
❤3