diff examples/E02_squares.nim @ 763:a4c757f5d17f

did: change API for ECS
author Sam <sam@basx.dev>
date Tue, 27 Jun 2023 00:17:40 +0700
parents 5cd6808150fc
children 754835bf175e
line wrap: on
line diff
--- a/examples/E02_squares.nim	Tue Jun 27 00:01:36 2023 +0700
+++ b/examples/E02_squares.nim	Tue Jun 27 00:17:40 2023 +0700
@@ -81,7 +81,7 @@
   var myengine = initEngine("Squares")
   myengine.setRenderer(myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode))
 
-  var scene = newScene("scene", newEntity("scene", newEntity("squares", squaremesh)))
+  var scene = newScene("scene", newEntity("scene", [], newEntity("squares", {"mesh": Component(squaremesh)})))
   myengine.addScene(scene, vertexInput, @[], transformAttribute="")
   scene.addShaderGlobal("time", 0.0'f32)
   while myengine.updateInputs() == Running and not myengine.keyWasPressed(Escape):