sb.env("string_key"[,"string_key2, "string_key3"])
Return information about the Storyboard runtime environment. The input is one or more strings that match the key to look up. The following table describes the available keys:
version - The version of this engine as a string value. The format of the string is four version numbers separated by dots: major.minor.service.build.
target_os - The target operating system
target_cpu - The target processor
renderer - The name of the graphics rendering technology being used.
screen_width - The dimensions of the screen width
screen_height - The dimensions of the screen height
active_screen - The name of the currently active screen
render_caps - The rendering capabilities. Currently the only defined capability is "3d" if 3D rendering is supported
mem_stats - Platform memory statistics for the engine. The results are returned in an object where string keys, indicating the type of memory value being reported, and number values in bytes. Not all platforms support querying all statistics so this field may be null or the individual field values may be set to 0 indicating that the platform can not provide the requested level of detail. The key process_used returns the number of bytes of memory that is being used by the Storyboard Engine process. The key heap_used returns the number of bytes of memory that is specifically being used by the heap. This number is usually smaller than the process memory and does not typically include large memory allocations for display framebuffers or memory mapped files.
greio_channel - The current application's IO channel name.
Parameters: key One or multiple keys to look up the environment for
Example: var os = sb.env("target_os"); print("Running on target OS: " + os.os)); // Report on the Storyboard version and rendering technology var info = sb.env("version", "renderer"); var msg = "Storyboard version" + info.version.toString() + "(" + info.renderer.toString() + "renderer)"; print(msg);