Package-level declarations

Types

Link copied to clipboard
data class ZKo(val header: ZkoHeader, val root: ZObject, val actions: List<ZSkeletalAction>? = null)

Represents the ZKo data structure exposed externally after loading a Zko file.

Link copied to clipboard
@Serializable
data class ZkoComponentCollection(val meshes: List<ZMesh>, val textures: List<ZTexture>)
Link copied to clipboard
@Serializable
data class ZkoFormat(val header: ZkoHeader, val components: ZkoComponentCollection, val objects: List<ZkoObjectProto>, val hierarchy: ZkoHierarchyNode, val actions: List<ZSkeletalAction>? = null)

Zernikalos KObject file format.

Link copied to clipboard
@Serializable
data class ZkoHeader(val version: String)
Link copied to clipboard
@Serializable
data class ZkoHierarchyNode(val refId: String, val children: List<ZkoHierarchyNode>? = emptyList())
Link copied to clipboard
@ObjCName(name = "ZkoLoader")
class ZkoLoader
Link copied to clipboard
@Serializable
data class ZkoObjectProto(val type: ZObjectType, val refId: String, val isReference: Boolean, val zObject: ZObject)
Link copied to clipboard
@Serializable
data class ZkoObjectProtoDef(val type: ZObjectType, val refId: String, val isReference: Boolean, val scene: ZScene?, val group: ZGroup?, val model: ZModel?, val camera: ZCamera?, val skeleton: ZSkeleton?, val light: ZLight?)
Link copied to clipboard
class ZkoObjectProtoSerializer(loaderContext: ZLoaderContext) : KSerializer<ZkoObjectProto>
Link copied to clipboard

This class is used to store the components loaded by the engine.

Properties

Link copied to clipboard
const val ZKO_VERSION: String

Current ZKO format version

Link copied to clipboard

Current ZKO format version

Functions

Link copied to clipboard
fun createZerializerModule(): SerializersModule
Link copied to clipboard
suspend fun loadFromFile(context: Context, fileName: String): ZKo
Link copied to clipboard
fun loadFromProto(byteArray: ByteArray): ZKo

Decodes a ByteArray into a ZKo object.

Link copied to clipboard
fun loadFromUrl(url: String): Promise<ZKo>

Loads a ZObject from the specified URL.