comparison tests/test_collision.nim @ 331:05fb85ba97dd

did: undid using meshes as values, ref is much better, fix a few things, fix a few huge performance issues
author Sam <sam@basx.dev>
date Sun, 03 Sep 2023 17:34:29 +0700
parents 69e18f69713b
children b83b3a1ccb05
comparison
equal deleted inserted replaced
330:04531bec3583 331:05fb85ba97dd
3 import semicongine 3 import semicongine
4 4
5 proc main() = 5 proc main() =
6 var scene = Scene(name: "main") 6 var scene = Scene(name: "main")
7 7
8 scene.meshes.add rect(color="f00f") 8 scene.add rect(color="f00f")
9 scene.meshes.add rect() 9 scene.add rect()
10 scene.meshes.add circle(color="0f0f") 10 scene.add circle(color="0f0f")
11 scene.meshes[1].transform = scale(0.8, 0.8) 11 scene.meshes[1].transform = scale(0.8, 0.8)
12 scene.meshes[2].transform = scale(0.1, 0.1) 12 scene.meshes[2].transform = scale(0.1, 0.1)
13 scene.addShaderGlobal("perspective", Unit4F32) 13 scene.addShaderGlobal("perspective", Unit4F32)
14 14
15 const 15 const