Change a few calls due to renamings in the module

master
Marc Gilleron 2019-04-28 17:59:54 +01:00
parent 274f93b006
commit d732f9b59f
3 changed files with 5 additions and 5 deletions

View File

@ -87,7 +87,7 @@ func print_map_slice():
var y = ry + int(minp.y)
var z = rz + int(minp.z)
var v = storage.get_voxel_f(x, y, z, channel)
buffer.set_voxel_iso(v, rx, ry, rz, channel)
buffer.set_voxel_f(v, rx, ry, rz, channel)
print("Going to print")
print_buffer_to_images(buffer, channel, "isolevel", 10)
@ -104,7 +104,7 @@ static func print_buffer_to_images(voxels, channel, fname, upscale):
for z in voxels.get_size_z():
for x in voxels.get_size_x():
var r = 0.5 * voxels.get_voxel_iso(x, y, z, channel) + 0.5
var r = 0.5 * voxels.get_voxel_f(x, y, z, channel) + 0.5
if r < 0.5:
im.set_pixel(x, z, Color(r, r, r*0.5 + 0.5))
else:

View File

@ -73,7 +73,7 @@ func generate_with_stats():
func generate():
_voxels.fill_iso(1.0, VoxelBuffer.CHANNEL_ISOLEVEL)
_voxels.fill_f(1.0, VoxelBuffer.CHANNEL_ISOLEVEL)
var vt = VoxelIsoSurfaceTool.new()
vt.set_iso_scale(_iso_scale)
@ -216,7 +216,7 @@ static func print_buffer_to_images(voxels, channel, fname, upscale):
for z in voxels.get_size_z():
for x in voxels.get_size_x():
var r = 0.5 * voxels.get_voxel_iso(x, y, z, channel) + 0.5
var r = 0.5 * voxels.get_voxel_f(x, y, z, channel) + 0.5
if r < 0.5:
im.set_pixel(x, z, Color(r, r, r*0.5 + 0.5))
else:

View File

@ -71,7 +71,7 @@ func generate():
for y in range(0, voxels.get_size_y()):
var v = fractal_noise.get_noise_3d(x,y,z)
if true:
voxels.set_voxel_iso(v, x,y,z, 0)
voxels.set_voxel_f(v, x,y,z, 0)
else:
if v > 0:
v = 0