test8.nim 372 B

12345678910111213141516171819202122
  1. # --- Test 8. Use TextureRect node. --- #
  2. import nodesnim
  3. Window("hello world")
  4. var
  5. mainobj: SceneObj
  6. main = Scene("Main", mainobj)
  7. texturerectobj: TextureRectObj
  8. texturerect = TextureRect(texturerectobj)
  9. main.addChild(texturerect)
  10. texturerect.loadTexture("assets/sharp.jpg")
  11. texturerect.resize(640, 360)
  12. addScene(main)
  13. setMainScene("Main")
  14. windowLaunch()