File tree Expand file tree Collapse file tree 5 files changed +709
-132
lines changed
i18n/ja/docusaurus-plugin-content-docs/current/lib Expand file tree Collapse file tree 5 files changed +709
-132
lines changed Original file line number Diff line number Diff line change @@ -86,3 +86,24 @@ const Impact = () => (
8686 </FillFrame >
8787)
8888```
89+
90+ ## Effects: DrawText
91+
92+ ` <DrawText /> ` renders text as animated SVG strokes using a supplied font file.
93+
94+ ``` tsx
95+ import { DrawText } from " ../src/lib/animation/effect/draw-text"
96+
97+ <DrawText text = " Hello" fontUrl = " assets/Roboto.ttf" fontSize = { 96 } />
98+ ```
99+
100+ ## Effects: DrawTex
101+
102+ ` <DrawTex /> ` renders TeX as animated SVG strokes (MathJax SVG output).
103+ MathJax must be available in the build (this project uses a static import in ` draw-text.tsx ` ).
104+
105+ ``` tsx
106+ import { DrawTex } from " ../src/lib/animation/effect/draw-text"
107+
108+ <DrawTex tex = { " \\ sum_{i=1}^{n} i = \\ frac{n(n+1)}{2}" } fontSize = { 96 } />
109+ ```
Original file line number Diff line number Diff line change @@ -86,3 +86,24 @@ const Impact = () => (
8686 </FillFrame >
8787)
8888```
89+
90+ ## Effects: DrawText
91+
92+ ` <DrawText /> ` はフォントファイルを使ってテキストを SVG ストロークで描画します。
93+
94+ ``` tsx
95+ import { DrawText } from " ../src/lib/animation/effect/draw-text"
96+
97+ <DrawText text = " Hello" fontUrl = " assets/Roboto.ttf" fontSize = { 96 } />
98+ ```
99+
100+ ## Effects: DrawTex
101+
102+ ` <DrawTex /> ` は TeX を SVG ストロークとして描画します(MathJax の SVG 出力)。
103+ MathJax がビルドに含まれている必要があります(このプロジェクトでは ` draw-text.tsx ` で静的 import しています)。
104+
105+ ``` tsx
106+ import { DrawTex } from " ../src/lib/animation/effect/draw-text"
107+
108+ <DrawTex tex = { " \\ sum_{i=1}^{n} i = \\ frac{n(n+1)}{2}" } fontSize = { 96 } />
109+ ```
Original file line number Diff line number Diff line change 2929 "dependencies" : {
3030 "@ffmpeg-installer/ffmpeg" : " ^1.1.0" ,
3131 "@ffprobe-installer/ffprobe" : " ^2.1.2" ,
32- "opentype.js" : " ^1.3.4" ,
3332 "@types/opentype.js" : " ^1.3.4" ,
33+ "mathjax-full" : " ^3.2.1" ,
34+ "opentype.js" : " ^1.3.4" ,
3435 "puppeteer" : " ^24.1.1" ,
3536 "react" : " ^19.2.0" ,
3637 "react-dom" : " ^19.2.0" ,
You can’t perform that action at this time.
0 commit comments