FakeSurfaceEntity


class FakeSurfaceEntity : FakeEntity


Test-only implementation of SurfaceEntity

Summary

Public constructors

Public functions

open Unit

The texture to be composited into the alpha channel of the auxiliary view of the surface.

open Unit

The texture to be composited into the alpha channel of the surface.

Public properties

open SurfaceEntity.CanvasShape

Specifies the shape of the spatial canvas which the surface is texture mapped to.

open Dimensions

Retrieves the dimensions of the "spatial canvas" which the surface is mapped to.

open Float

The width of the left/right feathered edges of the canvas.

open Float

The width of the top/bottom feathered edges of the canvas.

open Int

Specifies how the surface content will be routed for stereo viewing.

open Surface

Retrieves the surface that the Entity will display.

Public constructors

FakeSurfaceEntity

Added in 1.0.0-alpha04
FakeSurfaceEntity()

Public functions

setAuxiliaryAlphaMaskTexture

Added in 1.0.0-alpha04
open fun setAuxiliaryAlphaMaskTexture(alphaMask: TextureResource?): Unit

The texture to be composited into the alpha channel of the auxiliary view of the surface. This is only used for interleaved stereo content. If null, the alpha mask will be disabled.

Parameters
alphaMask: TextureResource?

The auxiliary alpha mask texture.

setPrimaryAlphaMaskTexture

Added in 1.0.0-alpha04
open fun setPrimaryAlphaMaskTexture(alphaMask: TextureResource?): Unit

The texture to be composited into the alpha channel of the surface. If null, the alpha mask will be disabled.

Parameters
alphaMask: TextureResource?

The primary alpha mask texture.

Public properties

canvasShape

Added in 1.0.0-alpha04
open var canvasShapeSurfaceEntity.CanvasShape

Specifies the shape of the spatial canvas which the surface is texture mapped to.

dimensions

Added in 1.0.0-alpha04
open val dimensionsDimensions

Retrieves the dimensions of the "spatial canvas" which the surface is mapped to. These values are not impacted by scale.

Returns
Dimensions

The canvas Dimensions.

featherRadiusX

Added in 1.0.0-alpha04
open var featherRadiusXFloat

The width of the left/right feathered edges of the canvas.

featherRadiusY

Added in 1.0.0-alpha04
open var featherRadiusYFloat

The width of the top/bottom feathered edges of the canvas.

stereoMode

Added in 1.0.0-alpha04
open var stereoModeInt

Specifies how the surface content will be routed for stereo viewing. Applications must render into the surface in accordance with what is specified here in order for the compositor to correctly produce a stereoscopic view to the user.

surface

Added in 1.0.0-alpha04
open val surfaceSurface

Retrieves the surface that the Entity will display. The app can write into this surface however it wants, i.e. MediaPlayer, ExoPlayer, or custom rendering.

Returns
Surface

an Android Surface