Function
Static Public Summary | ||
public |
Background(width: number, height: number, radius: number[]) Background extends THREE.Mesh (an Object3D) and is used to render a background panel for a Three node. |
|
public |
BackgroundGeometry(width: number, height: number, radius: number[]) |
|
public |
BorderGeometry(lineWidth: number[], width: number, height: number, radius: number[]) |
|
public |
BorderLine(lineWidth: number[], width: number, height: number, radius: number[]) BorderLine extends THREE.Mesh (an Object3D) and is used to render the box border set by KSS |
|
public |
getScriptContext(err: Error): Object When the browser encounters an error it creates an “Error Stack” which contains within it the location where the error ocurred right down to the file’s URL, line number, and character. |
|
public |
getScriptPath(err: Error): string A helper function that returns just path See getScriptContext for info on how this works. |
|
public |
getScriptPathname(err: Error): string A helper function that returns the path and name of the calling script See getScriptContext for info on how this works. |
|
public |
getScriptURL(err: Error): string A helper function that returns just the URL of the calling script See getScriptContext for info on how this works. |
|
public |
A shorthand function for getting a localized date |
|
public |
A shorthand function for getting a localized date or time string using your own options |
|
public |
A shorthand function for getting a localized date and time |
|
public |
A shorthand function for getting a translation |
|
public |
styleInfoComparator(info1: *, info2: *): number A sort comparator that sorts {StyleInfo}s from most to least important/specific/load-order |
|
public |
|
Static Public
public Background(width: number, height: number, radius: number[]) source
import Background from 'potassium-es/src/three/Background.js'
Background extends THREE.Mesh (an Object3D) and is used to render a background panel for a Three node. Unlike the DOM's background, this Background is designed to float a few centimeters behind the node's BorderLine.
public BackgroundGeometry(width: number, height: number, radius: number[]) source
import {BackgroundGeometry} from 'potassium-es/src/three/Background.js'
public BorderGeometry(lineWidth: number[], width: number, height: number, radius: number[]) source
import {BorderGeometry} from 'potassium-es/src/three/BorderLine.js'
public BorderLine(lineWidth: number[], width: number, height: number, radius: number[]) source
import BorderLine from 'potassium-es/src/three/BorderLine.js'
BorderLine extends THREE.Mesh (an Object3D) and is used to render the box border set by KSS
public getScriptContext(err: Error): Object source
import {getScriptContext} from 'potassium-es/src/ScriptContext.js'
When the browser encounters an error it creates an “Error Stack” which contains within it the location where the error ocurred right down to the file’s URL, line number, and character. This means a script can know its source code’s URL and we can even pass arguments through the URL itself! Hold on to your hats because this is JSONP without the server!! We must call “new Error()” in the file we want to inspect the context of, and then pass that as an argument into here:
Params:
Name | Type | Attribute | Description |
err | Error | a JS Error created in the script for which you want context |
Example:
import {getScriptContext} from './ScriptContext.js'
const context = getScriptContext(new Error)
context.url // {string} URL of this script
public getScriptPath(err: Error): string source
import {getScriptPath} from 'potassium-es/src/ScriptContext.js'
A helper function that returns just path See getScriptContext for info on how this works.
Params:
Name | Type | Attribute | Description |
err | Error | a JS Error created in the script for which you want context |
Return:
string | path like |
Example:
import {getScriptPath} from './ScriptContext.js'
const path = getScriptPath(new Error) // '/path/to/' (does not include the script name)
public getScriptPathname(err: Error): string source
import {getScriptPathname} from 'potassium-es/src/ScriptContext.js'
A helper function that returns the path and name of the calling script See getScriptContext for info on how this works.
Params:
Name | Type | Attribute | Description |
err | Error | a JS Error created in the script for which you want context |
Example:
import {getScriptPathname} from './ScriptContext.js'
const path = getScriptPathname(new Error) // '/path/to/script.js'
public getScriptURL(err: Error): string source
import {getScriptURL} from 'potassium-es/src/ScriptContext.js'
A helper function that returns just the URL of the calling script See getScriptContext for info on how this works.
Params:
Name | Type | Attribute | Description |
err | Error | a JS Error created in the script for which you want context |
Example:
import {getScriptURL} from './ScriptContext.js'
const url = getScriptURL(new Error) // `https://some-domain/path/to/script.js`
public ld(date: Date, long: bool, options: options): string source
import {ld} from 'potassium-es/src/Localizer.js'
A shorthand function for getting a localized date
public ldo(date: Date, options: options): string source
import {ldo} from 'potassium-es/src/Localizer.js'
A shorthand function for getting a localized date or time string using your own options
public ldt(date: Date, long: bool, options: options): string source
import {ldt} from 'potassium-es/src/Localizer.js'
A shorthand function for getting a localized date and time
public lt(key: string, defaultValue: string): string source
import {lt} from 'potassium-es/src/Localizer.js'
A shorthand function for getting a translation
public styleInfoComparator(info1: *, info2: *): number source
import {styleInfoComparator} from 'potassium-es/src/style/StyleInfo.js'
A sort comparator that sorts {StyleInfo}s from most to least important/specific/load-order
Params:
Name | Type | Attribute | Description |
info1 | * | ||
info2 | * |