NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import Script from 'ngl/src/script.js'
public class | source

Script

Script class

Constructor Summary

Public Constructor
public

constructor(functionBody: String, name: String, path: String)

Create a script instance

Member Summary

Public Members
public

dir

public

fn

public
public
public
public get

Object type

Method Summary

Public Methods
public

call(stage: Stage): Promise

Execute the script

Public Constructors

public constructor(functionBody: String, name: String, path: String) source

Create a script instance

Params:

NameTypeAttributeDescription
functionBody String

the function source

name String

name of the script

path String

path of the script

Public Members

public dir source

public fn source

public name source

public path source

public signals source

public get type source

Object type

Public Methods

public call(stage: Stage): Promise source

Execute the script

Params:

NameTypeAttributeDescription
stage Stage

the stage context

Return:

Promise

resolve when script finished running