Skip to content

Commit

Permalink
rename const stateSchema => STATE_SCHEMA
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Oct 31, 2023
1 parent 783544e commit ad0d944
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/Vector2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,15 +776,15 @@ Vector2.ZERO = assert ? new ImmutableVector2( 0, 0 ) : new Vector2( 0, 0 );
Vector2.X_UNIT = assert ? new ImmutableVector2( 1, 0 ) : new Vector2( 1, 0 );
Vector2.Y_UNIT = assert ? new ImmutableVector2( 0, 1 ) : new Vector2( 0, 1 );

const stateSchema = {
const STATE_SCHEMA = {
x: NumberIO,
y: NumberIO
};
export type Vector2StateObject = StateObject<typeof stateSchema>;
export type Vector2StateObject = StateObject<typeof STATE_SCHEMA>;

Vector2.Vector2IO = new IOType<Vector2, Vector2StateObject>( 'Vector2IO', {
valueType: Vector2,
stateSchema: stateSchema,
stateSchema: STATE_SCHEMA,
toStateObject: ( vector2: Vector2 ) => vector2.toStateObject(),
fromStateObject: ( stateObject: Vector2StateObject ) => Vector2.fromStateObject( stateObject ),
documentation: 'A numerical object with x and y properties, like {x:3,y:4}'
Expand Down

0 comments on commit ad0d944

Please sign in to comment.