Google Sceneform – 是否已弃用?有什么替代品吗? [英] Google Sceneform – Is it deprecated? Any replacement?
本文介绍了Google Sceneform – 是否已弃用?有什么替代品吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的 ARCore 项目 Sceneform 中使用.这个项目现在似乎被 Google 提到为 Archived.我们可以在此处或在此页面.
I use in my ARCore project Sceneform. It seems that this project is now mentioned as Archived by Google. More info we can find here or on this page.
我不明白 Google 是否真的放弃了这个 SDK,或者它是否 - 或将 - 直接集成到 ARCore SDK 中?
I don't understand if Google really abandoned this SDK, or if it is - or will be - directly integrated in ARCore SDK?
感谢您提供有关此 SDK 未来和潜在替代品的任何信息.
Thanks for any information concerning the future of this SDK and a potential replacements.
推荐答案
SceneformMaintained SDK for Android
GitHub:https://github.com/thomasgorisse/sceneform-android-sdk一个>
- 无需插件
- 最新的 ARCore SDK 和 Filament 功能
- 基于AndroidX
- 可作为 gradle
mavenCentral()
依赖项 - 支持glTF格式
- 轻松制作动画
- 支持深度
- 用于基本用法的简单模型加载
- No plugin needed
- Latest ARCore SDK and Filament functionalities
- Based on AndroidX
- Available as gradle
mavenCentral()
dependency - Supports glTF format
- Animations made easy
- Depth supported
- Simple model loading for basic usage
app/build.gradle
dependencies {
implementation("com.gorisse.thomas.sceneform:sceneform:1.20.0")
}
基本用法(简单模型查看器)
更新您的AndroidManifest.xml
AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA" />
<application>
…
<meta-data android:name="com.google.ar.core" android:value="optional" />
</application>
将 View
添加到您的 layout
res/layout/main_activity.xml
<FrameLayout
android:id="@+id/arFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
编辑您的 Activity
或 Fragment
src/main/java/…/MainActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
…
if (savedInstanceState == null) {
if (Sceneform.isSupported(this)) {
getSupportFragmentManager().beginTransaction()
// latest syntax:
.add(R.id.arFragment, ArFragment.class, null)
.commit();
}
}
}
@Override
public void onAttachFragment(@NonNull Fragment fragment) {
super.onAttachFragment(fragment);
if (fragment.getId() == R.id.arFragment) {
// Load model.glb glTF file from assets folder or http url
((ArFragment) fragment)
.setOnTapPlaneGlbModel("model.glb", null});
}
}
这篇关于Google Sceneform – 是否已弃用?有什么替代品吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文