[Feature] 3D and AR on phones (Filament, ARCore, SceneView): current APIs instead of 2022-era code

Aperta Adatta ai principianti
#294 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
73/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, kotlin

Direzione di ricerca

Leggi le skill esistenti xr/ e camera/ per riprenderne struttura e ambito; l’issue propone di aggiungere una skill 3d-ar-phone accanto a esse. Tratta il 3D e l’AR sui telefoni rispetto a Jetpack XR, orientato ai visori, le coordinate attuali delle dipendenze e la ricerca delle versioni, le pratiche fondamentali di Compose e ARCore, il requisito di dimensione della pagina di 16 KB e le API rimosse. Il lavoro è completato quando la skill fornisce agli agenti una guida aggiornata e attuabile ed evita esempi obsoleti di SceneView.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What is the gap in the LLM's knowledge?

Asked to "add a 3D model viewer" or "add AR placement" to a Compose app on a phone, models
reach for the right libraries but write code for APIs that no longer exist:

  • Across about 80 answers containing code (Claude Haiku 5.5, GPT-6 Luna, Gemma 4, in an earlier
    sample of 3D and AR requests), 72 used childNodes, which SceneView removed in 3.0.0. At least 22 did not compile as written.
    The pattern is common enough that, since 4.72.0, SceneView accepts childNodes again as a deprecated shim.
  • 52 of 76 Gradle lines pinned SceneView 2.2.1 or 2.3.0 (current: 4.76.0). Only the model that
    searched the web by default produced 4.x code.
  • The developer.android.com knowledge base points these questions to Jetpack XR, which targets
    headsets and glasses and does not render 3D on a phone screen.
  • Gemini 3 Flash (five prompts below, no tools): 4 of 5 answers pin a version, all
    io.github.sceneview:arsceneview:0.10.0 from June 2023, even for the non-AR viewer. The code
    uses the 0.x API (ArModelNode, ArNode, PlacementMode). One answer imports a package that
    never existed (io.github.sceneview.compose), and the LazyColumn answer leaves model loading
    as a comment.
  • Gemini 3.1 Pro (same prompts): 5 of 5 pin a 2024 release (2.0.3, 2.1.1, 2.2.1). Two of
    them use io.github.sceneview:sceneview-compose:2.2.1, which does not exist on Maven Central.
    Both AR answers mix the 2.x ARScene with ArModelNode, ArNode, PlacementMode or
    loadModelGlbAsync, removed in 2.0.0, so they compile against no released version. 4 of 5 use
    childNodes.
  • Neither model pins the current major version (4.x) or mentions Play's 16 KB page-size
    requirement (February 1, 2027). Four answers add "check for the latest version" next to the old
    pin, without saying that the API changed with it, so following that advice breaks the code.

Prompts used for the Gemini check (same five for both models, one answer each, no tools, no
MCP server or skill, no web search):

  1. "Add a screen that shows a GLB model the user can rotate, in Jetpack Compose."
  2. "Let the user place a 3D chair on the floor with ARCore, in Compose."
  3. "Show a 3D model in a LazyColumn item without leaking the renderer."
  4. "Measure the distance between two tapped points in AR, in an Android app with Jetpack Compose."
  5. "Load a 3D model from a URL with a loading state and an error state, in an Android app with Jetpack Compose."

Public code shows where the stale memory comes from: of 100 public build.gradle files outside
the sceneview org that declare SceneView, 55 are on 2.x and 44 on 0.x.

Proposed Skill

A 3d-ar-phone skill (next to xr/ and camera/) that tells the agent:

  • when phone 3D and AR is in scope (Filament through a Compose wrapper, ARCore session lifecycle)
    and when Jetpack XR is (headsets, glasses);
  • the current dependency coordinates, and how to check the latest version on Maven Central
    rather than guessing;
  • the Compose patterns that matter: one engine per screen, model loading off the main thread,
    release on dispose, camera permission and ARCore availability checks, Play's 16 KB page size;
  • a short "removed APIs" list, so 2.x code gets rewritten instead of patched.
Additional Context
  • The skills already name third-party libraries where they are the standard path (Coil for images,
    for example). Nothing covers phone 3D today.
  • I maintain SceneView, so I can supply up-to-date samples, test the skill against both models,
    and keep it current when APIs change. Happy to open a PR if that is welcome.
Lingua principale
Kotlin
Stelle
10.7k
Fork
708
Merge medio
8g 4h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di android/skills

Tutte le issue di android/skills

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.