Skip to main content

NAF for iOS v0.1.27

Updated: July 9, 2026

What's New​

  • Progressive wearable equip: equip(_:lods:) on NAFView and NAFAvatarSession — the wearable is equipped at lods[0] immediately and the remaining LODs stream in the background via the shared native LOD scheduler, re-publishing meshes as each lands. Streaming stops automatically if the asset is unequipped or the avatar reloads/unloads mid-stream.
  • New API NAFAvatarController.isFrozen: Static-pose contract made explicit: when frozen, the animation graph is never evaluated and the pose stays at the rig's rest (bind) pose. .staticPose loads set it automatically; progressive loads clear it.
  • New — glTF 2.0 material model
    • NAFMaterial is now decoder-driven: values resolve through the shared C++ MaterialDecoder — native glTF fields for new-pipeline assets, Unity URP key fallback for legacy exports — one canonical metallic-roughness view regardless of asset origin. New surface: metallicRoughnessTexture + metalRoughPacking, roughnessFactor, emissiveFactor / emissiveStrength, alphaMode / alphaCutoff, isNewMaterialModel, plus KHR extension factors (unlit, clearcoat, sheen, anisotropy, texture transform).
    • Metal shading is packing-aware: the metallic-roughness texture samples per its declared packing (glTF G/B vs Unity R/A-inverted); legacy materials render identically to before.
    • KHR extension lobes added to the PBR path — clearcoat, sheen (Charlie/Ashikhmin), anisotropic GGX — ported from the Khronos glTF-Sample-Renderer reference plus KHR_materials_unlit, KHR_texture_transform, and KHR_materials_emissive_strength.
    • Emissive textures now render (bound for the first time, black fallback), and glTF alphaMode semantics apply strictly to new-model materials — legacy alpha behavior is unchanged.
  • New — local assets (LocalResolver): The asset resolver's LocalResolver now works on iOS: it resolves against the app bundle's resource path, so DEBUG builds can serve assets from a bundled localResolver/ directory.
  • New — loaded-avatar diagnostics: NAFView.avatarUsesNewMaterialModel — whether the loaded avatar uses the new (glTF) material model.

What's Fixed​

  • .staticPose rendered a collapsed "ball of joints" instead of the bind pose — the always-built animation graph evaluated with zero clips and overwrote the pose. Static loads now freeze the controller entirely (see isFrozen).
  • Animation clips played with wrong orientation — clips are authored right-handed while the engine runs Unity-style left-handed. Every clip load now bakes the clip into the engine coordinate space once at deserialize;
  • Idle froze during equip/unequip — two causes fixed: the wearable load no longer re-attaches the controller mid-equip and the merged-mesh rebuild now runs off the main thread so the render loop never stalls.
  • Idle snapped backwards after equip — playheads are now captured right before the skeleton re-attach instead of before the merge.

What's Changed​

  • LOD pipeline unified onto the shared native LodUpgradeScheduler
  • NAFBehaviorConfig.useRightHanded default is now true — behavior clips ship right-handed and are baked into the engine space at load. Pass false only for legacy LH-authored clips.

What's Deprecated​

  • NAFMaterial.smoothness → use roughnessFactor (smoothness = 1 − roughness).
  • NAFMaterial.metallicSmoothnessTexture → use metallicRoughnessTexture + metalRoughPacking.