Skip to content

Commit 72edf14

Browse files
committed
cleanup
1 parent fe8512f commit 72edf14

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

docs/examples/components/pathfinding_component.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ func NewPathfindingComponent() *core.HTMLComponent {
3939
{0, 1, 0, 0, 0},
4040
{0, 1, 0, 1, 0},
4141
}
42-
start := m.Vec2{0, 0}
43-
goal := m.Vec2{4, 4}
42+
start := m.Vec2{X: 0, Y: 0}
43+
goal := m.Vec2{X: 4, Y: 4}
4444

4545
ctx := context.Background()
4646
id, ch := pf.RequestGridPath(ctx, grid, start, goal)

docs/examples/components/runtime_error_component.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ func NewRuntimeErrorComponent() *core.HTMLComponent {
2727
panicFn = js.FuncOf(func(this js.Value, args []js.Value) any {
2828
panicFn.Release()
2929
panic("example panic")
30-
return nil
3130
})
3231
js.Window().Call("setTimeout", panicFn, 100)
3332
})

docs/examples/components/twitch_login_component.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"net/url"
99

10-
rfwenv "github.com/rfwlab/rfw/docs/rfwenv"
10+
"github.com/rfwlab/rfw/docs/rfwenv"
1111
core "github.com/rfwlab/rfw/v1/core"
1212
)
1313

docs/examples/components/webgl_component.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func drawSquare(n *scene.Node, color [4]float32) {
277277
x := -1 + cellSize*float32(n.Transform.X) + cellSize/2
278278
y := -1 + cellSize*float32(n.Transform.Y) + cellSize/2
279279

280-
model := m.Translation(m.Vec3{x, y, 0}).Mul(m.Scale(m.Vec3{cellSize * 1.4, cellSize * 1.4, 1}))
280+
model := m.Translation(m.Vec3{X: x, Y: y, Z: 0}).Mul(m.Scale(m.Vec3{X: cellSize * 1.4, Y: cellSize * 1.4, Z: 1}))
281281
mvp := proj.Mul(model)
282282
arr := js.Float32Array().New(len(mvp))
283283
for i, v := range mvp {
@@ -287,7 +287,7 @@ func drawSquare(n *scene.Node, color [4]float32) {
287287
ctx.Uniform4f(colorLoc, color[0], color[1], color[2], color[3]*0.3)
288288
ctx.DrawElements(webgl.TRIANGLES, 6, webgl.UNSIGNED_SHORT, 0)
289289

290-
model = m.Translation(m.Vec3{x, y, 0}).Mul(m.Scale(m.Vec3{cellSize, cellSize, 1}))
290+
model = m.Translation(m.Vec3{X: x, Y: y, Z: 0}).Mul(m.Scale(m.Vec3{X: cellSize, Y: cellSize, Z: 1}))
291291
mvp = proj.Mul(model)
292292
arr = js.Float32Array().New(len(mvp))
293293
for i, v := range mvp {

0 commit comments

Comments
 (0)