Ejemplo n.º 1
0
  /**
   * Create Entity from {@link Drawable}. New Entity has plane geometry.
   *
   * @param drawable Drawable for surface.
   * @return new Entity
   */
  public static Entity from(Drawable drawable) {

    final Entity entity = new Entity();
    entity.add(SurfaceRendererComponent.from(drawable));
    entity.add(GeometryComponent.from(drawable));

    return entity;
  }
Ejemplo n.º 2
0
  /**
   * Create Entity from {@link View}. New Entity has plane geometry.
   *
   * @param view View for surface.
   * @return new Entity
   */
  public static Entity from(View view) {

    final Entity entity = new Entity();
    entity.add(SurfaceRendererComponent.from(view));
    entity.add(GeometryComponent.from(view));

    return entity;
  }