-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
text.cljs
108 lines (100 loc) · 5.47 KB
/
text.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
(ns mathbox.primitives.text
(:require ["mathbox-react" :as box]
[reagent.core :as r]))
(def Format
"*Text formatter*
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:data`: `null` (nullable array) - Array of labels, e.g. `[\"Grumpy\", \"Sleepy\", \"Sneezy\"]`
- `:detail`: `24` (number) - Font detail
- `:digits`: `null` (nullable positive number) - Digits of precision, e.g. `2`
- `:expr`: `null` (nullable function) - Label formatter expression, e.g. `function (x, y, z, w, i, j, k, l, time, delta) { ... }`
- `:font`: `\"sans-serif\"` (font) - Font family
- `:id`: `null` (nullable string) - Unique ID, e.g. `\"sampler\"`
- `:live`: `true` (bool) - Update continuously
- `:magFilter`: `\"linear\"` (filter) - Texture magnification filtering
- `:minFilter`: `\"linear\"` (filter) - Texture minification filtering
- `:sdf`: `5` (number) - Signed distance field range
- `:source`: `\"<\"` (select) - Input source
- `:style`: `\"\"` (string) - Font style, e.g. `\"italic\"`
- `:type`: `\"float\"` (type) - Texture data type
- `:variant`: `\"\"` (string) - Font variant, e.g. `\"small-caps\"`
- `:weight`: `\"\"` (string) - Font weight, e.g. `\"bold\"`"
(r/adapt-react-class box/Format))
(def Label
"*Draw GL labels*
- `:background`: `\"rgb(255, 255, 255)\"` (color) - Outline background
- `:blending`: `\"normal\"` (blending) - Blending mode ('no, normal, add, subtract, multiply)
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:color`: `\"rgb(128, 128, 128)\"` (color) - Color
- `:colors`: `null` (nullable select) - Colors data source, e.g. `\"#colors\"`
- `:depth`: `0` (number) - Depth scaling
- `:expand`: `0` (number) - Expand glyphs
- `:id`: `null` (nullable string) - Unique ID, e.g. `\"sampler\"`
- `:offset`: `[0, -20]` (vec2) - 2D offset
- `:opacity`: `1` (positive number) - Opacity
- `:outline`: `2` (number) - Outline size
- `:points`: `<` (select) - Points data source
- `:size`: `16` (number) - Text size
- `:snap`: `false` (bool) - Snap to pixel
- `:text`: `\"<\"` (select) - Text source
- `:visible`: `true` (bool) - Visibility for rendering
- `:zBias`: `0` (positive number) - Z-Bias (3D stacking)
- `:zIndex`: `0` (positive int) - Z-Index (2D stacking)
- `:zOrder`: `null` (nullable number) - Z-Order (drawing order), e.g. `2`
- `:zTest`: `true` (bool) - Test Z buffer
- `:zWrite`: `true` (bool) - Write Z buffer"
(r/adapt-react-class box/Label))
(def Retext
"*Text atlas resampler*
- `:centeredW`: `false` (bool) - Centered instead of corner sampling
- `:centeredX`: `false` (bool) - Centered instead of corner sampling
- `:centeredY`: `false` (bool) - Centered instead of corner sampling
- `:centeredZ`: `false` (bool) - Centered instead of corner sampling
- `:channels`: `4` (number) - Resample channels
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:depth`: `null` (nullable number) - Resample factor depth, e.g. `10`
- `:height`: `null` (nullable number) - Resample factor height, e.g. `10`
- `:id`: `null` (nullable string) - Unique ID, e.g. `\"sampler\"`
- `:indices`: `4` (number) - Resample indices
- `:items`: `null` (nullable number) - Resample factor items, e.g. `10`
- `:paddingW`: `0` (number) - Number of samples padding
- `:paddingX`: `0` (number) - Number of samples padding
- `:paddingY`: `0` (number) - Number of samples padding
- `:paddingZ`: `0` (number) - Number of samples padding
- `:sample`: `\"relative\"` (mapping) - Source sampling (relative, absolute)
- `:shader`: `\"<\"` (select) - Shader to use
- `:size`: `\"absolute\"` (mapping) - Scaling mode (relative, absolute)
- `:source`: `\"<\"` (select) - Input source
- `:width`: `null` (nullable number) - Resample factor width, e.g. `10`"
(r/adapt-react-class box/Retext))
(def Text
"*GL text source*
- `:aligned`: `false` (bool) - Use (fast) integer lookups
- `:bufferDepth`: `1` (number) - Voxel buffer depth
- `:bufferHeight`: `1` (number) - Voxel buffer height
- `:bufferWidth`: `1` (number) - Voxel buffer width
- `:channels`: `4` (number) - Number of channels
- `:classes`: `[]` (string array) - Custom classes, e.g. `[\"big\"]`
- `:data`: `null` (nullable object) - Data array
- `:depth`: `1` (nullable number) - Voxel depth
- `:detail`: `24` (number) - Font detail
- `:expr`: `null` (nullable emitter) - Data emitter expression
- `:font`: `\"sans-serif\"` (font) - Font family
- `:fps`: `null` (nullable number) - Frames-per-second update rate, e.g. `60`
- `:height`: `1` (nullable number) - Voxel height
- `:hurry`: `5` (number) - Maximum frames to hurry per frame
- `:id`: `null` (nullable string) - Unique ID, e.g. `\"sampler\"`
- `:items`: `4` (number) - Number of items
- `:limit`: `60` (number) - Maximum frames to track
- `:live`: `true` (bool) - Update continuously
- `:magFilter`: `\"linear\"` (filter) - Texture magnification filtering
- `:minFilter`: `\"linear\"` (filter) - Texture minification filtering
- `:observe`: `false` (bool) - Pass clock time to data
- `:realtime`: `false` (bool) - Run on real time, not clock time
- `:sdf`: `5` (number) - Signed distance field range
- `:style`: `\"\"` (string) - Font style, e.g. `\"italic\"`
- `:type`: `\"float\"` (type) - Texture data type
- `:variant`: `\"\"` (string) - Font variant, e.g. `\"small-caps\"`
- `:weight`: `\"\"` (string) - Font weight, e.g. `\"bold\"`
- `:width`: `1` (nullable number) - Voxel width"
(r/adapt-react-class box/Text))