Skip to content

Commit

Permalink
Add bezier curve demo link to html
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed May 12, 2024
1 parent 9a964ff commit 9eea074
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
10 changes: 5 additions & 5 deletions example/bezier_curve.odin
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ frame_bezier_curve :: proc(s: ^State_Bezier_Curve, delta: f32) {
ctx.fillStyle(to_rgba(WHITE.rgb, 100))
ctx.fillText(fmt.tprintf("mouse_down: %t", mouse_down), 30, 50 + line_height*0)
ctx.fillText(fmt.tprintf("dragging: %i", s.draggig), 30, 50 + line_height*1)
ctx.fillText(fmt.tprintf("mouse_pos: x=%+.2f, y=%+.2f", to_px(mouse_rel).x, to_px(mouse_rel).y), 30, 50 + line_height*2)
ctx.fillText(fmt.tprintf("p1: x=%+.2f, y=%+.2f", p1.x , p1.y ), 30, 50 + line_height*3)
ctx.fillText(fmt.tprintf("p2: x=%+.2f, y=%+.2f", p2.x , p2.y ), 30, 50 + line_height*4)
ctx.fillText(fmt.tprintf("p3: x=%+.2f, y=%+.2f", p3.x , p3.y ), 30, 50 + line_height*5)
ctx.fillText(fmt.tprintf("p4: x=%+.2f, y=%+.2f", p4.x , p4.y ), 30, 50 + line_height*6)
ctx.fillText(fmt.tprintf("mouse_pos: %+.2f, %+.2f", to_px(mouse_rel).x, to_px(mouse_rel).y), 30, 50 + line_height*2)
ctx.fillText(fmt.tprintf("p1: %+.2f, %+.2f", p1.x , p1.y ), 30, 50 + line_height*3)
ctx.fillText(fmt.tprintf("p2: %+.2f, %+.2f", p2.x , p2.y ), 30, 50 + line_height*4)
ctx.fillText(fmt.tprintf("p3: %+.2f, %+.2f", p3.x , p3.y ), 30, 50 + line_height*5)
ctx.fillText(fmt.tprintf("p4: %+.2f, %+.2f", p4.x , p4.y ), 30, 50 + line_height*6)
ctx.fillText(fmt.tprintf("a12: %f", a12), 30, 50 + line_height*7)
ctx.fillText(fmt.tprintf("a34: %f", a34), 30, 50 + line_height*8)
}
Expand Down
19 changes: 10 additions & 9 deletions example/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@
<nav class="examples">
<h4 style="margin-bottom: 0.5rem;">Demos</h4>
<ol>
<li><a href="#rectangle"> Rectangle </a></li>
<li><a href="#pyramid"> Pyramid </a></li>
<li><a href="#boxes"> Boxes </a></li>
<li><a href="#camera"> Camera </a></li>
<li><a href="#lighting"> Lighting </a></li>
<li><a href="#specular"> Specular </a></li>
<li><a href="#spotlight"> Spotlight </a></li>
<li><a href="#candy"> Candy </a></li>
<li><a href="#sol-system">Sol System</a></li>
<li><a href="#rectangle"> Rectangle </a></li>
<li><a href="#pyramid"> Pyramid </a></li>
<li><a href="#boxes"> Boxes </a></li>
<li><a href="#camera"> Camera </a></li>
<li><a href="#lighting"> Lighting </a></li>
<li><a href="#specular"> Specular </a></li>
<li><a href="#spotlight"> Spotlight </a></li>
<li><a href="#candy"> Candy </a></li>
<li><a href="#sol-system"> Sol System </a></li>
<li><a href="#bezier-curve">Bezier Curve</a></li>
</ol>
</nav>

Expand Down

0 comments on commit 9eea074

Please sign in to comment.