| 269 | implements HasDynoOut<"uvec3"> |
| 270 | { |
| 271 | constructor({ value }: { value: DynoVal<T> }) { |
| 272 | super({ |
| 273 | inTypes: { value: valType(value) }, |
| 274 | outTypes: { hash: "uvec3" }, |
| 275 | inputs: { value }, |
| 276 | construct: ({ value }) => { |
| 277 | if (!value) { |
| 278 | throw new Error("value is required"); |
| 279 | } |
| 280 | let state = new PcgMix({ value: value }).outputs.state; |
| 281 | state = new PcgNext({ state }).outputs.state; |
| 282 | const x = new PcgHash({ state }).outputs.hash; |
| 283 | state = new PcgNext({ state }).outputs.state; |
| 284 | const y = new PcgHash({ state }).outputs.hash; |
| 285 | state = new PcgNext({ state }).outputs.state; |
| 286 | const z = new PcgHash({ state }).outputs.hash; |
| 287 | return { hash: combine({ vectorType: "uvec3", x, y, z }) }; |
| 288 | }, |
| 289 | }); |
| 290 | } |
| 291 | dynoOut(): DynoValue<"uvec3"> { |
| 292 | return new DynoOutput(this, "hash"); |
| 293 | } |