#OpenSimplex2 noise translation

1 messages · Page 1 of 1 (latest)

devout stream
#

Some noise with smooth version:

devout stream
#

OpenSimplex2 noise translation

mellow crypt
#

for about a month ive just been importing the C open simplex. Id love to use something in zig itself. how can i use this in a project? (ive only used C libraries)

devout stream
#

@mellow crypt Just add these into the build.zig file: const noise = b.addModule( "Noise", .{ .root_source_file = b.path("libs/ZigOpenSimplex2/src/main.zig"), }, );

#

exe.root_module.addImport("noise", noise);

#

Could be wrong I'm typing with my phone currently

devout stream
#

As for using the library itself it's super easy ``` const noise2 = try noise.fast.Noise2.init(34434, allocator);
//or const noise2 = try noise.smooth.Noise2.init(34434, allocator);
defer noise2.deInit();
const value = noise2.standard(34.0, 34.0);

simple summit
#

wow, nice