0.2.11 • Published 1 year ago

@volley/solid-scenes v0.2.11

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
1 year ago

@volley/solid-scenes

Scene binding and management support for skills using @volley/solid and @volley/solid-gev

Motivation

Scene classes and scene transitions need to be bound properly before a skill can run successfully.

Examples

Example usage in a sample skill

@sessionBinder()
export class SessionBinder extends Binder {

    async bind(container: Container) {
        
        container
            .bind(ISkill)
            .to(DiceGame)
            .inSingletonScope()

        container
            .bind(BufferedInteractor)
            .toSelf()
            .inSingletonScope()

        container
            .bind(tokens.MermaidPath)
            .toConstantValue("./src/skill/transitions.mmd")

        await installSceneSupport(container)            
        
    }
}

By calling the provided installSceneSupport:

  • The SceneBinder is able to gather all the scene classes decorated with @scene and bind them to the appropriate keys
  • The MermaidBinder is able to parse the mermaid file provided by the skill author and gather the scene transition information. Then, it can bind the transitions (transition key -> scene) (i.e. EntryScene.onEntryDone -> IntroScene)
export const installSceneSupport = async (container: Container) => {

    const sceneBinder = new SceneBinder();
    await sceneBinder.bind(container);

    const mermaidBinder = new MermaidBinder();
    await mermaidBinder.bind(container);

    installTransitions(container);

}
0.2.11

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.9

1 year ago

0.0.9-0

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago