Added bscript thing

This commit is contained in:
2026-05-29 10:42:00 -07:00
parent 1fd42610a4
commit 147e704be1
26 changed files with 49 additions and 49 deletions

View File

@@ -2,7 +2,7 @@
## Introduction
The `bootanim` utility is responsible for generating the boot animation. It is used even if the bootloader configuration specify to not play the boot animation, as it contain the Vystem logo blueprint.
The `bootanim` utility is responsible for generating the boot animation. It is used even if the bootloader configuration specify to not play the boot animation, as it contain the Vystem B logo blueprint.
## Detailled informations
@@ -42,12 +42,12 @@ bootanim logo.png folder 2160 1440
The first thing to know about Blastproof boot animation is that, due to poor FAT32 read performance, we decided to find a compromise between the amount of data being stored into the generated file and the amount of data computed at each boot. In order to maintain a fluid, 60 fps animation at each boot on most hardware, we landed on this compromise:
- We only store 16 frames per second, under the form of points coordinates
- The 48 others frames per second are computed using linear interpolation at each boot
This result in the `bootanim.bin` file being only 14 megabytes in size, instead of 56 megabytes, for the actual Vystem logo and a resolution of 1920x1080.
This result in the `bootanim.bin` file being only 14 megabytes in size, instead of 56 megabytes, for the actual Vystem B logo and a resolution of 1920x1080.
The detailled generation procedure is as follow:
1) Locate and open the logo file in monochrom mode (with only one color channel, conversion is made by stb_image). The utility will reject any non-square logo.
2) Center the logo on a black canva the size provided by `width` and `height` arguments.
3) Scan the canva to detect all points that have their value over 127. Save these points with their coordinates. In the Vystem logo, there is over 45k points.
3) Scan the canva to detect all points that have their value over 127. Save these points with their coordinates. In the Vystem B logo, there is over 45k points.
4) For each of these points, generate a random position in the canva, the seed doesn't have any cryptographic implication and is randomised for every new build.
5) Apply two quadratic bezier curves: one for the "explosion" (all points starting from the exact center of the screen and being scattered around the screen to their random position) and one for the logo appearence (each point is assigned a random coordinates in the logo points and will be attrected to this position from their random position).
6) Generate the selected output media and write it into the files.