Giter Site home page Giter Site logo

jsgame0's People

Contributors

thisarray avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jsgame0's Issues

fullscreen support

I wonder if this would work, or if you would be interested in full-screen support.

I just used element.requestFullscreen() where element was set to document.getElementById('screen')

Native browser support should be detected and if available, maybe ui surfaced, like the pause. <Esc> key exits fullscreen on my mac, linux and windows, but happy to hear if there would be blockers, or you are not interested, or would rather add what is virtually a one-liner yourself.

Very cool little library, I was actually searching the internet to try to find if anyone has refactored the examples given, and it seems several people have.

Paused game, seems not to pause audio

Wondering if an interesting difference might be ambient sound, versus state-specific sound, but when I pause, this thing keeps making noise. Not sure if mute is an idea, or a config for mute on pause could or should be added to the engine.

I sort-of hacked something naughty together, which I am sure is wrong

[...document.querySelectorAll('audio')].forEach(async (elem) => await elem.pause())

It seems unpausing automatically schedules all the sounds I would want, so I don't know if this is too blunt an instrument but it seems to work for me.

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.