Code Monkey home page Code Monkey logo

frame's Introduction

Frame

A simple double-buffer for your screens

Usage:

Download the file, then load it via require

Once loaded, the following function is available:

Frame.new(<terminal object>)

Frame does not overwrite the terminal object, but rather returns a new object that wraps it. The terminal object can be a monitor, the CC terminal, even a terminal in your overlay glasses (if you're cool enough to have one).

Once you create a Frame Buffer, you can use it just any other terminal object. Some functions which edit particular parts of a terminal object don't exist, however (like, for example, setPaletteColor). There are a few functions which this adds, however.

FrameBuffer.Initialize()

The most important function. This function will initialize (or reinitialize) the buffers. All calls to anything in a Frame Buffer will likely error without calling this function first.

This function also handles terminal size. If you resize the terminal, you need to call this. Take note that it will clear anything currently on the buffers.

FrameBuffer.PushBuffer()

This function will compare the first buffer to the second buffer, and if any updates need to occur, will update the screen.

FrameBuffer.PostRedisplay()

This function will set a flag that will, upon your next call to FrameBuffer.PushBuffer() force the whole screen to update no matter what, even if nothing changed.

frame's People

Contributors

fatboychummy avatar

Watchers

 avatar  avatar

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.