Three64 includes a Blender add‑on that lets you attach components to objects and bake a simple navmesh via an in‑Blender UI.
Tested Blender version: 4.3+ (see src/blender/README.md for details).
File: src/blender/three64_blender_addon.py
- Open Blender → Edit → Preferences → Add‑ons.
- Click Install… and select
three64_blender_addon.py. - Enable “Three64 Component Data”.
Preferences (Edit → Preferences → Add‑ons → Three64 Component Data):
- Component Data Directory: defaults to
//component-data(relative to your .blend). - For this repo, point it at
src/assets/default-component-data(generated by the build). Click “Reload Three64 Components” after changing JSONs or the folder. - Action Manifest: path to
action-manifest.json(default//config/action-manifest.json) used by Events UI.
Important: Build the app locally first so the component presets exist:
npm run build
# or: npm run dev- Select an object.
- Go to Object Properties → “Three64 Component” panel.
- Choose a component from the dropdown.
- Click “Add Selected Component”.
- The object will show the component’s options as editable custom properties.
- Optional: The same controls appear in the default “Custom Properties” section for quick editing.
- Colors: When a parameter is a color, you’ll see a color picker and a hex field together.
Tip: You can edit any property value directly in Blender’s Custom Properties. Export with “Include → Custom Properties” enabled in glTF settings.
Object Properties → Three64 Component → “Events (Actions)”
- Set string event emission:
- Enter
events.<key>(e.g.,onCollision,onEnter) and an event name in “emit”, then click “Save”. The runtime will emit this string viaEventSystem.
- Enter
- Add actions:
- Pick an Action from the dropdown (sourced from the manifest), enter Params as JSON, and click “Add Action”. This appends an action object to the array stored at
events.<key>. - Multiple actions are supported; each shows
typeandparamswith a remove button.
- Pick an Action from the dropdown (sourced from the manifest), enter Params as JSON, and click “Add Action”. This appends an action object to the array stored at
Example JSON stored on the object (visible in Custom Properties):
{
"events.onCollision": [
{
"type": "ModifyStatistic",
"params": { "name": "health", "op": "add", "value": -10, "target": "player" }
},
{
"type": "SendComponentMessage",
"params": { "target": "self", "component": "Rigidbody", "method": "zeroVelocity" }
}
]
}Notes:
- The actions dropdown uses the path set in Preferences (default
//config/action-manifest.json). If not found, a small built‑in set is available. - Values are stored on the object as custom properties under
events.<key>: strings for emit mode or an array of action objects.
Three64 prefers .glb:
- File → Export → glTF 2.0 (.glb)
- Recommended:
- Include only needed collections
- Apply transforms where appropriate
- Save into
src/assets/models/. The dev build copies the entire folder; production build tree‑shakes and optimizes models during copy (Draco if available).
- Preferred (per material): In Blender Material → Settings, turn OFF “Backface Culling”. The exporter writes
doubleSided=trueto glTF. - Add-on per-object override: “Mark Double-Sided” sets
doubleSided = Trueon the object (exported via extras). The runtime forces double-sided materials for meshes under that object. - Precedence:
- Material
doubleSidedis respected. - Object
doubleSided = Trueforces double-sided on its meshes. - Global default remains single‑sided for performance unless overridden.
- Material