├── LICENSE ├── README.md ├── addons ├── teeb.text_effects │ ├── demo │ │ ├── RichTextLabel.tscn │ │ ├── demo_font.tres │ │ ├── demo_scene.tscn │ │ ├── unifont-13.0.01.ttf │ │ └── unifont_upper-13.0.01.ttf │ ├── effects │ │ ├── ColorMod.gd │ │ ├── Cuss.gd │ │ ├── Heart.gd │ │ ├── Jump.gd │ │ ├── L33T.gd │ │ ├── Nervous.gd │ │ ├── Number.gd │ │ ├── Rain.gd │ │ ├── Sparkle.gd │ │ ├── UwU.gd │ │ └── Woo.gd │ ├── preview.png.import │ └── resources │ │ ├── ColorMod.tres │ │ ├── Cuss.tres │ │ ├── Heart.tres │ │ ├── Jump.tres │ │ ├── L33T.tres │ │ ├── Nervous.tres │ │ ├── Number.tres │ │ ├── Rain.tres │ │ ├── Sparkle.tres │ │ ├── UwU.tres │ │ └── Woo.tres └── teeb.text_transitions │ ├── Debugger.gd │ ├── RichTextTransition.gd │ ├── TextTransitionSettings.gd │ ├── demo │ ├── RichTextLabel.tscn │ ├── demo_font.tres │ ├── demo_scene.tscn │ ├── unifont-13.0.01.ttf │ └── unifont_upper-13.0.01.ttf │ ├── preview.png.import │ ├── resources │ ├── Bounce.tres │ ├── Console.tres │ ├── Embers.tres │ ├── Prickle.tres │ ├── Redacted.tres │ ├── WFC.tres │ └── Word.tres │ └── transitions │ ├── Bounce.gd │ ├── Console.gd │ ├── Embers.gd │ ├── Prickle.gd │ ├── Redacted.gd │ ├── TransitionBase.gd │ ├── WFC.gd │ └── Word.gd ├── default_env.tres ├── icon.png ├── icon.png.import ├── project.godot └── readme ├── effect_preview.png ├── effect_preview.png.import ├── trans_preview.png └── trans_preview.png.import /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 teebarjunk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > [!IMPORTANT] 2 | > A better version for Godot 4+ [here](https://github.com/chairfull/GodotRichTextLabel2) 3 | 4 | 5 | 6 | Effects Preview: 7 | 8 | https://user-images.githubusercontent.com/18387401/130072369-90f99c72-358e-41fe-af4d-cfea32665741.mp4 9 | 10 | Transition Preview: 11 | 12 | https://user-images.githubusercontent.com/18387401/130072410-a80b2545-3a13-4704-af9b-000e3816de35.mp4 13 | 14 | Released as is. You may need to figure things out yourself, but I included demos. 15 | 16 | **addons/teeb.text_effects**: Simple bbcode elements to use in *RichTextLabel*s. 17 | 18 | **addons/teeb.text_transitions**: Hacky text animations. A bit complex to implement. 19 | 20 | ***Many of these effects require a monowidth font to work properly.*** 21 | 22 | ## Got ideas? 23 | 24 | Make a feature request of any text effects you'd like to see, and I'll try to implement them. 25 | 26 | ## Effects 27 | 28 | [![Effect Preview](readme/effect_preview.png "Effect Preview")](https://streamable.com/ev4k4a) 29 | 30 | The effects be used like any other bbcode. 31 | 32 | ` 33 | Hey... [nervous]muh-maybe could I...[/nervous] have the [sparkle c1=red c2=yellow c3=black][cuss]Hecking[/cuss] Cool Sword[/sparkle] of [sparkle c1=yellow c2=orange]maximum unrelenting power[/sparkle]? 34 | ` 35 | 36 | **cuss**: Replaces letters with symbols, to censor the word, somewhat. 37 | 38 | 39 | **heart**: Simple wave animation, where some letters are replaced by heart emoji. 40 | 41 | - scale: Size of jumping. 42 | - freq: The waviness. 43 | 44 | 45 | **jump**: Demonstrates how to do animate at the word level, rather than just individual letters. 46 | 47 | - angle: Angle to jump in. (Degrees.) 48 | 49 | 50 | **l33t**: Replaces letters with numbers. Only use if you're a hacker. 51 | 52 | 53 | **nervous**: Gives every word a unique jiggle. 54 | 55 | - scale: The scale of jumpiness. 56 | - freq: The speed of jumpiness. 57 | 58 | 59 | **number**: Automatically colorizes numbers and the first word after the number. 60 | 61 | - color: The color. 62 | 63 | 64 | **rain**: Just a rainy effect. Not useful, but I think it looks nice. 65 | 66 | 67 | **sparkle**: Can take up to 3 colors, which it will interpolate between for every letter. 68 | 69 | - freq: The frequency. Greater = individual letters are more similarly colorized. 70 | - c1: Color 1 71 | - c2: Color 2 72 | - c3: Color 3 73 | 74 | 75 | **uwu**: Replaces all letters R and L with W. 76 | 77 | 78 | **woo**: Alternates between upper and lowercase for all the letters, suggesting a condescending tone. 79 | 80 | - scale: The scale of the waves. 81 | - freq: The frequency of the waves. 82 | 83 | 84 | ## RichTextTransition Node 85 | 86 | [![Transition Preview](readme/trans_preview.png "Transition Preview")](https://streamable.com/p18yu4) 87 | 88 | Warning: This is a hacky, wonky implementation of text transition effects. But it works well enough for me. 89 | 90 | ### Node Properties 91 | 92 | **id**: Only necessary if you want to use multiple different *RichTextTransition*s at once. 93 | 94 | **time**: The animation state. Slide this in editor to preview, or modify it with an *Animator* or *Tween* node. 95 | 96 | **length**: The number of characters or words effected by the animation. 97 | Shorter = quicker, pop-ier animations. 98 | Longer = gradual, flow-ier animation. 99 | For transitions like ***console*** this should be set to 1. 100 | 101 | **reverse**: Should be set before transitioning out. 102 | 103 | **all_at_once**: If you just want all characters to fade in/out at once, use this. 104 | 105 | **animation_time**: Used by ***fade_in*** and ***fade_out*** methods. 106 | 107 | 0.5 = half normal speed. 108 | 109 | 2.0 = twice normal speed. 110 | 111 | ### Node Methods 112 | 113 | **fade_in**: Calls the *AnimationPlayer* ***fade_in*** animation. 114 | 115 | **fade_out**: Calls the *AnimationPlayer* ***fade_out*** animation. 116 | 117 | 118 | ### Transitions 119 | 120 | The following can be used like any other bbcode. 121 | 122 | ` 123 | [embers]Long ago, legends foretold...[/embers] 124 | ` 125 | 126 | But if you are using multiple *RichTextTransition*s, best to include a unique id attribute that matches the *id* field in the node. 127 | 128 | ` 129 | [embers id=unique_id]Long ago, legends foretold...[/embers] 130 | ` 131 | 132 | **bounce**: Letters fade and bounce in. 133 | 134 | **console**: Letters are lead in by a blinking "cursor." When fading out they scroll up. 135 | 136 | **embers**: Letters fade in/out from random directions. 137 | 138 | - scale: Distance to move in/out from. 139 | - color: Color of the "embers." 140 | 141 | **prickle**: Letters fade in/out in a noisy random way. 142 | 143 | - pow: Power of fade in. Larger = more abrupt. 144 | 145 | **redacted**: Letters are blocked out before being exposed. 146 | 147 | - freq: Y offset frequency. 148 | - scale: Y offset scale. 149 | 150 | **wfc**: Wave function collapse inspired effect, where flickering numbers "collapse" to letters. 151 | 152 | **word**: Fade in/out on a word by word basis, rather than letters. 153 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/demo/RichTextLabel.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=13 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/demo/demo_font.tres" type="DynamicFont" id=1] 4 | [ext_resource path="res://addons/teeb.text_effects/resources/Cuss.tres" type="RichTextEffect" id=2] 5 | [ext_resource path="res://addons/teeb.text_effects/resources/UwU.tres" type="RichTextEffect" id=3] 6 | [ext_resource path="res://addons/teeb.text_effects/resources/Rain.tres" type="RichTextEffect" id=4] 7 | [ext_resource path="res://addons/teeb.text_effects/resources/Heart.tres" type="RichTextEffect" id=5] 8 | [ext_resource path="res://addons/teeb.text_effects/resources/ColorMod.tres" type="RichTextEffect" id=6] 9 | [ext_resource path="res://addons/teeb.text_effects/resources/Number.tres" type="RichTextEffect" id=7] 10 | [ext_resource path="res://addons/teeb.text_effects/resources/Woo.tres" type="RichTextEffect" id=8] 11 | [ext_resource path="res://addons/teeb.text_effects/resources/Sparkle.tres" type="RichTextEffect" id=9] 12 | [ext_resource path="res://addons/teeb.text_effects/resources/Nervous.tres" type="RichTextEffect" id=10] 13 | [ext_resource path="res://addons/teeb.text_effects/resources/Jump.tres" type="RichTextEffect" id=11] 14 | [ext_resource path="res://addons/teeb.text_effects/resources/L33T.tres" type="RichTextEffect" id=12] 15 | 16 | [node name="RichTextLabel" type="RichTextLabel"] 17 | margin_right = 200.0 18 | margin_bottom = 100.0 19 | custom_fonts/normal_font = ExtResource( 1 ) 20 | bbcode_enabled = true 21 | bbcode_text = "[color=gray]a:[/color] b" 22 | text = "a: b" 23 | custom_effects = [ ExtResource( 6 ), ExtResource( 2 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 24 | __meta__ = { 25 | "_edit_use_anchors_": false 26 | } 27 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/demo/demo_font.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="DynamicFont" load_steps=3 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/demo/unifont_upper-13.0.01.ttf" type="DynamicFontData" id=1] 4 | [ext_resource path="res://addons/teeb.text_effects/demo/unifont-13.0.01.ttf" type="DynamicFontData" id=2] 5 | 6 | [resource] 7 | size = 32 8 | font_data = ExtResource( 2 ) 9 | fallback/0 = ExtResource( 1 ) 10 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/demo/demo_scene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=13 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/resources/Cuss.tres" type="RichTextEffect" id=1] 4 | [ext_resource path="res://addons/teeb.text_effects/demo/RichTextLabel.tscn" type="PackedScene" id=2] 5 | [ext_resource path="res://addons/teeb.text_effects/resources/UwU.tres" type="RichTextEffect" id=3] 6 | [ext_resource path="res://addons/teeb.text_effects/resources/Rain.tres" type="RichTextEffect" id=4] 7 | [ext_resource path="res://addons/teeb.text_effects/resources/Heart.tres" type="RichTextEffect" id=5] 8 | [ext_resource path="res://addons/teeb.text_effects/resources/ColorMod.tres" type="RichTextEffect" id=6] 9 | [ext_resource path="res://addons/teeb.text_effects/resources/Number.tres" type="RichTextEffect" id=7] 10 | [ext_resource path="res://addons/teeb.text_effects/resources/Woo.tres" type="RichTextEffect" id=8] 11 | [ext_resource path="res://addons/teeb.text_effects/resources/Sparkle.tres" type="RichTextEffect" id=9] 12 | [ext_resource path="res://addons/teeb.text_effects/resources/Nervous.tres" type="RichTextEffect" id=10] 13 | [ext_resource path="res://addons/teeb.text_effects/resources/Jump.tres" type="RichTextEffect" id=11] 14 | [ext_resource path="res://addons/teeb.text_effects/resources/L33T.tres" type="RichTextEffect" id=12] 15 | 16 | [node name="Node2D" type="Node2D"] 17 | 18 | [node name="cuss" parent="." instance=ExtResource( 2 )] 19 | margin_left = 48.0 20 | margin_top = 13.0 21 | margin_right = 1027.0 22 | margin_bottom = 55.0 23 | bbcode_text = "[color=gray]cuss:[/color] What the [cuss]heck[/cuss] are you [cuss]fuckers[/cuss] talking about?" 24 | text = "cuss: What the heck are you fuckers talking about?" 25 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 26 | 27 | [node name="heart" parent="." instance=ExtResource( 2 )] 28 | margin_left = 32.499 29 | margin_top = 45.8829 30 | margin_right = 1011.5 31 | margin_bottom = 87.8829 32 | bbcode_text = "[color=gray]heart:[/color] [heart]I love you so much!!![/heart]." 33 | text = "heart: I love you so much!!!." 34 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 35 | 36 | [node name="jump" parent="." instance=ExtResource( 2 )] 37 | margin_left = 47.6654 38 | margin_top = 82.8734 39 | margin_right = 1026.67 40 | margin_bottom = 124.873 41 | bbcode_text = "[color=gray]jump:[/color] [jump angle=180]Jump up![/jump] [jump]Jump down. [/jump][jump angle=45]To at a 45![/jump] [jump angle=270]To the right![/jump]" 42 | text = "jump: Jump up! Jump down. To at a 45! To the right!" 43 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 44 | 45 | [node name="l33t" parent="." instance=ExtResource( 2 )] 46 | margin_left = 47.6654 47 | margin_top = 125.873 48 | margin_right = 1026.67 49 | margin_bottom = 167.873 50 | bbcode_text = "[color=gray]l33t:[/color] [l33t]Only the top hackers in the biz can read this.[/l33t]" 51 | text = "l33t: Only the top hackers in the biz can read this." 52 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 53 | 54 | [node name="nervous" parent="." instance=ExtResource( 2 )] 55 | margin_left = 0.773407 56 | margin_top = 165.763 57 | margin_right = 979.773 58 | margin_bottom = 207.763 59 | bbcode_text = "[color=gray]nervous:[/color] [nervous]Oh, u-um, I was wo-wondering... if maybe...[/nervous]" 60 | text = "nervous: Oh, u-um, I was wo-wondering... if maybe..." 61 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 62 | 63 | [node name="number" parent="." instance=ExtResource( 2 )] 64 | margin_left = 15.7734 65 | margin_top = 202.763 66 | margin_right = 994.773 67 | margin_bottom = 244.763 68 | bbcode_text = "[color=gray]number:[/color] [number color=cyan]I'll give you 10 coconuts for 20 shells.[/number]" 69 | text = "number: I'll give you 10 coconuts for 20 shells." 70 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 71 | 72 | [node name="rain" parent="." instance=ExtResource( 2 )] 73 | margin_left = 48.7734 74 | margin_top = 244.763 75 | margin_right = 1027.77 76 | margin_bottom = 286.763 77 | bbcode_text = "[color=gray]rain:[/color] [rain]Rain, rain, go away. Come again later.[/rain]" 78 | text = "rain: Rain, rain, go away. Come again later." 79 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 80 | 81 | [node name="sparkle" parent="." instance=ExtResource( 2 )] 82 | margin_left = 0.773407 83 | margin_top = 285.763 84 | margin_right = 979.773 85 | margin_bottom = 327.763 86 | bbcode_text = "[color=gray]sparkle:[/color] You aquired the [sparkle c1=darkred c2=black]Evil Sword[/sparkle] and the [sparkle c1=blue c2=aqua]Good Sword[/sparkle]." 87 | text = "sparkle: You aquired the Evil Sword and the Good Sword." 88 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 89 | 90 | [node name="uwu" parent="." instance=ExtResource( 2 )] 91 | margin_left = 64.7734 92 | margin_top = 321.763 93 | margin_right = 1043.77 94 | margin_bottom = 363.763 95 | bbcode_text = "[color=gray]uwu:[/color] [uwu]Leave me alone, I am trying me hardest.[/uwu]" 96 | text = "uwu: Leave me alone, I am trying me hardest." 97 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 98 | 99 | [node name="woo" parent="." instance=ExtResource( 2 )] 100 | margin_left = 66.0535 101 | margin_top = 357.919 102 | margin_right = 1045.05 103 | margin_bottom = 399.919 104 | bbcode_text = "[color=gray]woo:[/color] You were all like \"[woo]Ooh, look at how smart I am.[/woo]\"" 105 | text = "woo: You were all like \"Ooh, look at how smart I am.\"" 106 | custom_effects = [ ExtResource( 6 ), ExtResource( 1 ), ExtResource( 5 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 10 ), ExtResource( 7 ), ExtResource( 4 ), ExtResource( 9 ), ExtResource( 3 ), ExtResource( 8 ), null, null, null, null, null ] 107 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/demo/unifont-13.0.01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/addons/teeb.text_effects/demo/unifont-13.0.01.ttf -------------------------------------------------------------------------------- /addons/teeb.text_effects/demo/unifont_upper-13.0.01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/addons/teeb.text_effects/demo/unifont_upper-13.0.01.ttf -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/ColorMod.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [colormod pow][/colormod] 6 | var bbcode = "colormod" 7 | 8 | 9 | func _process_custom_fx(char_fx): 10 | var t = smoothstep(0.3, 0.6, sin(char_fx.elapsed_time * 4.0) * .5 + .5) 11 | char_fx.color = lerp(char_fx.color, Color.blue, t) 12 | 13 | # char_fx.color.a -= RandUtil.noise(char_fx.elapsed_time * 8.0) * .5# sin(char_fx.elapsed_time * 16.0) * .5 + .5 14 | # var hsv = ColorUtil.color_to_hsv(char_fx.color) 15 | # hsv[0] += sin(char_fx.elapsed_time * 4.0) * .1 16 | # hsv[2] = sin(char_fx.elapsed_time * 8.0) 17 | # char_fx.color = char_fx.color.from_hsv(hsv[0], hsv[1], hsv[2], char_fx.color.a) 18 | return true 19 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Cuss.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [cuss][/cuss] 6 | var bbcode = "cuss" 7 | 8 | var VOWELS = [ord("a"), ord("e"), ord("i"), ord("o"), ord("u"), 9 | ord("A"), ord("E"), ord("I"), ord("O"), ord("U")] 10 | var CHARS = [ord("&"), ord("$"), ord("!"), ord("@"), ord("*"), ord("#"), ord("%")] 11 | var SPACE = ord(" ") 12 | 13 | var _was_space = false 14 | 15 | 16 | func _process_custom_fx(char_fx): 17 | var c = char_fx.character 18 | 19 | if not _was_space and not char_fx.relative_index == 0 and not c == SPACE: 20 | var t = char_fx.elapsed_time + char_fx.character * 10.2 + char_fx.absolute_index * 2 21 | t *= 4.3 22 | if c in VOWELS or sin(t) > 0.0: 23 | char_fx.character = CHARS[int(t) % len(CHARS)] 24 | 25 | _was_space = c == SPACE 26 | 27 | return true 28 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Heart.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [heart scale=1.0 freq=8.0][/heart] 6 | var bbcode = "heart" 7 | 8 | const HEART = ord("♡") 9 | const TO_CHANGE = [ord("o"), ord("O"), ord("a"), ord("A")] 10 | 11 | func _process_custom_fx(char_fx): 12 | var scale:float = char_fx.env.get("scale", 16.0) 13 | var freq:float = char_fx.env.get("freq", 2.0) 14 | 15 | var x = char_fx.absolute_index / scale - char_fx.elapsed_time * freq 16 | var t = abs(cos(x)) * max(0.0, smoothstep(0.712, 0.99, sin(x))) * 2.5; 17 | char_fx.color = lerp(char_fx.color, lerp(Color.blue, Color.red, t), t) 18 | char_fx.offset.y -= t * 4.0 19 | 20 | var c = char_fx.character 21 | if char_fx.offset.y < -1.0: 22 | if char_fx.character in TO_CHANGE: 23 | char_fx.character = HEART 24 | 25 | return true 26 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Jump.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [jump angle=3.141][/jump] 6 | var bbcode = "jump" 7 | 8 | const SPLITTERS = [ord(" "), ord("."), ord(",")] 9 | 10 | var _w_char = 0 11 | var _last = 999 12 | 13 | 14 | func _process_custom_fx(char_fx): 15 | if char_fx.absolute_index < _last or char_fx.character in SPLITTERS: 16 | _w_char = char_fx.absolute_index 17 | 18 | _last = char_fx.absolute_index 19 | var t = abs(sin(char_fx.elapsed_time * 8.0 + _w_char * PI * .025)) * 4.0 20 | var angle = deg2rad(char_fx.env.get("angle", 0)) 21 | char_fx.offset.x += sin(angle) * t 22 | char_fx.offset.y += cos(angle) * t 23 | return true 24 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/L33T.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | # Syntax: [l33t][/l33t] 5 | var bbcode = "l33t" 6 | 7 | 8 | var leet = { 9 | ord("L"): ord("1"), 10 | ord("l"): ord("1"), 11 | ord("I"): ord("1"), 12 | ord("i"): ord("1"), 13 | ord("E"): ord("3"), 14 | ord("e"): ord("3"), 15 | ord("T"): ord("7"), 16 | ord("t"): ord("7"), 17 | ord("S"): ord("5"), 18 | ord("s"): ord("5"), 19 | ord("A"): ord("4"), 20 | ord("a"): ord("4"), 21 | ord("O"): ord("0"), 22 | ord("o"): ord("0"), 23 | } 24 | 25 | 26 | func _process_custom_fx(char_fx): 27 | if char_fx.character in leet: 28 | char_fx.character = leet[char_fx.character] 29 | return true 30 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Nervous.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [nervous scale=1.0 freq=8.0][/nervous] 6 | var bbcode = "nervous" 7 | 8 | const SPLITTERS = [ord(" "), ord("."), ord(","), ord("-")] 9 | 10 | var _word = 0.0 11 | 12 | 13 | func _process_custom_fx(char_fx): 14 | if char_fx.relative_index == 0: 15 | _word = 0 16 | 17 | var scale:float = char_fx.env.get("scale", 1.0) 18 | var freq:float = char_fx.env.get("freq", 8.0) 19 | 20 | if char_fx.character in SPLITTERS: 21 | _word += 1 22 | 23 | var s = fmod((_word + char_fx.elapsed_time) * PI * 1.25, PI * 2.0) 24 | var p = sin(char_fx.elapsed_time * freq) 25 | char_fx.offset.x += sin(s) * p * scale 26 | char_fx.offset.y += cos(s) * p * scale 27 | 28 | return true 29 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Number.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [number][/number] 6 | var bbcode = "number" 7 | 8 | 9 | const COMMA = ord(",") 10 | const SPACE = ord(" ") 11 | const PERIOD = ord(".") 12 | 13 | var _last_char_was_number:bool = false 14 | var _last_word_was_number:bool = false 15 | 16 | 17 | func get_color(s) -> Color: 18 | if s is Color: return s 19 | elif s[0] == '#': return Color(s) 20 | else: return ColorN(s) 21 | 22 | 23 | func _process_custom_fx(char_fx): 24 | var number_color:Color = get_color(char_fx.env.get("color", Color.yellow)) 25 | 26 | # Reset on first character. 27 | if char_fx.relative_index == 0: 28 | _last_char_was_number = false 29 | _last_word_was_number = false 30 | 31 | # If the following is a word, and it came after a number, we'll colorize it. 32 | if char_fx.character == SPACE: 33 | if _last_char_was_number: 34 | _last_word_was_number = true 35 | else: 36 | _last_word_was_number = false 37 | 38 | # Colorize characters after a number, except for the period. 39 | if _last_word_was_number and char_fx.character != PERIOD: 40 | char_fx.color = number_color 41 | 42 | # If character is a number, color it. 43 | if char_fx.character >= 48 and char_fx.character <= 57: 44 | char_fx.color = number_color 45 | _last_char_was_number = true 46 | # Colorize trailing commas and periods. 47 | elif _last_char_was_number and (char_fx.character == COMMA): 48 | char_fx.color = number_color 49 | _last_char_was_number = false 50 | else: 51 | _last_char_was_number = false 52 | return true 53 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Rain.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [rain][/rain] 6 | var bbcode = "rain" 7 | 8 | 9 | func get_rand(char_fx): 10 | return fmod(get_rand_unclamped(char_fx), 1.0) 11 | 12 | 13 | func get_rand_unclamped(char_fx): 14 | return char_fx.character * 33.33 + char_fx.absolute_index * 4545.5454 15 | 16 | 17 | func _process_custom_fx(char_fx): 18 | var time = char_fx.elapsed_time 19 | var r = get_rand(char_fx) 20 | var t = fmod(r + time * .5, 1.0) 21 | char_fx.offset.y += t * 8.0 22 | char_fx.color = lerp(char_fx.color, Color.transparent, t) 23 | return true 24 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Sparkle.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [sparkle freq c1 c2 c3][/sparkle] 6 | var bbcode = "sparkle" 7 | 8 | 9 | static func lerp_list(a:Array, t:float): 10 | if len(a) == 0: return null 11 | if len(a) == 1: return a[0] 12 | t = wrapf(t, 0.0, 1.0) 13 | var scaled:float = t * float(len(a) - 1.0) 14 | var from = a[wrapi(int(floor(scaled)), 0, len(a))] 15 | var to = a[wrapi(int(floor(scaled + 1.0)), 0, len(a))] 16 | t = scaled - floor(scaled) 17 | return lerp(from, to, t) 18 | 19 | 20 | func get_color(s) -> Color: 21 | if s is Color: return s 22 | elif s[0] == '#': return Color(s) 23 | else: return ColorN(s) 24 | 25 | 26 | func get_rand_unclamped(char_fx): 27 | return char_fx.character * 33.33 + char_fx.absolute_index * 4545.5454 28 | 29 | 30 | func _process_custom_fx(char_fx): 31 | var freq = char_fx.env.get("freq", 2.0) 32 | var c1 = char_fx.env.get("c1", char_fx.color) 33 | var c2 = char_fx.env.get("c2") 34 | var c3 = char_fx.env.get("c3") 35 | 36 | var colors = [] 37 | if c1 != null: colors.append(get_color(c1)) 38 | if c2 != null: colors.append(get_color(c2)) 39 | if c3 != null: colors.append(get_color(c3)) 40 | 41 | if len(colors) != 0: 42 | var t = sin(char_fx.elapsed_time * freq + get_rand_unclamped(char_fx)) * .5 + .5 43 | char_fx.color = lerp_list(colors, t) 44 | return true 45 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/UwU.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [uwu][/uwu] 6 | var bbcode = "uwu" 7 | 8 | 9 | const r = ord("r") 10 | const R = ord("R") 11 | const l = ord("l") 12 | const L = ord("L") 13 | 14 | const w = ord("w") 15 | const W = ord("W") 16 | 17 | 18 | func _process_custom_fx(char_fx): 19 | match char_fx.character: 20 | r, l: char_fx.character = w 21 | R, L: char_fx.character = W 22 | return true 23 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/effects/Woo.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextEffect 3 | 4 | 5 | # Syntax: [woo scale=1.0 freq=8.0][/woo] 6 | var bbcode = "woo" 7 | 8 | 9 | func _process_custom_fx(char_fx): 10 | var scale:float = char_fx.env.get("scale", 1.0) 11 | var freq:float = char_fx.env.get("freq", 8.0) 12 | if sin(char_fx.elapsed_time * freq + char_fx.absolute_index * scale) < 0: 13 | if char_fx.character >= 65 and char_fx.character <= 90: 14 | char_fx.character += 32 15 | elif char_fx.character >= 97 and char_fx.character <= 122: 16 | char_fx.character -= 32 17 | return true 18 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/preview.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/preview.png-08e1c43912ba409f22868727acdb78f7.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://addons/teeb.text_effects/preview.png" 13 | dest_files=[ "res://.import/preview.png-08e1c43912ba409f22868727acdb78f7.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/ColorMod.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/ColorMod.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "ColorMod" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Cuss.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Cuss.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Cuss" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Heart.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Heart.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Heart" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Jump.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Jump.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Jump" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/L33T.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/L33T.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "L33T" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Nervous.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Nervous.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Nervous" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Number.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Number.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Number" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Rain.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Rain.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Rain" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Sparkle.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Sparkle.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Sparkle" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/UwU.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/UwU.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "UwU" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_effects/resources/Woo.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_effects/effects/Woo.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Woo" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/Debugger.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends Control 3 | 4 | 5 | var _time:float = 0.0 6 | var _reverse:bool = false 7 | var _all_at_once:bool = false 8 | 9 | 10 | export(String, MULTILINE) var info:String = """Press 1 to 'fade in' all effects. 11 | Press 2 to 'fade out' all effects. 12 | Or, simply mess with the following slider and toggles.""" 13 | export(float, 0.0, 1.0) var time:float = 0.0 setget _set_time, _get_time 14 | export(bool) var reverse:bool = false setget _set_reverse, _get_reverse 15 | export(bool) var all_at_once:bool = false setget _set_all_at_once, _get_all_at_once 16 | 17 | 18 | func _process(delta): 19 | if Input.is_key_pressed(KEY_1): 20 | for key in TextTransitionSettings.transitions: 21 | TextTransitionSettings.transitions[key].fade_in() 22 | elif Input.is_key_pressed(KEY_2): 23 | for key in TextTransitionSettings.transitions: 24 | TextTransitionSettings.transitions[key].fade_out() 25 | 26 | 27 | func _set_time(new_time): 28 | _time = new_time 29 | for key in TextTransitionSettings.transitions: 30 | TextTransitionSettings.transitions[key].time = new_time 31 | 32 | 33 | func _get_time(): 34 | return _time 35 | 36 | 37 | func _set_reverse(new_reverse): 38 | _reverse = new_reverse 39 | for key in TextTransitionSettings.transitions: 40 | TextTransitionSettings.transitions[key].reverse = new_reverse 41 | 42 | 43 | func _get_reverse(): 44 | return _reverse 45 | 46 | 47 | func _set_all_at_once(new_aao): 48 | _all_at_once = new_aao 49 | for key in TextTransitionSettings.transitions: 50 | TextTransitionSettings.transitions[key].all_at_once = new_aao 51 | 52 | 53 | func _get_all_at_once(): 54 | return _all_at_once 55 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/RichTextTransition.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends RichTextLabel 3 | 4 | 5 | export(String) var id:String = "main" 6 | export(float, 0.0, 1.0) var time:float = 0.0 7 | export(float, 1.0, 32.0) var length:float = 8.0 8 | export(bool) var reverse:bool = false 9 | export(bool) var all_at_once:bool = false 10 | export(float, 0.1, 2.0) var animation_time:float = 1.0 11 | 12 | 13 | func _enter_tree(): 14 | TextTransitionSettings.register(self) 15 | $AnimationPlayer.connect("animation_finished", self, "on_animation_finish") 16 | 17 | 18 | func _exit_tree(): 19 | TextTransitionSettings.unregister(self) 20 | $AnimationPlayer.disconnect("animation_finished", self, "on_animation_finish") 21 | 22 | 23 | # Mostly needed for editor testing. 24 | func _process(delta): 25 | if not id in TextTransitionSettings.transitions: 26 | TextTransitionSettings.register(self) 27 | 28 | 29 | func on_animation_finish(anim_name:String): 30 | match anim_name: 31 | "fade_in": prints("Faded in.", self.name) 32 | "fade_out": prints("Faded out.", self.name) 33 | 34 | 35 | func fade_in(): 36 | $AnimationPlayer.play("fade_in", -1, animation_time) 37 | 38 | 39 | func fade_out(): 40 | $AnimationPlayer.play("fade_out", -1, animation_time) 41 | 42 | 43 | # char_index: Character position requesting a time value. 44 | # allow_all_together: used internally by some transitions. 45 | func get_t(char_index:int, allow_all_together:bool = true) -> float: 46 | if all_at_once and allow_all_together: 47 | return 1.0 - time 48 | else: 49 | var characters = get_total_character_count() + length 50 | if reverse: 51 | var t = (1.0 - time) * characters 52 | return 1.0 - clamp((char_index + length - t), 0.0, length) / length 53 | else: 54 | var t = time * characters 55 | return clamp((char_index + length - t), 0.0, length) / length 56 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/TextTransitionSettings.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends Node 3 | 4 | 5 | var transitions = {} 6 | 7 | 8 | func register(rich_text_transition): 9 | transitions[rich_text_transition.id] = rich_text_transition 10 | 11 | 12 | func unregister(rich_text_transition): 13 | transitions.erase(rich_text_transition.id) 14 | 15 | # 16 | #func tween_in(id:String, rt:RichTextLabel, time:float=1.0, time_per_character:bool=false, fade_distance:float=8.0, all_together:bool=false): 17 | # var d = transitions[id] 18 | # d.total_characters = len(rt.text) 19 | # d.backwards = false 20 | # d.fade_distance = fade_distance 21 | # d.all_together = all_together 22 | # var t = time if not time_per_character else time * len(rt.text) 23 | # var tw = rt.get_node("Tween") 24 | # tw.stop_all() 25 | # tw.interpolate_property(d, "time", 0.0, 1.0, t) 26 | # tw.start() 27 | # 28 | # 29 | #func tween_out(id:String, rt:RichTextLabel, time:float=1.0, time_per_character:bool=false, fade_distance:float=8.0, all_together:bool=false): 30 | # var d = transitions[id] 31 | # d.total_characters = len(rt.text) 32 | # d.backwards = true 33 | # d.fade_distance = fade_distance 34 | # d.all_together = all_together 35 | # var t = time if not time_per_character else time * len(rt.text) 36 | # var tw = rt.get_node("Tween") 37 | # tw.stop_all() 38 | # tw.interpolate_property(d, "time", 1.0, 0.0, t) 39 | # tw.start() 40 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/demo/RichTextLabel.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=12 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/resources/Redacted.tres" type="RichTextEffect" id=1] 4 | [ext_resource path="res://addons/teeb.text_transitions/resources/Prickle.tres" type="RichTextEffect" id=2] 5 | [ext_resource path="res://addons/teeb.text_transitions/resources/WFC.tres" type="RichTextEffect" id=4] 6 | [ext_resource path="res://addons/teeb.text_transitions/resources/Console.tres" type="RichTextEffect" id=5] 7 | [ext_resource path="res://addons/teeb.text_transitions/resources/Word.tres" type="RichTextEffect" id=6] 8 | [ext_resource path="res://addons/teeb.text_transitions/resources/Bounce.tres" type="RichTextEffect" id=7] 9 | [ext_resource path="res://addons/teeb.text_transitions/resources/Embers.tres" type="RichTextEffect" id=8] 10 | [ext_resource path="res://addons/teeb.text_transitions/demo/demo_font.tres" type="DynamicFont" id=9] 11 | [ext_resource path="res://addons/teeb.text_transitions/RichTextTransition.gd" type="Script" id=10] 12 | 13 | [sub_resource type="Animation" id=1] 14 | resource_name = "fade_in" 15 | tracks/0/type = "value" 16 | tracks/0/path = NodePath(".:time") 17 | tracks/0/interp = 1 18 | tracks/0/loop_wrap = true 19 | tracks/0/imported = false 20 | tracks/0/enabled = true 21 | tracks/0/keys = { 22 | "times": PoolRealArray( 0, 1 ), 23 | "transitions": PoolRealArray( 1, 1 ), 24 | "update": 0, 25 | "values": [ 0.0, 1.0 ] 26 | } 27 | tracks/1/type = "value" 28 | tracks/1/path = NodePath(".:reverse") 29 | tracks/1/interp = 1 30 | tracks/1/loop_wrap = true 31 | tracks/1/imported = false 32 | tracks/1/enabled = true 33 | tracks/1/keys = { 34 | "times": PoolRealArray( 0 ), 35 | "transitions": PoolRealArray( 1 ), 36 | "update": 1, 37 | "values": [ false ] 38 | } 39 | 40 | [sub_resource type="Animation" id=2] 41 | resource_name = "fade_out" 42 | tracks/0/type = "value" 43 | tracks/0/path = NodePath(".:time") 44 | tracks/0/interp = 1 45 | tracks/0/loop_wrap = true 46 | tracks/0/imported = false 47 | tracks/0/enabled = true 48 | tracks/0/keys = { 49 | "times": PoolRealArray( 0, 1 ), 50 | "transitions": PoolRealArray( 1, 1 ), 51 | "update": 0, 52 | "values": [ 1.0, 0.0 ] 53 | } 54 | tracks/1/type = "value" 55 | tracks/1/path = NodePath(".:reverse") 56 | tracks/1/interp = 1 57 | tracks/1/loop_wrap = true 58 | tracks/1/imported = false 59 | tracks/1/enabled = true 60 | tracks/1/keys = { 61 | "times": PoolRealArray( 0 ), 62 | "transitions": PoolRealArray( 1 ), 63 | "update": 1, 64 | "values": [ true ] 65 | } 66 | 67 | [node name="RichTextLabel" type="RichTextLabel"] 68 | margin_right = 40.0 69 | margin_bottom = 40.0 70 | custom_fonts/normal_font = ExtResource( 9 ) 71 | custom_effects = [ ExtResource( 7 ), ExtResource( 5 ), ExtResource( 8 ), ExtResource( 2 ), ExtResource( 1 ), ExtResource( 4 ), ExtResource( 6 ), null, null ] 72 | script = ExtResource( 10 ) 73 | __meta__ = { 74 | "_edit_use_anchors_": false 75 | } 76 | time = 1.0 77 | reverse = true 78 | 79 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."] 80 | anims/fade_in = SubResource( 1 ) 81 | anims/fade_out = SubResource( 2 ) 82 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/demo/demo_font.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="DynamicFont" load_steps=3 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/demo/unifont-13.0.01.ttf" type="DynamicFontData" id=1] 4 | [ext_resource path="res://addons/teeb.text_transitions/demo/unifont_upper-13.0.01.ttf" type="DynamicFontData" id=2] 5 | 6 | [resource] 7 | size = 32 8 | font_data = ExtResource( 1 ) 9 | fallback/0 = ExtResource( 2 ) 10 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/demo/demo_scene.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=12 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/demo/RichTextLabel.tscn" type="PackedScene" id=1] 4 | [ext_resource path="res://addons/teeb.text_transitions/Debugger.gd" type="Script" id=2] 5 | [ext_resource path="res://addons/teeb.text_transitions/resources/Prickle.tres" type="RichTextEffect" id=3] 6 | [ext_resource path="res://addons/teeb.text_transitions/resources/Redacted.tres" type="RichTextEffect" id=4] 7 | [ext_resource path="res://addons/teeb.text_transitions/resources/WFC.tres" type="RichTextEffect" id=5] 8 | [ext_resource path="res://addons/teeb.text_transitions/resources/Console.tres" type="RichTextEffect" id=6] 9 | [ext_resource path="res://addons/teeb.text_transitions/resources/Word.tres" type="RichTextEffect" id=7] 10 | [ext_resource path="res://addons/teeb.text_transitions/resources/Bounce.tres" type="RichTextEffect" id=8] 11 | [ext_resource path="res://addons/teeb.text_transitions/resources/Embers.tres" type="RichTextEffect" id=9] 12 | 13 | [sub_resource type="GDScript" id=1] 14 | script/source = "tool 15 | extends \"res://addons/teeb.text_transitions/transitions/TransitionBase.gd\" 16 | 17 | 18 | # Syntax: [glide][/glide] 19 | var bbcode = \"glide\" 20 | 21 | 22 | const A1 = ord(\"<\") 23 | const A2 = ord(\">\") 24 | 25 | 26 | var _move_left = false 27 | 28 | 29 | func _process_custom_fx(char_fx): 30 | var t = get_t(char_fx) 31 | 32 | if char_fx.character == A1: 33 | _move_left = true 34 | char_fx.color.a = 0.0 35 | return true 36 | elif char_fx.character == A2: 37 | _move_left = false 38 | char_fx.color.a = 0.0 39 | return true 40 | else: 41 | char_fx.color.a = t 42 | 43 | var s = sin(char_fx.elapsed_time) * .5 + .5 44 | if _move_left: 45 | char_fx.offset.y -= 33 46 | char_fx.color.a = s 47 | else: 48 | char_fx.color.a = 1.0 - s 49 | 50 | # if _move_left: 51 | # char_fx.offset.y = 16.0 - t * 16.0 52 | # else: 53 | # char_fx.offset.y = t * 16.0 - 16.0 54 | return true 55 | " 56 | 57 | [sub_resource type="RichTextEffect" id=2] 58 | resource_name = "Glide" 59 | script = SubResource( 1 ) 60 | 61 | [node name="Node2D" type="Control"] 62 | script = ExtResource( 2 ) 63 | __meta__ = { 64 | "_edit_use_anchors_": false 65 | } 66 | time = 1.0 67 | 68 | [node name="bounce" parent="." instance=ExtResource( 1 )] 69 | margin_left = 36.5651 70 | margin_top = 2.21606 71 | margin_right = 1045.57 72 | margin_bottom = 129.216 73 | bbcode_enabled = true 74 | bbcode_text = "[color=gray]bounce:[/color] [bounce]A long time ago, in a far away place...[/bounce]" 75 | text = "bounce: A long time ago, in a far away place..." 76 | custom_effects = [ ExtResource( 8 ), ExtResource( 6 ), ExtResource( 9 ), SubResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 7 ), null, null ] 77 | length = 16.0 78 | reverse = false 79 | animation_time = 0.5 80 | 81 | [node name="console" parent="." instance=ExtResource( 1 )] 82 | margin_left = 22.345 83 | margin_top = 36.1859 84 | margin_right = 1031.34 85 | margin_bottom = 163.186 86 | bbcode_enabled = true 87 | bbcode_text = "[color=gray]console:[/color] [console id=console]A long time ago, in a far away place...[/console]" 88 | text = "console: A long time ago, in a far away place..." 89 | custom_effects = [ ExtResource( 8 ), ExtResource( 6 ), ExtResource( 9 ), SubResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 7 ), null, null ] 90 | id = "console" 91 | length = 1.0 92 | reverse = false 93 | animation_time = 0.5 94 | 95 | [node name="embers" parent="." instance=ExtResource( 1 )] 96 | margin_left = 39.4702 97 | margin_top = 71.3033 98 | margin_right = 1048.47 99 | margin_bottom = 198.303 100 | bbcode_enabled = true 101 | bbcode_text = "[color=gray]embers:[/color] [embers id=embers]A long time ago, in a far away place...[/embers]" 102 | text = "embers: A long time ago, in a far away place..." 103 | custom_effects = [ ExtResource( 8 ), ExtResource( 6 ), ExtResource( 9 ), SubResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 7 ), null, null ] 104 | id = "embers" 105 | reverse = false 106 | animation_time = 0.5 107 | 108 | [node name="prickle" parent="." instance=ExtResource( 1 )] 109 | margin_left = 25.5704 110 | margin_top = 111.007 111 | margin_right = 1034.57 112 | margin_bottom = 238.007 113 | bbcode_enabled = true 114 | bbcode_text = "[color=gray]prickle:[/color] [prickle id=prickle]A long time ago, in a far away place...[/prickle]" 115 | text = "prickle: A long time ago, in a far away place..." 116 | custom_effects = [ ExtResource( 8 ), ExtResource( 6 ), ExtResource( 9 ), SubResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 7 ), null, null ] 117 | id = "prickle" 118 | length = 16.0 119 | reverse = false 120 | animation_time = 0.5 121 | 122 | [node name="redacted" parent="." instance=ExtResource( 1 )] 123 | margin_left = 10.1619 124 | margin_top = 148.323 125 | margin_right = 1019.16 126 | margin_bottom = 275.323 127 | bbcode_enabled = true 128 | bbcode_text = "[color=gray]redacted:[/color] [redacted id=redacted]A long time ago, in a far away place...[/redacted]" 129 | text = "redacted: A long time ago, in a far away place..." 130 | id = "redacted" 131 | reverse = false 132 | animation_time = 0.5 133 | 134 | [node name="wfc" parent="." instance=ExtResource( 1 )] 135 | margin_left = 91.1592 136 | margin_top = 187.824 137 | margin_right = 1100.15 138 | margin_bottom = 314.824 139 | bbcode_enabled = true 140 | bbcode_text = "[color=gray]wfc:[/color] [wfc id=wfc]A long time ago, in a far away place...[/wfc]" 141 | text = "wfc: A long time ago, in a far away place..." 142 | id = "wfc" 143 | length = 32.0 144 | reverse = false 145 | animation_time = 0.5 146 | 147 | [node name="word" parent="." instance=ExtResource( 1 )] 148 | margin_left = 74.5387 149 | margin_top = 227.713 150 | margin_right = 1083.53 151 | margin_bottom = 354.713 152 | bbcode_enabled = true 153 | bbcode_text = "[color=gray]word:[/color] [word id=word]A long time ago, in a far away place...[/word]" 154 | text = "word: A long time ago, in a far away place..." 155 | id = "word" 156 | length = 4.0 157 | reverse = false 158 | animation_time = 0.5 159 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/demo/unifont-13.0.01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/addons/teeb.text_transitions/demo/unifont-13.0.01.ttf -------------------------------------------------------------------------------- /addons/teeb.text_transitions/demo/unifont_upper-13.0.01.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/addons/teeb.text_transitions/demo/unifont_upper-13.0.01.ttf -------------------------------------------------------------------------------- /addons/teeb.text_transitions/preview.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/preview.png-3465e9336bb95b059dd8c907273895cf.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://addons/teeb.text_transitions/preview.png" 13 | dest_files=[ "res://.import/preview.png-3465e9336bb95b059dd8c907273895cf.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Bounce.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Bounce.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Bounce" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Console.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Console.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Console" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Embers.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Embers.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Embers" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Prickle.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Prickle.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Prickle" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Redacted.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Redacted.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Redacted" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/WFC.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/WFC.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "WFC" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/resources/Word.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="RichTextEffect" load_steps=2 format=2] 2 | 3 | [ext_resource path="res://addons/teeb.text_transitions/transitions/Word.gd" type="Script" id=1] 4 | 5 | [resource] 6 | resource_name = "Word" 7 | script = ExtResource( 1 ) 8 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Bounce.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [bounce][/bounce] 6 | var bbcode = "bounce" 7 | 8 | 9 | func bounce(t, wave=8.0) -> float: 10 | return sin(13.0 * HALFPI * t) * pow(2.0, wave * (t - 1.0)) 11 | 12 | 13 | func _process_custom_fx(char_fx): 14 | var t = get_t(char_fx) 15 | char_fx.offset.y = bounce(t, 8.0) * 8.0 16 | char_fx.color.a *= (1.0 - t) 17 | return true 18 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Console.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | # Should have GlobalCharEffectSettings.fade_distance = 1 5 | 6 | # Syntax: [console][/console] 7 | var bbcode = "console" 8 | 9 | 10 | const CURSOR = ord("█") 11 | const CURSOR_COLOR = Color.greenyellow 12 | 13 | var last_char = -1 14 | 15 | func _process_custom_fx(char_fx): 16 | var tween_data = get_tween_data(char_fx) 17 | 18 | if tween_data.reverse: 19 | # When fading out, just scroll all text up and fade. 20 | char_fx.offset.y -= 32 * (1.0 - tween_data.time) 21 | char_fx.color.a *= pow(tween_data.time, 8.0) 22 | else: 23 | if tween_data.time == 1.0: 24 | # When the transition is over, draw blinking cursor. 25 | if char_fx.absolute_index == last_char and sin(char_fx.elapsed_time * 16.0) > 0.0: 26 | char_fx.character = CURSOR 27 | char_fx.color = CURSOR_COLOR 28 | else: 29 | # Hacky way to find last character. 30 | if char_fx.relative_index == 0: 31 | last_char = -1 32 | # Effect length of 1, since consoles have one cursor. 33 | var t1 = tween_data.get_t(char_fx.absolute_index, false) 34 | var t2 = tween_data.get_t(char_fx.absolute_index+1, false) 35 | if t1 > 0.0 and char_fx.character != SPACE: 36 | if t1 != t2: 37 | char_fx.character = CURSOR 38 | char_fx.color = CURSOR_COLOR 39 | else: 40 | char_fx.character = SPACE 41 | 42 | if char_fx.absolute_index > last_char: 43 | last_char = char_fx.absolute_index 44 | return true 45 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Embers.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [embers color][/embers] 6 | var bbcode = "embers" 7 | 8 | 9 | const EMBER = ord(".") 10 | 11 | 12 | func _process_custom_fx(char_fx): 13 | var tween_data = get_tween_data(char_fx) 14 | 15 | if tween_data.time == 1.0: 16 | return true 17 | var scale = char_fx.env.get("scale", 16.0) 18 | var clr1 = char_fx.env.get("color") 19 | if clr1 == null: 20 | clr1 = Color.red 21 | else: 22 | clr1 = tween_data.get_color(clr1) 23 | var clr2 = clr1 24 | clr2.a = 0.0 25 | 26 | var t = tween_data.get_t(char_fx.absolute_index) 27 | var t2 = tween_data.get_t(char_fx.absolute_index+1) 28 | var r = get_rand(char_fx) * PI * 2.0 29 | # Comment out the next three lines to have it be the letter itself. 30 | # if t != t2: 31 | # char_fx.character = EMBER 32 | # char_fx.offset -= Vector2(16, 8) 33 | char_fx.color = lerp(char_fx.color, lerp(clr1, clr2, t), t) 34 | char_fx.offset += Vector2(cos(r) * scale * t, sin(r) * scale * t) 35 | return true 36 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Prickle.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [prickle pow][/prickle] 6 | var bbcode = "prickle" 7 | 8 | 9 | func _process_custom_fx(char_fx): 10 | var power = char_fx.env.get("pow", 2.0) 11 | var t = get_t(char_fx) 12 | var r = get_rand(char_fx) 13 | var a = clamp(t * 2.0 - r, 0.0, 1.0) 14 | a = pow(a, power) 15 | char_fx.color.a = 1.0 - a 16 | return true 17 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Redacted.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [redacted freq wave][/redacted] 6 | var bbcode = "redacted" 7 | 8 | 9 | const BLOCK = ord("█") 10 | const MID_BLOCK = ord("▓") 11 | 12 | 13 | func _process_custom_fx(char_fx): 14 | var tween_data = get_tween_data(char_fx) 15 | var t1 = tween_data.get_t(char_fx.absolute_index, false) 16 | var t2 = tween_data.get_t(char_fx.absolute_index+1, false) 17 | 18 | if tween_data.reverse: 19 | char_fx.color.a = 1.0 - t1 20 | if t1 != t2: 21 | char_fx.character = MID_BLOCK 22 | else: 23 | if t1 > 0.0 and (char_fx.character != SPACE or char_fx.relative_index % 2 == 0): 24 | var freq:float = char_fx.env.get("freq", 1.0) 25 | var scale:float = char_fx.env.get("scale", 1.0) 26 | char_fx.character = MID_BLOCK if t1 != t2 else BLOCK 27 | char_fx.color = Color.black 28 | char_fx.offset.y -= sin(char_fx.absolute_index * freq) * scale 29 | return true 30 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/TransitionBase.gd: -------------------------------------------------------------------------------- 1 | extends RichTextEffect 2 | 3 | 4 | const HALFPI = PI / 2.0 5 | const SPACE = ord(" ") 6 | 7 | 8 | func get_color(s) -> Color: 9 | if s is Color: return s 10 | elif s[0] == '#': return Color(s) 11 | else: return ColorN(s) 12 | 13 | 14 | # Just a way to get a consistent seed value for randomized animations. 15 | func get_rand(char_fx): 16 | return fmod(get_rand_unclamped(char_fx), 1.0) 17 | 18 | 19 | func get_rand_unclamped(char_fx): 20 | return char_fx.character * 33.33 + char_fx.absolute_index * 4545.5454 21 | 22 | 23 | func get_rand_time(char_fx, time_scale=1.0): 24 | return char_fx.character * 33.33 + char_fx.absolute_index * 4545.5454 + char_fx.elapsed_time * time_scale 25 | 26 | 27 | func get_tween_data(char_fx): 28 | var id = char_fx.env.get("id", "main") 29 | if not id in TextTransitionSettings.transitions: 30 | prints("(TransitionBase) No RichTextTransition with id", id, "is registered.") 31 | else: 32 | return TextTransitionSettings.transitions[id] 33 | 34 | 35 | func get_t(char_fx): 36 | return get_tween_data(char_fx).get_t(char_fx.absolute_index) 37 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/WFC.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [wfc][/wfc] 6 | var bbcode = "wfc" 7 | 8 | 9 | const ONE = ord("1") 10 | const ZERO = ord("0") 11 | 12 | 13 | func _process_custom_fx(char_fx): 14 | var t = 1.0 - get_t(char_fx) 15 | var r = get_rand(char_fx) 16 | var a = clamp(t * 2.0 - r * t, 0.0, 1.0) 17 | if a != 1.0 and char_fx.character != SPACE: 18 | char_fx.character = ZERO if sin(get_rand_time(char_fx, 16.0)) > 0.0 else ONE 19 | char_fx.color.r = 0.0 20 | char_fx.color.g = 0.0 21 | char_fx.color.b = 0.0 22 | a *= .5 23 | char_fx.color.a = t 24 | return true 25 | -------------------------------------------------------------------------------- /addons/teeb.text_transitions/transitions/Word.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends "res://addons/teeb.text_transitions/transitions/TransitionBase.gd" 3 | 4 | 5 | # Syntax: [word][/word] 6 | var bbcode = "word" 7 | 8 | 9 | const SPLITTERS = [ord(" "), ord("."), ord(",")] 10 | 11 | 12 | var _index = 0 13 | var _last = 999 14 | 15 | 16 | func _process_custom_fx(char_fx): 17 | if char_fx.absolute_index < _last or char_fx.character in SPLITTERS: 18 | _index = char_fx.absolute_index 19 | 20 | _last = char_fx.absolute_index 21 | var tween_data = get_tween_data(char_fx) 22 | var t = 1.0 - tween_data.get_t(_index) 23 | char_fx.color.a *= t 24 | return true 25 | -------------------------------------------------------------------------------- /default_env.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Environment" load_steps=2 format=2] 2 | 3 | [sub_resource type="ProceduralSky" id=1] 4 | 5 | [resource] 6 | background_mode = 2 7 | background_sky = SubResource( 1 ) 8 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/icon.png -------------------------------------------------------------------------------- /icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://icon.png" 13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=4 10 | 11 | _global_script_classes=[ ] 12 | _global_script_class_icons={ 13 | 14 | } 15 | 16 | [application] 17 | 18 | config/name="text_effects" 19 | config/icon="res://icon.png" 20 | 21 | [autoload] 22 | 23 | TextTransitionSettings="*res://addons/teeb.text_transitions/TextTransitionSettings.gd" 24 | 25 | [rendering] 26 | 27 | quality/driver/driver_name="GLES2" 28 | vram_compression/import_etc=true 29 | vram_compression/import_etc2=false 30 | environment/default_environment="res://default_env.tres" 31 | -------------------------------------------------------------------------------- /readme/effect_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/readme/effect_preview.png -------------------------------------------------------------------------------- /readme/effect_preview.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/effect_preview.png-a1569a0d6f325ab003504a8900713558.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://readme/effect_preview.png" 13 | dest_files=[ "res://.import/effect_preview.png-a1569a0d6f325ab003504a8900713558.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /readme/trans_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teebarjunk/godot-text_effects/1349b82eaae2734f3d9e4942acb3b2f282e3bceb/readme/trans_preview.png -------------------------------------------------------------------------------- /readme/trans_preview.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/trans_preview.png-841cbd5055d68ca3229faaef892172d7.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://readme/trans_preview.png" 13 | dest_files=[ "res://.import/trans_preview.png-841cbd5055d68ca3229faaef892172d7.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | --------------------------------------------------------------------------------