| 242 | implements HasDynoOut<"uvec2"> |
| 243 | { |
| 244 | constructor({ value }: { value: DynoVal<T> }) { |
| 245 | super({ |
| 246 | inTypes: { value: valType(value) }, |
| 247 | outTypes: { hash: "uvec2" }, |
| 248 | inputs: { value }, |
| 249 | construct: ({ value }) => { |
| 250 | if (!value) { |
| 251 | throw new Error("value is required"); |
| 252 | } |
| 253 | let state = new PcgMix({ value: value }).outputs.state; |
| 254 | state = new PcgNext({ state }).outputs.state; |
| 255 | const x = new PcgHash({ state }).outputs.hash; |
| 256 | state = new PcgNext({ state }).outputs.state; |
| 257 | const y = new PcgHash({ state }).outputs.hash; |
| 258 | return { hash: combine({ vectorType: "uvec2", x, y }) }; |
| 259 | }, |
| 260 | }); |
| 261 | } |
| 262 | dynoOut(): DynoValue<"uvec2"> { |
| 263 | return new DynoOutput(this, "hash"); |
| 264 | } |