Skip to content

Commit

Permalink
fix flat-button size; tag 0.0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Apr 15, 2024
1 parent 49bf339 commit a128e94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@triadica/lagopus",
"version": "0.0.22",
"version": "0.0.23",
"type": "module",
"module": "./lib/index.mjs",
"scripts": {
Expand Down
7 changes: 5 additions & 2 deletions shaders/flat-button.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ struct UBO {
};

struct Params {
flat_mark: f32,
size: f32,
p1: f32,
p2: f32,
p3: f32
}

@group(0) @binding(0) var<uniform> uniforms: UBO;
Expand Down Expand Up @@ -69,7 +72,7 @@ fn vertex_main(
) -> VertexOut {
var output: VertexOut;
var point_position = position.xyz;
let radius: f32 = 8.;
let radius: f32 = 1. * params.size;
let right = uniforms.rightward;
let up = uniforms.upward;
var offset = 1.;
Expand Down
1 change: 1 addition & 0 deletions src/comp/button.mts
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,6 @@ export let compFlatButton = (
position: [...position, i],
color,
})),
getParams: () => [props.size, 0, 0, 0],
});
};

0 comments on commit a128e94

Please sign in to comment.