Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into feature/view-setting-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacZhangzhuo authored Dec 15, 2023
2 parents 715eaeb + 2df4611 commit 9a1d911
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added


* Added `view_port` and `camera` in the config
* Added the update method for the `textobject`.


### Changed

Expand Down
9 changes: 7 additions & 2 deletions src/compas_view2/objects/textobject.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import os
import numpy as np

import freetype as ft
import numpy as np
from matplotlib import font_manager
from OpenGL import GL

from compas_view2.gl import make_index_buffer
from compas_view2.gl import make_vertex_buffer

from .object import Object
from matplotlib import font_manager

here = os.path.dirname(__file__)
fonts = os.path.join(here, "..", "fonts")
Expand Down Expand Up @@ -109,3 +110,7 @@ def draw(self, shader, camera_position):
shader.uniform1i("is_text", 0)
shader.uniform1f("object_opacity", 1)
shader.disable_attribute("position")

def update(self):
super()._update_matrix()
self.init()

0 comments on commit 9a1d911

Please sign in to comment.