dh.avatar
Extension: .dh-avatar — Type ID: dh.avatar
An avatar is the top-level definition for a wearable character. It extends dh.object — meaning it has a patches list — and adds avatar-specific properties.
Properties
Section titled “Properties”| Property | Type | Required | Description |
|---|---|---|---|
$type | "dh.avatar" | no | Type identifier |
name | string | no | Display name |
description | string | no | Description |
inherits | string | no | Barcode of the avatar to inherit from |
properties | object | no | Key-value pairs of float properties (e.g. mass, height) |
patches | array | no | List of patches to apply (see below) |
The type is inferred from the file extension —
$typeis not needed in source files. The compiler adds it automatically during builds.
Example
Section titled “Example”{ "name": "Custom Mayu", "inherits": "tech.azuki.mayu:avatar.dh-avatar", "properties": { "height": 1.42 }, "patches": [ { "$type": "dh.import-model", "path": "models/body.glb" }, { "$type": "dh.set-rig", "target": "Armature", "path": "rigs/humanoid.dh-rig" }, { "$type": "dh.set-material", "target": "Body", "slot": 0, "path": "materials/skin.dh-mat" }, { "$type": "dh.import-object", "path": "accessories/glasses/glasses.dh-obj", "parent": "Head" } ]}Patches
Section titled “Patches”Patches are the building blocks of avatars and objects. Each patch applies a specific operation — importing a model, setting a material, linking an armature, etc.
Here’s a quick overview. For full details, property tables, and examples for each patch, see dh.object — Patch Reference.
| Patch Type | What it does |
|---|---|
dh.import-model | Import a 3D model (GLB/FBX) |
dh.import-object | Import another dh.object definition |
dh.remove-object | Remove an object from the hierarchy |
dh.set-material | Assign a material to a mesh slot |
dh.set-blendshape | Set a blendshape/morph target value |
dh.set-transform | Set position, rotation, or scale |
dh.set-parent | Reparent an object |
dh.set-rig | Apply a rig definition to an armature |
dh.armature-link | Link armatures for bone-to-bone matching or attachment |
Relationship to dh.object
Section titled “Relationship to dh.object”dh.avatar extends dh.object. The only difference is the properties dictionary for avatar-level metadata. Everything about patches, hierarchy, and inheritance works identically.
Think of it this way: an object is a reusable building block (an accessory, outfit piece). An avatar is the root-level thing that represents a complete character.