yaplotlib 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/PKG-INFO +2 -2
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/README.md +1 -1
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/pyproject.toml +1 -1
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/__init__.py +1 -1
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/_writer.py +2 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/globals.py +3 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/core.py +0 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/document.py +0 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/elements.py +0 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/frame.py +0 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/palettes.py +0 -0
- {yaplotlib-1.0.0 → yaplotlib-1.0.1}/yaplotlib/spec.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yaplotlib
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: A tiny library to generate Yaplot file.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: vitroid
|
|
@@ -61,7 +61,7 @@ doc.save("movie.yap")
|
|
|
61
61
|
`doc.globals` に置いた値は、すべてのフレームの初期状態になります。何も設定しなければ `global` ブロックは出力しません。
|
|
62
62
|
|
|
63
63
|
- 見た目: `layer`, `color`, `radius`, `arrow`, `palettes`
|
|
64
|
-
- 表示の初期状態: `reality`(0..4), `splat`(0..3), `fov`, `verbose`(0..3), `thickness`, `rotation`(1〜3 個の数値), `fps`, `hide`, `show`, `messages`
|
|
64
|
+
- 表示の初期状態: `reality`(0..4), `splat`(0..3), `fov`, `verbose`(0..3), `thickness`, `rotation`(1〜3 個の数値), `fps`, `hide`, `show`, `center`(最初のフレームで中央表示), `messages`
|
|
65
65
|
- 全フレーム共通の SVG: `add_svg`
|
|
66
66
|
|
|
67
67
|
```python
|
|
@@ -44,7 +44,7 @@ doc.save("movie.yap")
|
|
|
44
44
|
`doc.globals` に置いた値は、すべてのフレームの初期状態になります。何も設定しなければ `global` ブロックは出力しません。
|
|
45
45
|
|
|
46
46
|
- 見た目: `layer`, `color`, `radius`, `arrow`, `palettes`
|
|
47
|
-
- 表示の初期状態: `reality`(0..4), `splat`(0..3), `fov`, `verbose`(0..3), `thickness`, `rotation`(1〜3 個の数値), `fps`, `hide`, `show`, `messages`
|
|
47
|
+
- 表示の初期状態: `reality`(0..4), `splat`(0..3), `fov`, `verbose`(0..3), `thickness`, `rotation`(1〜3 個の数値), `fps`, `hide`, `show`, `center`(最初のフレームで中央表示), `messages`
|
|
48
48
|
- 全フレーム共通の SVG: `add_svg`
|
|
49
49
|
|
|
50
50
|
```python
|
|
@@ -280,6 +280,8 @@ def render_globals(defaults: Globals) -> str:
|
|
|
280
280
|
lines.append("hide " + _layers("hide", defaults.hide) + "\n")
|
|
281
281
|
if defaults.show:
|
|
282
282
|
lines.append("show " + _layers("show", defaults.show) + "\n")
|
|
283
|
+
if defaults.center:
|
|
284
|
+
lines.append("center\n")
|
|
283
285
|
for message in defaults.messages:
|
|
284
286
|
if not isinstance(message, str):
|
|
285
287
|
raise TypeError("message は文字列にしてください")
|
|
@@ -12,6 +12,7 @@ class Globals:
|
|
|
12
12
|
|
|
13
13
|
何も設定していなければ、global ブロック自体を出力しない。
|
|
14
14
|
ここに置いた SVG はすべてのフレームに重ねて表示される。
|
|
15
|
+
``center`` を真にすると、引数のない ``center`` を出し、最初のフレームで中央表示にする。
|
|
15
16
|
"""
|
|
16
17
|
|
|
17
18
|
layer: Optional[int] = None
|
|
@@ -28,6 +29,7 @@ class Globals:
|
|
|
28
29
|
fps: Optional[float] = None
|
|
29
30
|
hide: tuple[int, ...] = ()
|
|
30
31
|
show: tuple[int, ...] = ()
|
|
32
|
+
center: bool = False
|
|
31
33
|
messages: list[str] = field(default_factory=list)
|
|
32
34
|
svgs: list[Svg] = field(default_factory=list)
|
|
33
35
|
|
|
@@ -57,6 +59,7 @@ class Globals:
|
|
|
57
59
|
and self.fps is None
|
|
58
60
|
and not self.hide
|
|
59
61
|
and not self.show
|
|
62
|
+
and not self.center
|
|
60
63
|
and not self.messages
|
|
61
64
|
and not self.svgs
|
|
62
65
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|