カテゴリー・パッケージ・リポジトリを検索

パッケージ詳細v0.0.2+7

ar_core

アプリケーションに拡張現実を追加するためのFlutterプラグイン - iOSおよびAndroidデバイスでのリアルタイムカメラとオブジェクト配置をサポート

AndroidiOSWeb
30日間ダウンロード
6
いいね数
30
Pub ポイント
125

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

flutter pub add ar_core

パッケージ概要

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

ar_core は、iOS および Android のモバイルアプリケーションで拡張現実(AR)機能を可能にする Flutter プラグインであり、リアルタイムのカメラアクセスと 3D オブジェクト配置をサポートしています。開発者はシンプルな API を使って、アプリ内に AR エクスペリエンスを直接統合できます。このプラグインは各プラットフォームのネイティブ AR 機能を利用しており、デバイス間でシームレスに動作するように設計されています。現在ウェブ AR は対応していませんが、Flutter アプリでインタラクティブな AR 機能を構築するための堅実な基盤を提供しています。

用途

  • インタラクティブな製品プレビューの作成
  • ARゲームの開発
  • 3Dモデルによる教育アプリの向上
  • 建築デザインの可視化
  • バーチャルトライオンの有効化

主な機能

  • リアルタイムカメラ統合
  • AR空間における3Dオブジェクトの配置
  • クロスプラットフォーム対応(iOSおよびAndroid)
  • シンプルな Flutter API
  • ネイティブARフレームワークの活用

適している対象

  • モバイルARアプリ開発者
  • 教育技術プロジェクト
  • eコマース製品のビジュアライゼーション
  • AR機能を求めるゲーム開発者
  • 没入型インターフェースを探索するUXデザイナー

注意事項

  • Webプラットフォームのサポートなし
  • AR機能を備えたデバイスが必要です
  • 利用可能なドキュメントが限られています
  • ネイティブARフレームワークに依存しています
  • 複雑なシーンには追加の設定が必要になる場合があります

元の README

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

ar_core Flutter Package for Augmented Reality

pub package

ar_core is an augmented reality mobile application kit for mobile devices that enables the creation of augmented reality applications.

Many thanks to Arslan Raza for the ar_core, he served as a great basis and starting point for this project.

Features

  • Display live camera preview in a widget.
  • Custom Camera, Place anywhere on the Screen.
  • Choose Asset, Network or 3d objects in png.
  • Drag, Resize, Rotate, Zoom in and out objects.
  • Add access to the image stream from Dart.

Getting Started

Installing

Add the Flutter package to your project by running:

flutter pub add ar_core

Or manually add this to your pubspec.yaml file (and run flutter pub get):

dependencies:
  ar_core: ^0.0.1
iOS

The camera plugin functionality works on iOS 10.0 or higher. If compiling for any version lower than 10.0, make sure to programmatically check the version of iOS running on the device before using any camera plugin features. The device_info_plus plugin, for example, can be used to check the iOS version.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description.

Or in text format add the key:

<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>
Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

It's important to note that the MediaRecorder class is not working properly on emulators, as stated in the documentation: https://developer.android.com/reference/android/media/MediaRecorder. Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.

Importing

Add this to your code:

import 'package:ar_core/ar_core.dart';
Usage or How to Use

Replace your Scaffold to Augmented(), and it will handle all your view. if you want to pass an image just pass an image as a constructor.

#Write this code in main


import 'package:camera/camera.dart';
import 'package:flutter/material.dart';

List<CameraDescription> cameras = [];
Future<void> main() async {
  try {
    WidgetsFlutterBinding.ensureInitialized();
    cameras = await availableCameras();
  } on CameraException catch (e) {
    print(e.description);
  }
  runApp(const MyApp());
}
Add main class
class AugmentedReality extends StatefulWidget {
  const AugmentedReality({Key? key}) : super(key: key);

  @override
  _AugmentedRealityState createState() => _AugmentedRealityState();
}

class _AugmentedRealityState extends State<AugmentedReality> {
  @override
  Widget build(BuildContext context) {
    return Augmented(
     /// Provide Network Image Link to add your object
    image: 'https://freepngimg.com/static/img/cat/hair.png'
    );
  }
}

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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