| 298 | implements HasDynoOut<"uvec4"> |
| 299 | { |
| 300 | constructor({ value }: { value: DynoVal<T> }) { |
| 301 | super({ |
| 302 | inTypes: { value: valType(value) }, |
| 303 | outTypes: { hash: "uvec4" }, |
| 304 | inputs: { value }, |
| 305 | construct: ({ value }) => { |
| 306 | if (!value) { |
| 307 | throw new Error("value is required"); |
| 308 | } |
| 309 | let state = new PcgMix({ value: value }).outputs.state; |
| 310 | state = new PcgNext({ state }).outputs.state; |
| 311 | const x = new PcgHash({ state }).outputs.hash; |
| 312 | state = new PcgNext({ state }).outputs.state; |
| 313 | const y = new PcgHash({ state }).outputs.hash; |
| 314 | state = new PcgNext({ state }).outputs.state; |
| 315 | const z = new PcgHash({ state }).outputs.hash; |
| 316 | state = new PcgNext({ state }).outputs.state; |
| 317 | const w = new PcgHash({ state }).outputs.hash; |
| 318 | return { hash: combine({ vectorType: "uvec4", x, y, z, w }) }; |
| 319 | }, |
| 320 | }); |
| 321 | } |
| 322 | dynoOut(): DynoValue<"uvec4"> { |
| 323 | return new DynoOutput(this, "hash"); |
| 324 | } |