JSPM

@vnve/template

1.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 15
    • Score
      100M100P100Q46344F
    • License MIT

    vnve's video templates in order to make creating visual novel videos quicker

    Package Exports

    • @vnve/template

    Readme

    Install

    npm install @vnve/core @vnve/template

    Usage

    import { Creator } from "@vnve/core";
    import { TitleScene, DialogueScene } from "@vnve/template";
    
    const creator = new Creator();
    // Create a title scene
    const titleScene = new TitleScene({
      title: "V N V E",
      subtitle: "Make video programmatically",
      backgroundImgSource: "img url",
      soundSources: [{ source: "sound url" }],
      duration: 3000,
    })
    
    // Create a dialog scene
    const dialogueScene = new DialogueScene({
      lines: [
        {
          name: "Character A",
          content: "Charater A says..."
        },
        {
          name: "Character B",
          content: "Charater B says..."
        }
      ],
      backgroundImgSource: "img url",
      soundSources: [{ source: "sound url" }],
    });
    
    // Add scenes
    creator.add(titleScene)
    creator.add(dialogueScene)
    
    // Start creating videos
    creator.start().then(videoBlob => {
      URL.createObjectURL(videoBlob)  // Wait a few moments and you'll get an mp4 file
    })

    Open in CodeSandbox