パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.5

spider_web_control

カスタマイズ可能なノードと接続を持つインタラクティブなスパイダーウェブ風コントロールウィジェットを作成するためのFlutterパッケージ。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
14
いいね数
2
Pub ポイント
160

パッケージをインストール

flutter pub add spider_web_control

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

開発者がインタラクティブでスパイダーウェブ風のコントロールウィジェットを作成できるFlutterパッケージです。ノードのカスタマイズやそれらの間の動的な接続を可能にし、関係性の可視化や径方向レイアウトを持つゲームUIの作成に最適です。モバイル、Web、デスクトップなど複数のプラットフォームをサポートしており、クロスプラットフォームアプリケーションに非常に柔軟に対応できます。直感的なAPIにより、複雑でアニメーション付きのネットワーク型インターフェースの実装が簡単になります。

用途

  • ラジアルレイアウトを備えたインタラクティブUI
  • ネットワークベースのメカニクス向けゲーム開発
  • ビジュアルデータ関係表示
  • カスタマイズ可能なノードおよび接続インターフェース
  • グラフ理論の教育ツール
  • ダイナミックインターフェースプロトタイピング

主な機能

  • カスタマイズ可能なノードと接続
  • アニメーションされたウェブのようなインタラクション
  • クロスプラットフォーム対応
  • 拡張可能なウィジェット設計
  • レスポンシブレイアウトの処理
  • リアルタイムユーザーインタラクション

適している対象

  • ゲーム開発者
  • UI/UXデザイナー
  • 教育アプリの開発者
  • データ可視化プロジェクト
  • インタラクティブなプロトタイプビルダー

注意事項

  • ノード数が多いとパフォーマンスに差が出る場合があります
  • 小さな画面ではレイアウトの管理に注意が必要です
  • 基本的な例以外のドキュメントは限られている
  • 静的またはゆっくりと変化するネットワークに最適
  • プロダクションアプリ用に追加のスタイリングが必要になる場合があります
  • リアルタイムマルチプレイヤーのシナリオに最適化されていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Spider Web Control

Static Badge Static Badge Static Badge

Demo

A customizable spider web control widget for Flutter that detects touch directions with interactive visual effects.

Features

  • Customizable appearance: Change colors, size, and web structure
  • Direction detection: Get callbacks for 8-directional touch input (R, L, F, B, FR, FL, BR, BL)
  • Interactive effects: Web threads warp and bend around touch points
  • Flexible integration: Works with any connection type (Bluetooth, HTTP, WebSocket, etc.)
  • Theme support: Built-in dark and light theme configurations

Installation

Add this to your package's pubspec.yaml file:

dependencies:
  spider_web_control: ^0.0.2

Usage

Basic Usage
import 'package:spider_web_control/spider_web_control.dart';

SpiderWebControl(
  onDirectionChanged: (direction) {
    print('Direction: $direction');
    // Handle direction change (e.g., send to device)
  },
)
Custom Configuration
SpiderWebControl(
  config: SpiderWebConfig(
    size: 400.0,
    threadColor: Colors.cyan,
    dewDropColor: Colors.lightBlue,
    centerThreshold: 100.0,
    sendInterval: Duration(milliseconds: 500),
  ),
  onDirectionChanged: (direction) {
    // Your custom logic here
  },
  onTouchStart: () => print('Touch started'),
  onTouchEnd: () => print('Touch ended'),
)
Using with Bluetooth
class MyBluetoothController extends StatelessWidget {
  final BluetoothConnection connection;

  MyBluetoothController({required this.connection});

  @override
  Widget build(BuildContext context) {
    return SpiderWebControl(
      config: SpiderWebConfig.darkTheme(size: 350.0),
      onDirectionChanged: (direction) {
        // Send direction to Bluetooth device
        connection.output.add(Uint8List.fromList(direction.codeUnits));
      },
    );
  }
}
Theme Examples
// Dark theme
SpiderWebControl(
  config: SpiderWebConfig.darkTheme(size: 300.0),
  onDirectionChanged: (direction) => handleDirection(direction),
)

// Light theme
SpiderWebControl(
  config: SpiderWebConfig.lightTheme(size: 300.0),
  onDirectionChanged: (direction) => handleDirection(direction),
)

// Custom theme
SpiderWebControl(
  config: SpiderWebConfig(
    size: 320.0,
    threadColor: Colors.purple,
    minorThreadColor: Colors.purpleAccent,
    dewDropColor: Colors.pink,
    radialDivisions: 48,
    circleDivisions: 30,
  ),
  onDirectionChanged: (direction) => handleDirection(direction),
)

Configuration Options

Property Type Default Description
size double 300.0 Size of the spider web widget
threadColor Color Colors.blue Main thread color
minorThreadColor Color Colors.blueGrey Minor thread color
dewDropColor Color Colors.lightBlue Dew drop accent color
centerThreshold double 80.0 Dead zone radius in center
sendInterval Duration Duration(seconds: 1) Minimum time between direction callbacks
radialDivisions int 36 Number of radial web divisions
circleDivisions int 25 Number of circular web divisions

Direction Values

The widget returns these direction strings:

  • 'R' - Right
  • 'L' - Left
  • 'F' - Forward/Up
  • 'B' - Back/Down
  • 'FR' - Forward-Right
  • 'FL' - Forward-Left
  • 'BR' - Back-Right
  • 'BL' - Back-Left
  • 'Disabled Zone' - Center area (not sent to callback)

License

MIT License - see LICENSE file for details.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。