Migrate Entity profile media to approved WebP payloads
No files matched your search
@@ -38,6 +38,11 @@ existing account and storage operations.
|
||||
The optional `entity.assets` service supplies an absolute extracted asset root to
|
||||
hosts that need one. Other hosts use the bundle-relative `assets/entity/` paths.
|
||||
The picture atlas comes from Kryon and the flower picture from Inner Breeze.
|
||||
The three abstract pictures use photo q80 WebP; flowers, the classic picture
|
||||
atlas and the four Wurm atlases use lossless WebP with unchanged dimensions and
|
||||
RGBA pixels. Hosts adopting this package must use the `.webp` paths in
|
||||
`asset-groups.json` and `EntityProfileAssetAt`, including `assets/entity/pfp.webp`;
|
||||
the previous nine PNG payloads are no longer packaged.
|
||||
|
||||
Embedding hosts may stage `asset-groups.json` through
|
||||
`scripts/stage-assets.py --group profile --output HOST_STAGING`. The `profile`
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"profile": [
|
||||
"assets/entity/abstract-amber.png",
|
||||
"assets/entity/abstract-jade.png",
|
||||
"assets/entity/abstract-violet.png",
|
||||
"assets/entity/flowers.png",
|
||||
"assets/entity/pfp.png"
|
||||
"assets/entity/abstract-amber.webp",
|
||||
"assets/entity/abstract-jade.webp",
|
||||
"assets/entity/abstract-violet.webp",
|
||||
"assets/entity/flowers.webp",
|
||||
"assets/entity/pfp.webp"
|
||||
],
|
||||
"leaderboard": [
|
||||
"assets/entity/wurm-base.png",
|
||||
"assets/entity/wurm-reward-skins.png",
|
||||
"assets/entity/wurm-skins.png",
|
||||
"assets/entity/wurm-special-skins.png",
|
||||
"assets/entity/wurm-base.webp",
|
||||
"assets/entity/wurm-reward-skins.webp",
|
||||
"assets/entity/wurm-skins.webp",
|
||||
"assets/entity/wurm-special-skins.webp",
|
||||
"assets/entity/shovey-0.png",
|
||||
"assets/entity/shovey-1.png",
|
||||
"assets/entity/shovey-2.png",
|
||||
|
||||
|
Before Width: | Height: | Size: 369 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 352 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 339 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 157 KiB |
|
After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 683 KiB |
|
After Width: | Height: | Size: 456 KiB |
|
Before Width: | Height: | Size: 703 KiB |
|
After Width: | Height: | Size: 495 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 920 KiB |
@@ -2,17 +2,19 @@
|
||||
|
||||
Generated with the built-in image_gen tool and copied as binary PNG files into
|
||||
`assets/entity/`. Originals remain in the tool's generated_images directory.
|
||||
The packaged copies now use the approved photo q80 WebP comparison payloads
|
||||
at their original 512×512 dimensions.
|
||||
|
||||
- `abstract-jade.png`: A sculptural flowing loop with soft folded glass surfaces,
|
||||
- `abstract-jade.webp`: A sculptural flowing loop with soft folded glass surfaces,
|
||||
an abstract identity without faces or letters. Single centered luminous form,
|
||||
generous margin for circular cropping, filled square backdrop. Jade, pale mint
|
||||
and deep teal. Polished tactile 3D abstract artwork, soft studio lighting, clean
|
||||
uncluttered background. No text, logo, frame or watermark.
|
||||
- `abstract-amber.png`: A single sculptural amber orb made of concentric folded
|
||||
- `abstract-amber.webp`: A single sculptural amber orb made of concentric folded
|
||||
satin ribbons, lit from within, floating centered on a warm dark terracotta
|
||||
backdrop. Clean tactile 3D abstract art with soft light and generous
|
||||
circular-crop margins. No text, people, logos, border or watermark.
|
||||
- `abstract-violet.png`: A single pearlescent lilac spiral made of soft rounded
|
||||
- `abstract-violet.webp`: A single pearlescent lilac spiral made of soft rounded
|
||||
sculptural petals, without a flower stem, floating centered on a deep indigo
|
||||
backdrop. Minimal polished abstract 3D art, gentle studio highlights, generous
|
||||
margins for circular cropping. No text, faces, logos, border or watermark.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Stage declared Entity asset groups for an embedding host."""
|
||||
"""Stage declared Entity asset groups, preserving their WebP/PNG payload bytes."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path, PurePosixPath
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
ENTITY_PROFILE_ASSET_COUNT :: 17
|
||||
EntityProfileAssetAt :: (index: s32) -> string {
|
||||
names: [17]string = .[
|
||||
"assets/entity/pfp.png", "assets/entity/flowers.png",
|
||||
"assets/entity/abstract-jade.png", "assets/entity/abstract-amber.png", "assets/entity/abstract-violet.png",
|
||||
"assets/entity/wurm-special-skins.png", "assets/entity/wurm-skins.png",
|
||||
"assets/entity/wurm-reward-skins.png", "assets/entity/wurm-base.png",
|
||||
"assets/entity/pfp.webp", "assets/entity/flowers.webp",
|
||||
"assets/entity/abstract-jade.webp", "assets/entity/abstract-amber.webp", "assets/entity/abstract-violet.webp",
|
||||
"assets/entity/wurm-special-skins.webp", "assets/entity/wurm-skins.webp",
|
||||
"assets/entity/wurm-reward-skins.webp", "assets/entity/wurm-base.webp",
|
||||
"assets/entity/shovey-0.png", "assets/entity/shovey-1.png", "assets/entity/shovey-2.png",
|
||||
"assets/entity/shovey-3.png", "assets/entity/shovey-4.png", "assets/entity/shovey-5.png",
|
||||
"assets/entity/shovey-6.png", "assets/entity/shovey-7.png"]
|
||||
|
||||
@@ -68,7 +68,7 @@ ProfileLeaderboardPicture :: (session: Session, key: u64, icon: s32, bounds: Rec
|
||||
ProfileLeaderboardWurm :: (session: Session, key: u64, icon: s32, bounds: Rectangle) -> bool {
|
||||
skin := ifx icon >= 1 && icon <= 13 then icon - 1 else 0
|
||||
root := AppService("entity.assets", "")
|
||||
asset := ifx skin == 0 then "assets/entity/wurm-base.png" else ifx skin <= 6 then "assets/entity/wurm-skins.png" else ifx skin <= 8 then "assets/entity/wurm-special-skins.png" else "assets/entity/wurm-reward-skins.png"
|
||||
asset := ifx skin == 0 then "assets/entity/wurm-base.webp" else ifx skin <= 6 then "assets/entity/wurm-skins.webp" else ifx skin <= 8 then "assets/entity/wurm-special-skins.webp" else "assets/entity/wurm-reward-skins.webp"
|
||||
// Optional imagery is checked against this bundle, never old extracted files.
|
||||
if AppSupports("entity.asset") && AppService("entity.asset", asset) != "available" { return false }
|
||||
out: Vec(u8)
|
||||
|
||||
@@ -277,7 +277,7 @@ EntityAbstractFromPublicIcon :: (icon: s32) -> s32 {
|
||||
}
|
||||
|
||||
EntityAbstractPictureAsset :: (index: s32) -> string {
|
||||
names: [3]string = .["assets/entity/abstract-jade.png", "assets/entity/abstract-amber.png", "assets/entity/abstract-violet.png"]
|
||||
names: [3]string = .["assets/entity/abstract-jade.webp", "assets/entity/abstract-amber.webp", "assets/entity/abstract-violet.webp"]
|
||||
return names[index]
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ EntityIconImage :: (icon: s32, bounds: Rectangle, alt: string) -> ImageProps {
|
||||
if picture < 0 { picture = 0 }
|
||||
if picture == 9 {
|
||||
// Flowers has its own detailed image.
|
||||
image.asset_path = "assets/entity/flowers.png"
|
||||
image.asset_path = "assets/entity/flowers.webp"
|
||||
return image
|
||||
}
|
||||
image.asset_path = "assets/entity/pfp.png"
|
||||
image.asset_path = "assets/entity/pfp.webp"
|
||||
image.source = Rectangle.{cast(float32)(picture % 5) * 64.0, cast(float32)(picture / 5) * 64.0, 64.0, 64.0}
|
||||
return image
|
||||
}
|
||||
@@ -4,13 +4,27 @@
|
||||
#import "std/byte_text_linux"
|
||||
#program_export
|
||||
Check :: (bundle: *void, optional: bool) -> s32 {
|
||||
if !EntityAssetPresent(bundle, "assets/entity/pfp.png") { return 1 }
|
||||
if EntityAssetPresent(bundle, "assets/entity/wurm-base.png") != optional { return 2 }
|
||||
paths: [5]string = .["", "/etc/passwd", "assets/entity/../pfp.png", "assets/entity/sub/pfp.png", "assets/entity/unknown.png"]
|
||||
if !EntityAssetPresent(bundle, "assets/entity/pfp.webp") { return 1 }
|
||||
if EntityAssetPresent(bundle, "assets/entity/wurm-base.webp") != optional { return 2 }
|
||||
paths: [5]string = .["", "/etc/passwd", "assets/entity/../pfp.webp", "assets/entity/sub/pfp.webp", "assets/entity/unknown.png"]
|
||||
for path: paths {
|
||||
if EntityAssetPresent(bundle, path) { return 3 }
|
||||
}
|
||||
if EntityAssetPresent(null, "assets/entity/pfp.png") { return 4 }
|
||||
if EntityAssetPresent(null, "assets/entity/pfp.webp") { return 4 }
|
||||
// Every declared profile or optional atlas survives staging and bundling.
|
||||
for index: cast(s32)0..ENTITY_PROFILE_ASSET_COUNT - 1 {
|
||||
path := EntityProfileAssetAt(index)
|
||||
expected := index < 5 || optional
|
||||
if !EntityProfileAssetName(path) || EntityAssetPresent(bundle, path) != expected { return 7 }
|
||||
}
|
||||
// Removed PNG payloads must not linger in either staged bundle.
|
||||
old: [9]string = .["assets/entity/pfp.png", "assets/entity/flowers.png",
|
||||
"assets/entity/abstract-jade.png", "assets/entity/abstract-amber.png", "assets/entity/abstract-violet.png",
|
||||
"assets/entity/wurm-special-skins.png", "assets/entity/wurm-skins.png",
|
||||
"assets/entity/wurm-reward-skins.png", "assets/entity/wurm-base.png"]
|
||||
for path: old {
|
||||
if EntityProfileAssetName(path) || EntityAssetPresent(bundle, path) { return 8 }
|
||||
}
|
||||
// Every published game portrait must use the same extraction/access policy.
|
||||
for index: 0..7 {
|
||||
output: Vec(u8)
|
||||
|
||||
@@ -84,7 +84,7 @@ inputs = ["tools/artifacts.zi", "Makefile", "ziran.toml", "ziran.lock"]
|
||||
outputs = ["libmonocypher.a", "liboqs.a", "libziran.a", "libplatform.a", "link.txt"]
|
||||
|
||||
[artifacts.native-profile]
|
||||
inputs = ["tools/artifacts.zi", "Makefile", "ziran.toml", "ziran.lock", "assets/entity/abstract-amber.png", "assets/entity/abstract-jade.png", "assets/entity/abstract-violet.png", "assets/entity/flowers.png", "assets/entity/pfp.png", "assets/entity/shovey-0.png", "assets/entity/shovey-1.png", "assets/entity/shovey-2.png", "assets/entity/shovey-3.png", "assets/entity/shovey-4.png", "assets/entity/shovey-5.png", "assets/entity/shovey-6.png", "assets/entity/shovey-7.png", "assets/entity/wurm-base.png", "assets/entity/wurm-reward-skins.png", "assets/entity/wurm-skins.png", "assets/entity/wurm-special-skins.png", "src/account_handoff.zi", "src/account_store.zi", "src/asset_presence.zi", "src/achievement_toast.zi", "src/achievement_view.zi", "src/alias_model.zi", "src/alias_view.zi", "src/browser_host.zi", "src/collection_client.zi", "src/desktop.zi", "src/dew_model.zi", "src/dew_native.zi", "src/dew_packs.zi", "src/dew_play.zi", "src/dew_play_pricing.zi", "src/dew_view.zi", "src/entity.zi", "src/entity_dew.zi", "src/entity_records.zi", "src/friends_model.zi", "src/friends_native.zi", "src/friends_page.zi", "src/game_completion.zi", "src/game_daily.zi", "src/game_progress.zi", "src/game_progress_client.zi", "src/game_progress_id.zi", "src/game_progress_laws.zi", "src/game_progress_rules.zi", "src/game_shop.zi", "src/game_shop_native.zi", "src/leaderboard_model.zi", "src/leaderboard_native.zi", "src/leaderboard_view.zi", "src/level_collections.zi", "src/management.zi", "src/model.zi", "src/native_files.zi", "src/native_host.zi", "src/native_management.zi", "src/node_url.zi", "src/pairing.zi", "src/pairing_client.zi", "src/picture_image.zi", "src/picture_publish.zi", "src/profile_appearance.zi", "src/profile_theme.zi", "src/profile_web.zi", "src/publications.zi", "src/publications_read.zi", "src/recovery.zi", "src/drive_backup.zi", "src/reward_migration.zi", "src/telegram_connection.zi", "src/telegram_view.zi"]
|
||||
inputs = ["tools/artifacts.zi", "Makefile", "ziran.toml", "ziran.lock", "assets/entity/abstract-amber.webp", "assets/entity/abstract-jade.webp", "assets/entity/abstract-violet.webp", "assets/entity/flowers.webp", "assets/entity/pfp.webp", "assets/entity/shovey-0.png", "assets/entity/shovey-1.png", "assets/entity/shovey-2.png", "assets/entity/shovey-3.png", "assets/entity/shovey-4.png", "assets/entity/shovey-5.png", "assets/entity/shovey-6.png", "assets/entity/shovey-7.png", "assets/entity/wurm-base.webp", "assets/entity/wurm-reward-skins.webp", "assets/entity/wurm-skins.webp", "assets/entity/wurm-special-skins.webp", "src/account_handoff.zi", "src/account_store.zi", "src/asset_presence.zi", "src/achievement_toast.zi", "src/achievement_view.zi", "src/alias_model.zi", "src/alias_view.zi", "src/browser_host.zi", "src/collection_client.zi", "src/desktop.zi", "src/dew_model.zi", "src/dew_native.zi", "src/dew_packs.zi", "src/dew_play.zi", "src/dew_play_pricing.zi", "src/dew_view.zi", "src/entity.zi", "src/entity_dew.zi", "src/entity_records.zi", "src/friends_model.zi", "src/friends_native.zi", "src/friends_page.zi", "src/game_completion.zi", "src/game_daily.zi", "src/game_progress.zi", "src/game_progress_client.zi", "src/game_progress_id.zi", "src/game_progress_laws.zi", "src/game_progress_rules.zi", "src/game_shop.zi", "src/game_shop_native.zi", "src/leaderboard_model.zi", "src/leaderboard_native.zi", "src/leaderboard_view.zi", "src/level_collections.zi", "src/management.zi", "src/model.zi", "src/native_files.zi", "src/native_host.zi", "src/native_management.zi", "src/node_url.zi", "src/pairing.zi", "src/pairing_client.zi", "src/picture_image.zi", "src/picture_publish.zi", "src/profile_appearance.zi", "src/profile_theme.zi", "src/profile_web.zi", "src/publications.zi", "src/publications_read.zi", "src/recovery.zi", "src/drive_backup.zi", "src/reward_migration.zi", "src/telegram_connection.zi", "src/telegram_view.zi"]
|
||||
outputs = ["libentity.a", "headers.tar", "entity.zx", "link.txt", "font.ttf", "ziran_web.js"]
|
||||
requires = ["self:native-crypto"]
|
||||
|
||||
|
||||