Skip to content

Define structures in hexadecimal blocks #390

@MatiDragon-YT

Description

@MatiDragon-YT

It's not absolutely necessary, but it improves the readability of scripts.

The idea is to implement valid keywords in hexadecimal blocks that are converted to valid values for the script during compilation.

Of syntax is simple!

Structure(quantity)

Optional parameter, specifies the number of times the representation should be placed.

Structure Hex string
Int() 00 00 00 00
Float() 00 00 00 00
RGBA() 00 00 00 00
Vec2() 00 00 00 00 00 00 00 00
Vec3() 00 00 00 00 00 00 00 00 00 00 00 00
Quat() 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Examples

hex
    Int()              //  00 00 00 00
    Int(1)             //  00 00 00 00
    Int(2)             //  00 00 00 00 00 00 00 00
    Int(3)             //  00 00 00 00 00 00 00 00 00 00 00 00
    Int(2) Int(2)      //  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
end

A more practical example..
An advanced particle buffer

hex
//   particle_id  initial_xyz   final_xyz
     Int(10)       Vec3(10)     Vec3(10)

     Float()     //   progress (0.0 .. 1.0)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionFurther discussion is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions