starts plate movement and frame improvements
This commit is contained in:
parent
a783afbc7e
commit
6c5cae958b
4 changed files with 182 additions and 68 deletions
Client
|
@ -118,28 +118,28 @@ class Client:
|
|||
r, g, b = colors[int(self.world_provider.world.plates[x_pos, y_pos])]
|
||||
self.world_provider.world.set_color(x_pos, y_pos, z_pos, r, g, b)
|
||||
|
||||
total_x = self.world_provider.world.chunk_n_x * self.world_provider.world.chunk_size_x
|
||||
total_y = self.world_provider.world.chunk_n_y * self.world_provider.world.chunk_size_y
|
||||
for x_pos in range(0, 100):
|
||||
for y_pos in range(0, 100):
|
||||
if self.world_provider.world.faults[x_pos, y_pos] == -2:
|
||||
self.world_provider.world.set_color(x_pos, y_pos, 0, 0, 0, 0)
|
||||
|
||||
for line_index, line in enumerate(self.world_provider.world.fault_lines):
|
||||
for x_pos in range(0, 100):
|
||||
for y_pos in range(0, 100):
|
||||
if self.world_provider.world.faults[x_pos, y_pos] == line_index:
|
||||
if line_index != 9:
|
||||
self.world_provider.world.set_color(x_pos, y_pos, 0, 0, 0, 1)
|
||||
else:
|
||||
self.world_provider.world.set_color(x_pos, y_pos, 0, 1, 1, 1)
|
||||
|
||||
for x_pos in range(0, 100):
|
||||
for y_pos in range(0, 100):
|
||||
for z_pos in range(0, 1):
|
||||
if [x_pos, y_pos] in self.world_provider.world.fault_nodes:
|
||||
r, g, b = 1, 0, 0
|
||||
self.world_provider.world.set_color(x_pos, y_pos, z_pos, r, g, b)
|
||||
# total_x = self.world_provider.world.chunk_n_x * self.world_provider.world.chunk_size_x
|
||||
# total_y = self.world_provider.world.chunk_n_y * self.world_provider.world.chunk_size_y
|
||||
# for x_pos in range(0, 100):
|
||||
# for y_pos in range(0, 100):
|
||||
# if self.world_provider.world.faults[x_pos, y_pos] == -2:
|
||||
# self.world_provider.world.set_color(x_pos, y_pos, 0, 0, 0, 0)
|
||||
#
|
||||
# for line_index, line in enumerate(self.world_provider.world.fault_lines):
|
||||
# for x_pos in range(0, 100):
|
||||
# for y_pos in range(0, 100):
|
||||
# if self.world_provider.world.faults[x_pos, y_pos] == line_index:
|
||||
# if line_index != 9:
|
||||
# self.world_provider.world.set_color(x_pos, y_pos, 0, 0, 0, 1)
|
||||
# else:
|
||||
# self.world_provider.world.set_color(x_pos, y_pos, 0, 1, 1, 1)
|
||||
#
|
||||
# for x_pos in range(0, 100):
|
||||
# for y_pos in range(0, 100):
|
||||
# for z_pos in range(0, 1):
|
||||
# if [x_pos, y_pos] in self.world_provider.world.fault_nodes:
|
||||
# r, g, b = 1, 0, 0
|
||||
# self.world_provider.world.set_color(x_pos, y_pos, z_pos, r, g, b)
|
||||
|
||||
# # visualize direction lengths
|
||||
# lengths = np.sqrt(np.sum(np.square(self.world_provider.world.directions), axis=2))
|
||||
|
@ -295,7 +295,7 @@ class Client:
|
|||
# int(round(self.test_pixel[1])),
|
||||
# int(round(self.test_pixel[2])), 1.0, 1.0, 1.0)
|
||||
|
||||
# print(1.0 / (time.time() - self.time))
|
||||
print(1.0 / (time.time() - self.time))
|
||||
self.time = time.time()
|
||||
glutPostRedisplay()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue