Skip to content

Commit

Permalink
Improve beam blueprint annotations (#6450)
Browse files Browse the repository at this point in the history
Add descriptions so a novice can understand beam blueprints.
  • Loading branch information
lL1l1 authored Sep 17, 2024
1 parent d8c9268 commit 9539644
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
1 change: 1 addition & 0 deletions changelog/snippets/other.6450.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#6450) Improve beam blueprint annotations with thorough descriptions of beam parameters.
26 changes: 17 additions & 9 deletions engine/Core/Blueprints/BeamBlueprint.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
---@meta

---@alias BeamBlendmode
---| 0 # Alpha blend
---| 1 # Modulate Inverse
---| 2 # Modulate2X Inverse
---| 3 # Add
---| 4 # Premodulated Alpha

---@class BeamBlueprint : EmitterBlueprint
---@field Length number Total length of beam
---@field Lifetime number Lifetime of the emitter
---@field Thickness number Thickness of the beam
---@field TextureName FileName Filename of texture
---@field StartColor NamedQuaternion RGBA start color of beam
---@field EndColor NamedQuaternion RGBA end color of beam
---@field UShift number U Texture shift of beam texture
---@field VShift number V Texture shift of beam texture
---@field RepeatRate number How often the texture repeats per ogrid blendmode of this beam
---@field Length number # Total length of beam
---@field Lifetime number # Lifetime of the emitter
---@field Thickness number # Thickness of the beam in both directions from the center
---@field TextureName FileName # Filename of texture
---@field StartColor NamedQuaternion # Color multiplier from 0 to 1 of beam texture at start point. `w, x, y, z = ARGB`
---@field EndColor NamedQuaternion # Color multiplier from 0 to 1 of beam texture at end point. `w, x, y, z = ARGB`
---@field UShift number # Proportional shift of beam texture per tick in the U direction (across width of beam, X direction of texture)
---@field VShift number # Proportional shift of beam texture per tick in the V direction (across the length of the beam, Y direction of texture)
---@field RepeatRate number # How often the texture repeats per ogrid. `0` stretches the texture over the length of the beam.
---@field Blendmode BeamBlendmode # Blend mode of the beam.
8 changes: 4 additions & 4 deletions engine/Core/Blueprints/EffectBlueprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
---@field z number

---@class NamedQuaternion
---@field x number
---@field y number
---@field z number
---@field w number
---@field x number # Red
---@field y number # Green
---@field z number # Blue
---@field w number # Alpha

0 comments on commit 9539644

Please sign in to comment.