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

패키지 상세v0.7.3

ar_flutter_plugin

협업형 증강현실 경험을 생성하기 위한 플러터 플러그인 - iOS의 ARKit 및 안드로이드 기기용 ARCore를 지원합니다.

AndroidiOS
30일 다운로드
408
좋아요
364
Pub 점수
120

패키지 설치

flutter pub add ar_flutter_plugin

패키지 개요

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

ar_flutter_plugin은 Flutter 애플리케이션 내에서 증강현실 경험을 구축할 수 있도록 해주며, iOS의 ARKit과 Android의 ARCore를 모두 지원합니다. 여러 사용자가 실시간으로 동일한 가상 콘텐츠와 상호작용할 수 있도록 협업형 AR을 가능하게 합니다. 이 플러그인은 Flutter 프로젝트에 원활하게 통합되며, 통합된 API를 통해 장치별 AR 기능에 접근할 수 있습니다. 인터랙티브 교육 도구, 게임 및 몰입형 제품 시각화에 적합합니다.

사용 사례

  • 인터랙티브 AR 게임
  • 가상 제품 미리보기
  • 교육용 AR 앱
  • 협업형 AR 경험
  • AR 기반 내비게이션

주요 기능

  • ARKit (iOS) 및 ARCore (Android) 지원
  • 다중 사용자 AR 협업을 활성화합니다
  • Flutter와의 간단한 통합
  • 실시간 3D 객체 배치
  • 크로스 플랫폼 AR 개발

적합한 대상

  • Flutter를 사용하는 AR 개발자
  • 교육 앱 제작자
  • 제품 시각화 앱
  • 게임 애플리케이션
  • 인터랙티브 스토리텔링 플랫폼

고려 사항

  • AR 지원이 가능한 호환 장치 필요
  • 오래되거나 지원되지 않는 하드웨어에서 기능 제한
  • 최적의 성능을 위해 추가 설정이 필요할 수 있습니다
  • 플랫폼 고유의 AR 프레임워크에 의존
  • 비-AR 사용 사례에는 적합하지 않습니다

원본 README

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

ar_flutter_plugin

pub package

Flutter Plugin for (collaborative) Augmented Reality - Supports ARKit for iOS and ARCore for Android devices.

Many thanks to Oleksandr Leuschenko for the arkit_flutter_plugin and to Gian Marco Di Francesco for the arcore_flutter_plugin which both served as a great basis and starting point for this project.

Getting Started

Installing

Add the Flutter package to your project by running:

flutter pub add ar_flutter_plugin

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

ar_flutter_plugin package extension

dependencies:
  ar_flutter_plugin: ^0.7.3
Importing

Add this to your code:

import 'package:ar_flutter_plugin/ar_flutter_plugin.dart';

If you have problems with permissions on iOS (e.g. with the camera view not showing up even though camera access is allowed), add this to the podfile of your app's ios directory:

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      flutter_additional_ios_build_settings(target)
      target.build_configurations.each do |config|
        # Additional configuration options could already be set here

        # BEGINNING OF WHAT YOU SHOULD ADD
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
          '$(inherited)',

          ## dart: PermissionGroup.camera
          'PERMISSION_CAMERA=1',

          ## dart: PermissionGroup.photos
          'PERMISSION_PHOTOS=1',

          ## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
          'PERMISSION_LOCATION=1',

          ## dart: PermissionGroup.sensors
          'PERMISSION_SENSORS=1',

          ## dart: PermissionGroup.bluetooth
          'PERMISSION_BLUETOOTH=1',

          # add additional permission groups if required
        ]
        # END OF WHAT YOU SHOULD ADD
      end
    end
  end
Example Applications

To try out the plugin, it is best to have a look at one of the following examples implemented in the Example app:

Example Name Description Link to Code
Debug Options Simple AR scene with toggles to visualize the world origin, feature points and tracked planes Debug Options Code
Local & Online Objects AR scene with buttons to place GLTF objects from the flutter asset folders, GLB objects from the internet, or a GLB object from the app's Documents directory at a given position, rotation and scale. Additional buttons allow to modify scale, position and orientation with regard to the world origin after objects have been placed. Local & Online Objects Code
Objects & Anchors on Planes AR Scene in which tapping on a plane creates an anchor with a 3D model attached to it Objects & Anchors on Planes Code
Object Transformation Gestures Same as Objects & Anchors on Planes example, but objects can be panned and rotated using gestures after being placed Objects & Anchors on Planes Code
Screenshots Same as Objects & Anchors on Planes Example, but the snapshot function is used to take screenshots of the AR Scene Screenshots Code
Cloud Anchors AR Scene in which objects can be placed, uploaded and downloaded, thus creating an interactive AR experience that can be shared between multiple devices. Currently, the example allows to upload the last placed object along with its anchor and download all anchors within a radius of 100m along with all the attached objects (independent of which device originally placed the objects). As sharing the objects is done by using the Google Cloud Anchor Service and Firebase, this requires some additional setup, please read Getting Started with cloud anchors Cloud Anchors Code
External Object Management Similar to the Cloud Anchors example, but contains UI to choose between different models. Rather than being hard-coded, an external database (Firestore) is used to manage the available models. As sharing the objects is done by using the Google Cloud Anchor Service and Firebase, this requires some additional setup, please read Getting Started with cloud anchors. Also make sure that in your Firestore database, the collection "models" contains some entries with the fields "name", "image", and "uri", where "uri" points to the raw file of a model in GLB format External Model Management Code

Contributing

Contributions to this plugin are very welcome. To contribute code and discuss ideas, create a pull request, open an issue, or start a discussion.

Plugin Architecture

This is a rough sketch of the architecture the plugin implements:

ar_plugin_architecture

카테고리

의존성

의존성 목록 4 개

소스 저장소

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