ViewNode2

constructor(engine: Engine, windowManager: ViewNode2.WindowManager, materialLoader: MaterialLoader, @LayoutRes viewLayoutRes: Int, unlit: Boolean = false, invertFrontFaceWinding: Boolean = false)


constructor(engine: Engine, windowManager: ViewNode2.WindowManager, materialLoader: MaterialLoader, unlit: Boolean = false, invertFrontFaceWinding: Boolean = false, content: @Composable () -> Unit)

Set the Jetpack Compose UI content for this view. Initial composition will occur when the view becomes attached to a window or when createComposition is called, whichever comes first.

Parameters

content

the themed composable. E.g.

MaterialTheme {
// In Compose world
Text("Hello Compose!")
}

constructor(engine: Engine, windowManager: ViewNode2.WindowManager, materialLoader: MaterialLoader, view: View, unlit: Boolean = false, invertFrontFaceWinding: Boolean = false, imageReaderMaxImages: Int = 7)

Parameters

view

The 2D Android View that is rendered by this ViewNode2

unlit

True to disable all lights influences on the rendered view

invertFrontFaceWinding

Inverts the winding order of front faces. Inverting the winding order of front faces is useful when rendering mirrored reflections (water, mirror surfaces, front camera in AR, etc.). True to invert front faces, false otherwise