Code Monkey home page Code Monkey logo

mandarina's Introduction

TypeScript UNITY HTML5 CSS3

GitHub stats Top Langs A


Trophies


mandarina's People

Contributors

lajbel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

meowcatheorange

mandarina's Issues

Deno support

Would be cool to have the Deno Package in deno.land

As `MandarinaPlugin` use in mandarina() method

https://api.github.com/lajbel/mandarina/blob/740c4650eea3b076b5a0d866b417d4bbfb18a4d9/src/main.ts#L93

        plugins: [ mandarinaPlugin, layerPlugin ],
    });

    const extractedPluginCtx: Partial<MandarinaPlugin> = {};

    // get plugin context
    Object.keys(k).forEach((key) => {
        if (Object.keys(mandarinaPluginCtx).includes(key)) {
            extractedPluginCtx[key] = k[key];
        }
    });

    if (!extractedPluginCtx) throw new Error("Mandarina plugin not found");

    // TODO: As `MandarinaPlugin` use in mandarina() method
    mandarinaPluginCtx = extractedPluginCtx as MandarinaPlugin;

    startNovel(mandarinaPluginCtx, opt);

    return extractedPluginCtx as MandarinaPlugin;
}

export function getGameData(): GameData {

Is necessary an stopAudio()?

Maybe when user define channels, the user can define if audio must stop when another

audio is played in the same channel.

Another options is define some channels by default (music, sounds, voices, etc.).

https://api.github.com/lajbel/mandarina/blob/8881e14c2a958715eeeb4faef717af768f923dcb/src/actions/audio.ts#L6

import { getGameData } from "../main";
import { createAction } from "../game";

// TODO: Is necessary an stopAudio()?
// Maybe when user define channels, the user can define if audio must stop when another
// audio is played in the same channel.
// Another options is define some channels by default (music, sounds, voices, etc.).
export function playAudio(
    channel: string,
    audio: string,

Maybe instead of use playSound and playMusic use play(channel)

https://api.github.com/lajbel/mandarina/blob/05c9a3f0ef38379722dce27f3901b5e3a8e25adf/src/actions/audio.ts#L6

// All audio related actions
import type * as KA from "kaboom";
import { getGameData } from "../main";
import { createAction } from "../game";

// TODO: Maybe instead of use playSound and playMusic use play(channel)
export function playSound(audio: string) {
    const { k } = getGameData();
    let audioPlay: KA.AudioPlay;

    // TODO: Accept an audio options object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.