comparison src/zamikongine/thing.nim @ 32:9edca5dc4e93

add: working implementation of uniforms
author Sam <sam@basx.dev>
date Sat, 14 Jan 2023 23:34:50 +0700
parents b1b05d4efb52
children 94c38e4b5782
comparison
equal deleted inserted replaced
31:0996104ad066 32:9edca5dc4e93
8 Thing* = object of RootObj 8 Thing* = object of RootObj
9 parent*: ref Thing 9 parent*: ref Thing
10 children*: seq[ref Thing] 10 children*: seq[ref Thing]
11 parts*: seq[ref Part] 11 parts*: seq[ref Part]
12 12
13 method update*(thing: ref Thing, dt: Duration) {.base.} = discard 13 method update*(thing: ref Thing, dt: float32) {.base.} = discard
14 14
15 iterator partsOfType*[T: ref Part](root: ref Thing): T = 15 iterator partsOfType*[T: ref Part](root: ref Thing): T =
16 var queue = @[root] 16 var queue = @[root]
17 while queue.len > 0: 17 while queue.len > 0:
18 let thing = queue.pop 18 let thing = queue.pop