๐Ÿ“š
DimX Bonfire & Sparks
  • ๐Ÿ‘‹Welcome to Bonfire
  • ๐ŸŽŸ๏ธFundamentals
    • ๐Ÿ› ๏ธGetting Started
      • ๐Ÿ“˜Bonfire Tutorial Videos
      • โšกSupercharge Your Workflow with ChatGPT for Bonfire
      • ๐Ÿ“ฆInstallation Instructions
      • ๐Ÿ‘ชAccount Setup
      • ๐Ÿš€The Bonfire Launcher
      • ๐ŸŽฎInterface Guide and Controls
      • ๐ŸงฑCore Concepts
      • โฌ‡๏ธDownloading Spark Content
      • ๐Ÿ–ฅ๏ธPlatform Support
      • ๐Ÿ“–Bonfire Lite vs Pro
    • ๐Ÿ”จBuilder
      • ๐ŸงฐStart Building
      • ๐Ÿ“–Menu
      • ๐Ÿ”งThe Toolbar
      • ๐ŸชŸPanels
      • ๐Ÿง™โ€โ™‚๏ธBuilt-in Content
      • ๐Ÿง™โ€โ™‚๏ธUser-Generated Content
      • ๐ŸƒBehavior Nodes
      • โ„น๏ธTraits
      • ๐Ÿ—’๏ธPresets
    • โ–ถ๏ธPlayer
    • ๐Ÿ—บ๏ธMapifier
    • ๐ŸŒฉ๏ธSparkifier
    • โšกSparks
  • ๐Ÿ”ฅEmber
    • Base API
    • Extended API
      • Intrinsics
        • InvokeOutput
        • Mod
        • SparkRef
      • Return Types
        • Spark (ValMap)
          • Traits (ValMap)
    • Important Notes and Best Practices
  • โ›๏ธDiving Deeper
    • Bonfire Best Practices
    • Workarounds
    • Tips and Tricks
  • Release Notes
    • Bonfire v1.18.8.1
    • Bonfire v1.18.7.3
    • Bonfire v1.18.6
    • Bonfire v1.18.5
    • Bonfire v1.18.4
    • Bonfire v1.18.3
    • Bonfire v1.18.2
    • Bonfire v1.18.1
    • Bonfire v1.18.0
    • Bonfire v1.17.0
    • Bonfire v1.16.0
    • Bonfire v1.15.0
  • Links
    • Support Site
    • Bonfire Tutorial Videos Playlist
Powered by GitBook
On this page
  • Syntax
  • Description
  • Sample Usage
  • Adjust the altitude and position traits of a spark called "Spark 1"
  • Changing the Background Color of a Button Using Both RGBA and Hex Formats
  • Adding Bullet Points in Text Using Unicode Hex Values โ€œ\u2022โ€ in Ember Script

Was this helpful?

  1. Ember
  2. Extended API
  3. Intrinsics

SparkRef

Syntax

[var name] = sparkref(โ€œ[spark instance name]โ€)

Return: ValMap in the โ€œSparkโ€ format

Description

PLEASE NOTE: This is currently a MEMORY HEAVY API, so use it wisely.

Used for cases where a Spark Instance needs to be modified many times within the same script. This could be multiple traits on the same instance or the same traits modified multiple times (as in the case of a for or while loop).

Sample Usage

Adjust the altitude and position traits of a spark called "Spark 1"

spark =  sparkref("Spark 1")
spark.traits.altitude = 3
spark.traits.position.value = "(0,1)" 

Changing the Background Color of a Button Using Both RGBA and Hex Formats

button  =  sparkref("Button")
print button.traits.backgroundColor.value
button.traits.backgroundColor.value = "(0.5,0,0,0.5)"
button.traits.backgroundColor.value = "#FF0000FF"

Adding Bullet Points in Text Using Unicode Hex Values โ€œ\u2022โ€ in Ember Script

content = sparkref("Text")
content.traits.text.value = "\u2022Hello World"

PreviousModNextReturn Types

Last updated 1 month ago

Was this helpful?

๐Ÿ”ฅ