User Tools

Site Tools


dragengine:modules:dragonscript:behavior_outline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
dragengine:modules:dragonscript:behavior_outline [2020/05/24 01:11] – [Element Class Example] dragonlorddragengine:modules:dragonscript:behavior_outline [2020/05/24 10:34] – [Element Class Properties] dragonlord
Line 67: Line 67:
 ====== Element Class Properties ====== ====== Element Class Properties ======
  
-Element class properties have the prefix **outline{(id)}.**.+Element class properties have the prefix **outline.** or **outline(id).** if id is not empty.
  
 ===== skin ===== ===== skin =====
Line 94: Line 94:
   * Full name: "outline{(id)}.color"   * Full name: "outline{(id)}.color"
   * Type ECPColor   * Type ECPColor
-  * Default value //white (111)//+  * Default value //black (000)//
   * Example (*.deeclass) <code xml><color name='outline.color' r='1' g='0' b='0'/></code>   * Example (*.deeclass) <code xml><color name='outline.color' r='1' g='0' b='0'/></code>
  
Line 131: Line 131:
 Since DragonScript Module Version **1.1** Since DragonScript Module Version **1.1**
  
 +====== Use Cases ======
 +  * Highlight objects player can interact with. Combine this with [[behavior_lookedat|ECBehaviorLookedAt]] using a listening to show/hide the highlight if the player looks at the object.
 +  * Use for Toon-Rendering to draw a black outline on all objects.
 ====== Element Class Example ====== ====== Element Class Example ======
  
Line 145: Line 148:
      outline = ECBehaviorOutline.new(this, component, collider)      outline = ECBehaviorOutline.new(this, component, collider)
            
-     // set parameters of outline behavior to red color with 0.0075 thickness using a custom "outline.deskin" skin+     // set parameters of outline behavior to red color with 0.0075 thickness 
 +     // using a custom "outline.deskin" skin
      outline.getSkin().setPath("outline.deskin")      outline.getSkin().setPath("outline.deskin")
      outline.getColor().setColor(Color.red)      outline.getColor().setColor(Color.red)
dragengine/modules/dragonscript/behavior_outline.txt · Last modified: 2024/03/14 16:55 by dragonlord