BabylonJS/Babylon.js · error · Error

Rotation quaternion input not found

Error message

Rotation quaternion input not found

What it means

The declarationMapper's rotation extraProcessor (used by e.g. the rotate/set-rotation style block) looks for a serialized data input named "rotationQuaternion" on the generated flow graph block and throws if the block has no such input. This indicates the block was serialized without the expected quaternion input connection point.

Source

Thrown at packages/dev/loaders/src/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.ts:724

    "math/matCompose": {
        blocks: [FlowGraphBlockNames.MatrixCompose],
        inputs: {
            values: {
                translation: { name: "position", gltfType: "float3" },
                rotation: { name: "rotationQuaternion", gltfType: "float4" },
                scale: { name: "scaling", gltfType: "float3" },
            },
        },
        outputs: {
            values: {
                value: { name: "value" },
            },
        },
        extraProcessor(_gltfBlock, _declaration, _mapping, _parser, serializedObjects, context) {
            // configure it to work the way glTF specifies
            const d = serializedObjects[0].dataInputs.find((input) => input.name === "rotationQuaternion");
            if (!d) {
                throw new Error("Rotation quaternion input not found");
            }
            // if value is defined, set the type to quaternion
            if (context._connectionValues[d.uniqueId]) {
                context._connectionValues[d.uniqueId].type = FlowGraphTypes.Quaternion;
            }
            return serializedObjects;
        },
    },
    "math/matDecompose": {
        blocks: [FlowGraphBlockNames.MatrixDecompose],
        inputs: {
            values: {
                a: { name: "input", gltfType: "number" },
            },
        },
        outputs: {
            values: {
                translation: { name: "position" },

View on GitHub (pinned to 0592b347b8)

Solutions

  1. Upgrade @babylonjs/core and the loaders to matching versions so the block exposes "rotationQuaternion"
  2. Check your custom declaration mapping routes the op to the correct FlowGraph block that defines the rotationQuaternion input
  3. Register/patch the block's dataInputs if using a custom block

Example fix

// before
blocks: ["FlowGraphSetPropertyBlock"] // block without rotationQuaternion input
// after
blocks: [FlowGraphBlockNames.SetRotation] // block defining rotationQuaternion input
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await loader.loadAsync(url);
} catch (e) {
  if (e instanceof Error && e.message === "Rotation quaternion input not found") {
    console.error("Mapped block lacks a rotationQuaternion input; check Babylon.js version and declaration mapping.");
  } else throw e;
}

Prevention

When it happens

Trigger: Parsing an interactivity graph whose mapped flow graph block type does not define a "rotationQuaternion" data input (wrong block name in mapping, Babylon.js version where the block's inputs changed, or serializedObjects[0].dataInputs missing the entry).

Common situations: Babylon.js version mismatch between the mapping table and the FlowGraph block implementations (input renamed); custom declaration mapping pointing an op at a block without that input.

Related errors


AI-assisted analysis of BabylonJS/Babylon.js@0592b347b8 (2026-08-30). Data as JSON: /api/errors/78500cd720a16367. Report an issue: GitHub.