Effect

Effect

new Effect(name, dataopt)

Source:

Creates an instance of Effect.

Example
// creates an effect
const { Effect } = require('lucid-dream');
const effect = new Effect('foo');
Parameters:
Name Type Attributes Default Description
name String

The name of the effect.

data Object <optional>
{}

An object containing the attributes to define the effect.

Methods

toDict() → {Object}

Source:

Encode an effect into a dictionary

Example
// returns encoded effect dictionary
const { Effect } = require('lucid-dream');
const effect = new Effect('foo', {});
effect.toDict();
Returns:

An object containing the encoded effect dicitonary

Type
Object