diff examples/E01_hello_triangle.nim @ 664:c33c8e156e3e

did: update examples to use new API for scene + scene globals
author Sam <sam@basx.dev>
date Mon, 08 May 2023 21:21:49 +0700
parents 3f13de7d8ec4
children d84b2e88776a
line wrap: on
line diff
--- a/examples/E01_hello_triangle.nim	Mon May 08 00:48:11 2023 +0700
+++ b/examples/E01_hello_triangle.nim	Mon May 08 21:21:49 2023 +0700
@@ -25,13 +25,13 @@
   )
 
 var
-  triangle = newEntity(
+  triangle = newScene("scene", newEntity(
     "triangle",
     newMesh(
       [newVec3f(-0.5, 0.5), newVec3f(0, -0.5), newVec3f(0.5, 0.5)],
       [X, Y, Z],
     )
-  )
+  ))
   myengine = initEngine("Hello triangle")
   renderPass = myengine.gpuDevice.simpleForwardRenderPass(vertexCode, fragmentCode)