Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Sceneform SDK v1.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictornvictor committed Dec 12, 2019
1 parent 4a42587 commit bb7d990
Show file tree
Hide file tree
Showing 19 changed files with 51 additions and 22 deletions.
4 changes: 2 additions & 2 deletions samples/animation/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.3'

// Sceneform
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform:animation:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"
implementation "com.google.ar.sceneform:animation:1.14.0"
implementation 'com.android.support:design:28.0.0'
}

Expand Down
2 changes: 1 addition & 1 deletion samples/animation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions samples/augmentedfaces/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ android {
dependencies {

// Provides ArFragment, and other Sceneform UX resources:
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"

// Use the Sceneform UX Package built from the source files included in the sceneformux folder.
//api project(":sceneformux")

// Alternatively, use ArSceneView without the UX dependency.
//implementation "com.google.ar.sceneform:core:1.13.0"
//implementation "com.google.ar.sceneform:core:1.14.0"

implementation "com.android.support:appcompat-v7:28.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/augmentedfaces/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion samples/augmentedimage/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation 'com.android.support:design:28.0.0'

// Use the Sceneform UX Package pre-built from Maven.
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"

// Use the Sceneform UX Package built from the source files included in the sceneformux folder.
//api project(":sceneformux")
Expand Down
2 changes: 1 addition & 1 deletion samples/augmentedimage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion samples/chromakeyvideo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
implementation "com.android.support:design:28.0.0"

// Use the Sceneform UX Package pre-built from Maven.
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"

// Use the Sceneform UX Package built from the source files included in the sceneformux folder.
//api project(":sceneformux")
Expand Down
2 changes: 1 addition & 1 deletion samples/chromakeyvideo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions samples/hellosceneform/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ android {
dependencies {

// Provides ArFragment, and other Sceneform UX resources:
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"

// Use the Sceneform UX Package built from the source files included in the sceneformux folder.
//api project(":sceneformux")

// Alternatively, use ArSceneView without the UX dependency.
//implementation "com.google.ar.sceneform:core:1.13.0"
//implementation "com.google.ar.sceneform:core:1.14.0"

implementation "com.android.support:appcompat-v7:28.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/hellosceneform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion samples/solarsystem/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
}

dependencies {
implementation "com.google.ar.sceneform:core:1.13.0"
implementation "com.google.ar.sceneform:core:1.14.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion samples/solarsystem/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
4 changes: 2 additions & 2 deletions samples/videorecording/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ android {
dependencies {

// Provides ArFragment, and other Sceneform UX resources:
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.13.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:1.14.0"


// Use the Sceneform UX Package built from the source files included in the sceneformux folder.
//api project(":sceneformux")

// Alternatively, use ArSceneView without the UX dependency.
//implementation "com.google.ar.sceneform:core:1.13.0"
//implementation "com.google.ar.sceneform:core:1.14.0"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
Expand Down
2 changes: 1 addition & 1 deletion samples/videorecording/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion sceneformux/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.google.ar.sceneform:plugin:1.13.0'
classpath 'com.google.ar.sceneform:plugin:1.14.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
2 changes: 1 addition & 1 deletion sceneformux/ux/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
}

dependencies {
api "com.google.ar.sceneform:core:1.13.0"
api "com.google.ar.sceneform:core:1.14.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@
public abstract class BaseArFragment extends Fragment
implements Scene.OnPeekTouchListener, Scene.OnUpdateListener {
private static final String TAG = BaseArFragment.class.getSimpleName();

/** Invoked when the ARCore Session is initialized. */
public interface OnSessionInitializationListener {
/**
* The callback will only be invoked once after a Session is initialized and before it is
* resumed for the first time.
*
* @see #setOnSessionInitializationListener(OnTapArPlaneListener)
* @param session The ARCore Session.
*/
void onSessionInitialization(Session session);
}

/** Invoked when an ARCore plane is tapped. */
public interface OnTapArPlaneListener {
/**
Expand All @@ -92,6 +105,7 @@ public interface OnTapArPlaneListener {
private FrameLayout frameLayout;
private boolean isStarted;
private boolean canRequestDangerousPermissions = true;
@Nullable private OnSessionInitializationListener onSessionInitializationListener;
@Nullable private OnTapArPlaneListener onTapArPlaneListener;

@SuppressWarnings({"initialization"})
Expand All @@ -118,6 +132,17 @@ public TransformationSystem getTransformationSystem() {
return transformationSystem;
}

/**
* Registers a callback to be invoked when the ARCore Session is initialized. The callback will
* only be invoked once after the Session is initialized and before it is resumed.
*
* @param onSessionInitializationListener the {@link OnSessionInitializationListener} to attach.
*/
public void setOnSessionInitializationListener(
@Nullable OnSessionInitializationListener onSessionInitializationListener) {
this.onSessionInitializationListener = onSessionInitializationListener;
}

/**
* Registers a callback to be invoked when an ARCore Plane is tapped. The callback will only be
* invoked if no {@link com.google.ar.sceneform.Node} was tapped.
Expand Down Expand Up @@ -381,6 +406,9 @@ private Session createSession()
if (session == null) {
session = new Session(requireActivity());
}
if (this.onSessionInitializationListener != null) {
this.onSessionInitializationListener.onSessionInitialization(session);
}
return session;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ public boolean wasCancelled() {
return wasCancelled;
}

public @Nullable Node getTargetNode() {
@Nullable
public Node getTargetNode() {
return targetNode;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* planeDiscoveryView to override the default visual, or assign null to remove it.
*/
public class PlaneDiscoveryController {
private @Nullable View planeDiscoveryView;
@Nullable private View planeDiscoveryView;

public PlaneDiscoveryController(@Nullable View planeDiscoveryView) {
this.planeDiscoveryView = planeDiscoveryView;
Expand Down

0 comments on commit bb7d990

Please sign in to comment.