Skip to content

Commit 991a419

Browse files
committed
docs: add instructions for fire with particles
1 parent a6b60ca commit 991a419

2 files changed

Lines changed: 23 additions & 12 deletions

File tree

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Some configuration examples:
1919

2020
| Smooth cursor without smear | Fire hazard |
2121
| --- | --- |
22-
| ![Image](https://github.com/user-attachments/assets/47950a0c-2bbe-4148-b633-fea6d5e1f985) | ![Image](https://github.com/user-attachments/assets/ba847071-f918-4e8f-ae74-169a31e05368) |
22+
| ![Image](https://github.com/user-attachments/assets/47950a0c-2bbe-4148-b633-fea6d5e1f985) | ![Image](https://github.com/user-attachments/assets/b938ba82-6238-4113-b253-a52421828f85) |
2323

2424
<!-- panvimdoc-ignore-end -->
2525

@@ -141,16 +141,27 @@ You can also change the "bounciness" of the smear by adjusting the `damping` and
141141
>
142142
> Feel free to experiment with all the configuration options, but be aware that some combinations may cause your cursor to flicker or even **catch fire**. That can happen with the following settings:
143143
> ```lua
144-
> opts = {
145-
> cursor_color = "#ff8800",
146-
> stiffness = 0.3,
147-
> trailing_stiffness = 0.1,
148-
> damping = 0.5,
149-
> trailing_exponent = 5,
150-
> never_draw_over_target = true,
151-
> hide_target_hack = true,
152-
> gamma = 1,
153-
> }
144+
> opts = {
145+
> cursor_color = "#ff4000",
146+
> particles_enabled = true,
147+
> stiffness = 0.5,
148+
> trailing_stiffness = 0.2,
149+
> trailing_exponent = 5,
150+
> damping = 0.6,
151+
> gradient_exponent = 0,
152+
> gamma = 1,
153+
> never_draw_over_target = true, -- if you want to actually see under the cursor
154+
> hide_target_hack = true, -- same
155+
> particle_spread = 1,
156+
> particles_per_second = 500,
157+
> particles_per_length = 50,
158+
> particle_max_lifetime = 800,
159+
> particle_max_initial_velocity = 20,
160+
> particle_velocity_from_cursor = 0.5,
161+
> particle_damping = 0.15,
162+
> particle_gravity = -50,
163+
> min_distance_emit_particles = 0,
164+
> }
154165
> ```
155166
156167
</details>

lua/smear_cursor/config.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ M.max_length_insert_mode = 1
138138

139139
-- Particles configuration -----------------------------------------------------
140140

141-
M.particles_enabled = false
141+
M.particles_enabled = false -- When true, better to also set `never_draw_over_target` to true
142142
M.particle_max_num = 100
143143
M.particle_spread = 0.5 -- 0: no spread, 1: spread over entire cursor
144144
M.particles_per_second = 200

0 commit comments

Comments
 (0)