arcore_flutter_plugin은 Android 기기에서 Google의 ARCore SDK를 사용하여 증강현실(AR) 경험을 구축할 수 있도록 해주는 Flutter 패키지입니다. Flutter와 ARCore 사이의 다리를 제공하여 3D 콘텐츠, 모션 트래킹 및 환경 이해 기능을 Flutter 애플리케이션에 통합할 수 있게 합니다. Android 전용으로 설계되어 평면 감지, 조명 추정, 객체 고정 등의 기능을 지원합니다. 개발자는 이 도구를 활용해 게임, 교육, 소매 등 다양한 분야의 몰입형 AR 앱을 만들 수 있습니다. 이 플러그인은 오픈소스이며 커뮤니티가 적극적으로 유지보수하고 있습니다.
Add the Sceneform library to your app's build.gradle file:
android {
// Sceneform libraries use language constructs from Java 8.// Add these compile options if targeting minSdkVersion < 26.
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
…
// Provides ArFragment, and other UX resources.
implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.8.0'// Alternatively, use ArSceneView without the UX dependency.
implementation 'com.google.ar.sceneform:core:1.8.0'
}
There are a total of 13 classes provided by this plugin until May 2020.
ArCoreView
ArCoreController
ArCoreFaceView
ArCoreFaceContrller
ArCoreSphere
ArCoreCylinder
ArCoreCube
ArCoreNode
ArCoeMaterial
ArCoreHitTestResult
ArCoreRotatingNode
ArCorePlane
ArCoreReferenceNode
ArCoreView
This class returns the view type. There are two types of views in it.
AUGMENTEDFACESTANDARDVIEW
There are 4 properties in it:
onArCoreViewCreated
enableTapRecoginzer
enableUpdateListener
type
onArCoreViewCreated
This property takes a ArCoreController.
enableTapRecoginzer
Initially, set to false. It is used as an argument by the MethodChannel.
enableUpdateListener
Initially, set to false. It is used as an argument by the MethodChannel.
type
It is a view type, it is either AUGMENTEDFACE, STANDARDVIEW*. It is set to STANDARDVIEW by default.
ArCoreController
This controller used to add a ArNode using addArCoreNode function, add a ArCoreNode with ancher using a addArCoreNodeWithAncher function and also remove node using removeNode function.
ArCoreFaceView
It is a stateful widget that returns a ArCoreAndroidView. It has two properties enableAugmentedFaces, onArCoreViewCreated.
Initially, enableAugmentedFaces is set to false.
onArCoreViewCreated takes a function with ArCoreController argument.
ArCoreFaceController
It used dispose and loadMesh method to control the FaceView.
ArCoreSphere
It is ArCoreShape, takes a radius & ArCoreMaterial.
ArCoreCylender
It is ArCoreShape, takes a radius, height, & ArCoreMaterial.
ArCoreCube
It is ArCoreShape, takes a size i.e. Vector3 & ArCoreMaterial.
ArCoreNode
This widget is used to provide the position, shape, scale, rotation, name.
ArCoreMaterial
It is used to describe the outlook of the virtual object created by the user.
It has color,textureBytes, metallic, roughness, reflection.
ArCoreRotatingNode
It is an ArCoreNode with a degreesPerSecondproperty which is a double value.
ArCorePlane
It takes the x, y coordinate of the plane, ArCorePose & ArCorePlaneType.
There are three types of plane:
HORIZONTAL_UPWARD_FACING
HORIZONTAL_DOWNWARD_FACING
VERTICAL
ArCoreReferenceNode
It is ArCoreNode, it has all the properties that the ArCoreNode has also it has objectUrl and object3DFileName.