Skip to content

Commit 9a5af73

Browse files
committed
idk man
1 parent d6c863b commit 9a5af73

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

Res/Game.wasm

1.53 KB
Binary file not shown.

Source/Main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func Runtime() {
2121
PRESSED = PollKeyboard()
2222
}
2323
}()
24+
go func() {
2425
for {
2526
if PRESSED == "w" {
2627
if FORWARD_VELOCITY < SPEEDCAP {
@@ -32,7 +33,7 @@ func Runtime() {
3233
}
3334
}
3435
}
35-
36+
}()
3637
go func() {
3738
for {
3839
if FORWARD_VELOCITY > 0 {

Source/Renderer.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ var WINDOW js.Value = GetGlobal("window")
77
var DOCUMENT js.Value = GetGlobal("document")
88
var THREE js.Value = GetGlobal("THREE")
99
var SCENE js.Value = THREE.Get("Scene").New()
10-
var RENDERER js.Value = THREE.Get("WebGLRenderer").New()
1110
var HEIGHT int = WINDOW.Get("innerHeight").Int()
1211
var WIDTH int = WINDOW.Get("innerWidth").Int()
1312
var CAMERA js.Value = THREE.Get("PerspectiveCamera").New(75, WIDTH / HEIGHT, 0.1, 1000)
1413

1514
func InitRenderer() {
16-
RENDERER.Call("setSize", WIDTH, HEIGHT)
17-
DOCUMENT.Get("body").Call("appendChild", RENDERER.Get("domElement"))
15+
1816
}
1917

0 commit comments

Comments
 (0)