build

actual fun build(engine: Engine): Material

Creates the Material and returns it.

Return

The newly created Material

Parameters

engine

Engine to associate this Material with

Throws

if the payload is not a valid compiled .filamat. Every backend signals a bad payload the same way: the FFM/native wrapper traps Filament's native parser panic and the JS embind backend's own throw, so callers can recover (e.g. return null + report an error) rather than crash the process.

expect fun build(engine: Engine): Material

Creates the Material and returns it.

Return

The newly created Material

Parameters

engine

Engine to associate this Material with

Throws

if the payload is not a valid compiled .filamat. Every backend signals a bad payload the same way: the FFM/native wrapper traps Filament's native parser panic and the JS embind backend's own throw, so callers can recover (e.g. return null + report an error) rather than crash the process.

actual fun build(engine: Engine): Material

Creates the Material and returns it.

Return

The newly created Material

Parameters

engine

Engine to associate this Material with

Throws

if the payload is not a valid compiled .filamat. Every backend signals a bad payload the same way: the FFM/native wrapper traps Filament's native parser panic and the JS embind backend's own throw, so callers can recover (e.g. return null + report an error) rather than crash the process.

actual fun build(engine: Engine): Material

Creates the Material and returns it.

Return

The newly created Material

Parameters

engine

Engine to associate this Material with

Throws

if the payload is not a valid compiled .filamat. Every backend signals a bad payload the same way: the FFM/native wrapper traps Filament's native parser panic and the JS embind backend's own throw, so callers can recover (e.g. return null + report an error) rather than crash the process.

actual fun build(engine: Engine): Material

Creates the Material and returns it.

Return

The newly created Material

Parameters

engine

Engine to associate this Material with

Throws

if the payload is not a valid compiled .filamat. Every backend signals a bad payload the same way: the FFM/native wrapper traps Filament's native parser panic and the JS embind backend's own throw, so callers can recover (e.g. return null + report an error) rather than crash the process.