- Sceneform SDK for Android was open sourced and archived (github.com/google-ar/sceneform-android-sdk) with version 1.16.0.
- This site (developers.google.com/sceneform) serves as the documentation archive for the previous version, Sceneform SDK for Android 1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
AssetDefinition
Stay organized with collections
Save and categorize content based on your preferences.
Defines a single Sceneform asset, including the model source file, the
material to embed, the asset definition file (sfa), and the asset bundle
file (sfb).
Instances of this class are placed inside of the SceneformAssets
instance in a gradle build.
Each asset definition generates two tasks, a createAsset task and a
compileAsset task, using the task suffix to distinguish asset builds from
one another. The createAsset task generates the .sfa file when it does not
exist, and the compileAsset task, depends on the createAsset task, and
generates the .sfb file when any of the .sfb file's inputs have changed.
All paths are relative to the gradle build in which this definition resides.
Public Methods
void
|
animationPath( String animationPath)
Sets a path to an input .fbx, file from which animations will be imported and appended to the
current asset sfb file.
|
void
|
|
void
|
modelPath( String modelPath)
Sets the path to the input .obj, .fbx, or .gltf file.
|
void
|
sfaPath( String sfaPath)
Sets the path to the .sfa defining the details of how this asset will be
built.
|
void
|
sfbPath( String sfbPath)
Sets the path where the asset build will place the .sfb output file.
|
Inherited Methods
From class
java.lang.Object
Object
|
clone()
|
boolean
|
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Constructors
public
AssetDefinition
()
Public Methods
public
void
animationPath
(String animationPath)
Sets a path to an input .fbx, file from which animations will be imported and appended to the
current asset sfb file.
Parameters
animationPath |
The relative path to the fbx file.
|
public
void
materialPath
(String materialPath)
Parameters
materialPath |
Only accepted value: 'default'.
|
public
void
modelPath
(String modelPath)
Sets the path to the input .obj, .fbx, or .gltf file.
Parameters
modelPath |
The relative path to the model file.
|
public
void
sfaPath
(String sfaPath)
Sets the path to the .sfa defining the details of how this asset will be
built. Note that when the .sfa does not exist, building this asset results
in a default .sfa file being generated. When the .sfa does exist it is
used as input, defining the parameters used to build the .sfb.
Parameters
sfaPath |
The relative path to the .sfa file.
|
public
void
sfbPath
(String sfbPath)
Sets the path where the asset build will place the .sfb output file.
Parameters
sfbPath |
The relative path where the .sfb file should be placed.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["`AssetDefinition` in Sceneform defines individual assets like models and materials for use in AR experiences."],["Each asset definition triggers two build tasks: `createAsset` (generates .sfa) and `compileAsset` (generates .sfb)."],["File paths within the definition are relative to the Gradle build directory."],["Developers can specify source files for models, animations, materials and output file paths through dedicated methods."],["An .sfa file defines build details; if absent, a default one is generated during the build process."]]],["`AssetDefinition` defines a Sceneform asset, managing its model, material, and build files. It is instantiated within `SceneformAssets` in a Gradle build. Each definition creates `createAsset` and `compileAsset` tasks to generate `.sfa` and `.sfb` files respectively. The class methods allow setting paths for animation, material, model, `.sfa`, and `.sfb` files. Paths are relative to the Gradle build.\n"]]