Skip to content

Commit

Permalink
Merge pull request #15 from k-ye/fmt
Browse files Browse the repository at this point in the history
Re-run yapf on the codebase
  • Loading branch information
k-ye authored May 8, 2021
2 parents 07a2e1a + 9a6918b commit e3f5acd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/persubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
strategy:
matrix:
taichi:
- 0.6.32
- 0.6.33
- 0.7.18
python:
- 3.6
- 3.7
Expand Down
1 change: 1 addition & 0 deletions examples/mass_spring.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import numpy as np
import math

ti.init(ti.gpu)

### Parameters
Expand Down
1 change: 1 addition & 0 deletions examples/sdf_rt1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from taichi_glsl import *

ti.init(ti.opengl)

fov = math.tan(math.radians(26))
Expand Down
1 change: 1 addition & 0 deletions examples/sdf_rt2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from taichi_glsl import *

ti.init(ti.opengl)

fov = math.tan(math.radians(26))
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
project_name = 'taichi_glsl'
from taichi_glsl.version import version, taichi_version

version = '.'.join(map(str, version))
taichi_version = '.'.join(map(str, taichi_version))
description = 'A Taichi extension library providing a set of GLSL-alike helper functions'
Expand Down
9 changes: 5 additions & 4 deletions taichi_glsl/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,11 @@ def _show_mpl_animation(self):
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

fig = plt.figure(figsize=(4, 4))
fim = plt.figimage(np.zeros((*self.resolution, 3), dtype=np.float32) + 0.5)

fim = plt.figimage(
np.zeros((*self.resolution, 3), dtype=np.float32) + 0.5)

def update(frame):
img = self._per_loop(do_get_img=True)[:, :, :3]
fim.set_array(img)
Expand Down Expand Up @@ -542,4 +543,4 @@ def _per_loop(self, do_get_img=False):
if do_get_img:
return img
else:
return None
return None

0 comments on commit e3f5acd

Please sign in to comment.