-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve serialization format of
EffectAsset
(#294)
This change makes a few improvements to the serialized representation of an `EffectAsset`: - `LiteralExpr`, `ExprHandle`, and `Module` are now `#[serde(transparent)]`, which makes them less verbose. - `VectorValue` is serialized as its glam math type representation, making it a lot more readable in text format (_e.g._ RON). Before: ``` module: ( expressions: [ Literal(( value: Vector(( vector_type: ( elem_type: Float, count: 3, ), storage: (1067030938, 3227307213, 1118770935, 0), )), )), Literal(( value: Vector(( vector_type: ( elem_type: Bool, count: 2, ), storage: (0, 4294967295, 0, 0), )), )), Binary( op: Add, left: ( index: 2, ), right: ( index: 1, ), ), ], ), ``` After: ``` module: [ Literal(Vector(Vec3((1.2, -3.45, 87.54485)))), Literal(Vector(BVec2((false, true)))), Binary( op: Add, left: 2, right: 1, ), ] ```
- Loading branch information
Showing
4 changed files
with
175 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters