feat(client): add liquid presentation and clearer cellular HUD
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m11s
Foundation / image (push) Successful in 4m36s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m11s
Foundation / image (push) Successful in 4m36s
This commit is contained in:
@@ -758,6 +758,8 @@ int main(int argc, char** argv) try {
|
||||
const bool microscope = cellular_remote && mode() == Mode::remote && cellular_trial;
|
||||
if (microscope) {
|
||||
const bool fresh = cellular_remote->cellular_play().fresh();
|
||||
scene.camera_centre = camera->centre();
|
||||
scene.stale = !fresh;
|
||||
if (const auto* perception = cellular_remote->cellular_perception())
|
||||
for (const auto& patch : perception->patches) {
|
||||
const auto low =
|
||||
@@ -803,12 +805,18 @@ int main(int argc, char** argv) try {
|
||||
const auto low = camera->screen_to_world({0, height});
|
||||
const auto high = camera->screen_to_world({width, 0});
|
||||
if (flow_field && low && high) {
|
||||
const double span = std::max(high->x_mm - low->x_mm, 0.001);
|
||||
const double span =
|
||||
std::max({high->x_mm - low->x_mm, high->y_mm - low->y_mm, 0.001});
|
||||
const double step = std::max(0.4, span / 28);
|
||||
for (double y = std::floor(low->y_mm / step) * step; y <= high->y_mm;
|
||||
y += step)
|
||||
for (double x = std::floor(low->x_mm / step) * step; x <= high->x_mm;
|
||||
x += step) {
|
||||
const double first_x = std::floor(low->x_mm / step) * step;
|
||||
const double first_y = std::floor(low->y_mm / step) * step;
|
||||
const int columns =
|
||||
std::clamp(static_cast<int>((high->x_mm - first_x) / step) + 1, 1, 30);
|
||||
const int rows =
|
||||
std::clamp(static_cast<int>((high->y_mm - first_y) / step) + 1, 1, 30);
|
||||
for (int row = 0; row < rows; ++row)
|
||||
for (int column = 0; column < columns; ++column) {
|
||||
const double x = first_x + column * step, y = first_y + row * step;
|
||||
const auto flow =
|
||||
flow_field->sample(static_cast<std::int64_t>(x * 1000),
|
||||
static_cast<std::int64_t>(y * 1000));
|
||||
@@ -829,7 +837,8 @@ int main(int argc, char** argv) try {
|
||||
static_cast<float>(sx / norm * length),
|
||||
static_cast<float>(sy / norm * length),
|
||||
static_cast<float>(std::min(speed, 300.0) / 300),
|
||||
static_cast<std::uint32_t>(x * 7919 + y * 104729)});
|
||||
static_cast<std::uint32_t>(
|
||||
static_cast<std::int64_t>(x * 7919 + y * 104729))});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user