패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.14.1

malison

브라우저용 작은 터미널 UI 패키지입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
521
좋아요
11
Pub 점수
140

패키지 설치

flutter pub add malison

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Malison은 웹 애플리케이션을 위한 경량의 터미널 스타일 사용자 인터페이스 패키지로, 개발자가 브라우저에서 바로 레트로 감성의 텍스트 기반 인터페이스를 만들 수 있도록 설계되었습니다. Flutter로 구축되어 있으며, 상호작용 가능한 명령줄 경험을 지원하며, 터미널 미학을 활용할 수 있는 게임이나 도구에 이상적입니다. 이 패키지는 모바일 및 데스크톱을 포함한 여러 플랫폼과 원활하게 통합되며, 크로스플랫폼 개발에 매우 유연합니다. Dart의 기능을 활용하여 콘솔처럼 출력 및 입력을 효율적으로 렌더링하고 관리합니다.

사용 사례

  • 브라우저 기반 텍스트 어드벤처 게임 만들기
  • 웹 앱용 터미널 에뮬레이터 구축
  • 인터랙티브 명령줄 도구 개발
  • 레트로 컴퓨팅 환경 시뮬레이션
  • 웹 애플리케이션에서 디버그 콘솔 구현하기

주요 기능

  • 터미널 스타일의 UI 렌더링
  • 크로스 플랫폼 호환성
  • 간단한 명령 입력 처리
  • 경량이고 빠른 성능
  • ANSI 이스케이프 코드를 지원합니다
  • 내장 텍스트 포맷팅 및 스타일링

적합한 대상

  • 웹 브라우저를 대상으로 하는 게임 개발자
  • 상호작용형 교육 도구의 제작자
  • CLI 유사 웹 인터페이스 개발자
  • 레트로 게임 미학의 팬
  • 최소 UI 프레임워크를 찾는 개발자

고려 사항

  • 터미널 스타일 디자인 패턴에 한정
  • 복잡한 그래픽 인터페이스에 적합하지 않습니다
  • 콘솔/터미널 개념에 익숙해야 합니다
  • 일반적인 사용자 인터페이스 요구 사항보다는 특수한 용도에 적합
  • 고급 상호작용을 위해 추가 로직이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Malison is a small Dart library for drawing old school ASCII terminals in the browser. I harvested it from my roguelike game, Hauberk and it's aimed primarily at web games ASCII graphics. Think of it like curses for the web.

Using it

Add it to your package's pubspec:

dependencies:
  malison: any

Then use the library:

import 'dart:html';

import 'package:malison/malison.dart';

void main() {
  // Create or query a <canvas> element to bind it to.
  var canvas = new CanvasElement();
  document.body.children.add(canvas);

  // Create a new terminal. CanvasTerminal uses your browser's fonts.
  // RetroTerminal uses a built in DOS-style Code Page 437 font.
  var terminal = new RetroTerminal.dos(80, 40, canvas);

  // You can draw strings at given positions.
  terminal.writeAt(0, 0, "This is a terminal!");

  // You can control the foreground and background color.
  terminal.writeAt(0, 1, "This is blue on green", Color.blue, Color.green);

  // You can also draw individual glyphs -- character+color units.
  terminal.drawGlyph(3, 4, new Glyph.fromCharCode(CharCode.blackHeartSuit,
      Color.red, Color.white));

  // When you're done drawing, tell it to render all of the changes. It renders
  // in batches for performance.
  terminal.render();
}

Example

The repo includes a little example web application so you can see it in action. From the root of repo, run:

$ dart run build_runner serve

Then in your browser of choice, navigate to http://localhost:8080.

카테고리

의존성

의존성 목록 2 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.