GithubHelp home page GithubHelp logo

sceneform-poly-browser's Introduction

Poly API - Android Sample

Copyright (c) 2017 Google Inc. All rights reserved.

This is a sample project showing how to invoke the Poly API from an Android app.

Note about rendering: The focus of this sample is showing how to call the Poly API, not showing how to render models. The renderers included in the samples are very basic and only meant as a proof of concept, so they won't work with all assets. See the notes under each sample below for information about what kinds of assets each sample can render.

Get your API Key

Before proceeding, you must obtain your API Key from Google Cloud Console as decribed in the documentation. This API Key will allow you to make calls to the Poly API.

Basic Sample

  1. Install Android Studio.
  2. Open Android Studio.
  3. Choose Import Project from the startup menu.
  4. Import the PolySampleAndroid directory.
  5. Open the PolyApi.java file.
  6. Enter your API Key in the API_KEY variable.
  7. Click Run.

Depending on which Android SDK modules you have installed, you may need to download additional build tool versions and/or platforms. Android Studio will prompt you as needed during the import process.

Note: The basic renderer included in this sample only supports Blocks objects. It uses the diffuse material color encoded in the MTL file as the color of the material. It does not support lighting or textures.

ARCore Sample

The ARCore sample in this package is based on the sample for the Google AR SDK for Android. The modification to that sample is that instead of loading an OBJ file from disk, this sample loads the OBJ file using the Poly API.

To run the sample:

  1. Follow the setup steps for ARCore as explained in the ARCore Getting Started guide.
  2. Open Android Studio.
  3. Choose Import Project from the startup menu.
  4. Import the PolySampleARCore directory.
  5. Open the PolyApi.java file.
  6. Enter your API Key in the API_KEY variable.
  7. Ensure that your ARCore-compatible phone is plugged into your computer.
  8. Click Run.

Note: The renderer included in this sample only supports objects with exactly one texture.

License

For license information, refer to the LICENSE file.

sceneform-poly-browser's People

Contributors

claywilkinson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.