NGL@0.10.4 Home Manual Reference Source GalleryRepository
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 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 get type: string 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