-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cli Mode to add comments #3
Comments
I'm visualizing something along these lines.
/** @fass v0.1.0
* Generated AssemblyScript code from Vec3.fass
*
* quad = u8
* x = f32
* y = f32
* z = f32
* Binary format = [quad, x, y, z]
**/
export class Vec3 {
quad!: Quadrant;
x!: f32;
y!: f32;
z!: f32;
public __FASS_SIZE: u32 = 13;
@inline __FASS_SERIALIZE(output: ArrayBuffer, input: Vec3): void {
// Perhaps add comments here?
store<u8>(changetype<usize>(output), input.quad, 0);
store<f32>(changetype<usize>(output), input.x, 1);
store<f32>(changetype<usize>(output), input.y, 5);
store<f32>(changetype<usize>(output), input.z, 9);
}
@inline __FASS_DESERIALIZE(input: ArrayBuffer, output: Vec3): void {
output.quad = load<u8>(changetype<usize>(input), 0);
output.x = load<f32>(changetype<usize>(input), 1);
output.y = load<f32>(changetype<usize>(input), 5);
output.z = load<f32>(changetype<usize>(input), 9);
}
}
export enum Quadrant {
TL = 1,
TR = 2,
BL = 3,
BR = 4
} |
Pretty much maybe you support like an ```
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add a simple
cli
mode to add comments, this should not be that hard given it would just be some template literals likedecode x
and such and in langs likegrain
orassemblyscript
for instance these get optimized away so size isnt really a worry.The text was updated successfully, but these errors were encountered: