{"record":{"id":"9493a1397799643b","repo":"BabylonJS/Babylon.js","slug":"invalid-coordinate-system-mode-this-parent-coo","errorCode":null,"errorMessage":"Invalid coordinate system mode (${this._parent.coordinateSystemMode})","messagePattern":"Invalid coordinate system mode \\((.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/loaders/src/glTF/2.0/glTFLoader.pure.ts","lineNumber":776,"sourceCode":"            _babylonTransformNode: this._rootBabylonMesh,\r\n            index: -1,\r\n        };\r\n\r\n        switch (this._parent.coordinateSystemMode) {\r\n            case GLTFLoaderCoordinateSystemMode.AUTO: {\r\n                if (!this._babylonScene.useRightHandedSystem) {\r\n                    rootNode.rotation = [0, 1, 0, 0];\r\n                    rootNode.scale = [1, 1, -1];\r\n                    GLTFLoader._LoadTransform(rootNode, this._rootBabylonMesh);\r\n                }\r\n                break;\r\n            }\r\n            case GLTFLoaderCoordinateSystemMode.FORCE_RIGHT_HANDED: {\r\n                this._babylonScene.useRightHandedSystem = true;\r\n                break;\r\n            }\r\n            default: {\r\n                throw new Error(`Invalid coordinate system mode (${this._parent.coordinateSystemMode})`);\r\n            }\r\n        }\r\n\r\n        this._parent.onMeshLoadedObservable.notifyObservers(rootMesh);\r\n        return rootNode;\r\n    }\r\n\r\n    /**\r\n     * Loads a glTF scene.\r\n     * @param context The context when loading the asset\r\n     * @param scene The glTF scene property\r\n     * @returns A promise that resolves when the load is complete\r\n     */\r\n\r\n    public loadSceneAsync(context: string, scene: IScene): Promise<void> {\r\n        const extensionPromise = this._extensionsLoadSceneAsync(context, scene);\r\n        if (extensionPromise) {\r\n            return extensionPromise;\r","sourceCodeStart":758,"sourceCodeEnd":794,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/loaders/src/glTF/2.0/glTFLoader.pure.ts#L758-L794","documentation":"The loader switches on the configured coordinateSystemMode after creating the root node. Any value other than the defined GLTFLoaderCoordinateSystemMode enum members (e.g. AUTO, FORCE_LEFT_HANDED, FORCE_RIGHT_HANDED) falls into the default branch, which throws this error.","triggerScenarios":"Passing an invalid value for loader.coordinateSystemMode (a raw number/string that is not a GLTFLoaderCoordinateSystemMode member) when creating the loader or via GLTFLoader coordinate options.","commonSituations":"Passing a hand-rolled numeric constant that no longer matches the enum; typing a string like 'right-handed' instead of the enum; enum version drift after upgrading the library.","solutions":["Set coordinateSystemMode to a GLTFLoaderCoordinateSystemMode enum member (GLTFLoaderCoordinateSystemMode.AUTO, .FORCE_LEFT_HANDED, or .FORCE_RIGHT_HANDED)","Fix typos/invalid raw values in the loader configuration object","After upgrading the library, re-check the enum values and update any persisted numeric literals"],"exampleFix":"// before\nloader.coordinateSystemMode = 42; // invalid\n// after\nimport { GLTFLoaderCoordinateSystemMode } from \"loaders/glTF/2.0/glTFLoader\";\nloader.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.FORCE_RIGHT_HANDED;","handlingStrategy":"validation","validationCode":"import { GLTFLoaderCoordinateSystemMode } from \"loaders/glTF/2.0/glTFLoader\";\nconst validModes = [GLTFLoaderCoordinateSystemMode.AUTO,\n  GLTFLoaderCoordinateSystemMode.FORCE_LEFT_HANDED,\n  GLTFLoaderCoordinateSystemMode.FORCE_RIGHT_HANDED];\nif (!validModes.includes(loader.coordinateSystemMode)) {\n  throw new Error(`coordinateSystemMode must be a GLTFLoaderCoordinateSystemMode member`);\n}","typeGuard":"function isValidCoordinateSystemMode(v) {\n  return Object.values(GLTFLoaderCoordinateSystemMode).includes(v);\n}","tryCatchPattern":"try {\n  await loader.loadAsync(url);\n} catch (e) {\n  if (e.message.startsWith(\"Invalid coordinate system mode\")) {\n    console.warn(\"Fixing coordinateSystemMode to AUTO\");\n    loader.coordinateSystemMode = GLTFLoaderCoordinateSystemMode.AUTO;\n    return loader.loadAsync(url);\n  }\n  throw e;\n}","preventionTips":["Always assign coordinateSystemMode via the enum, never raw literals","Persist enum names (not numeric values) in config to survive enum reordering","Re-verify enum values after library upgrades"],"tags":["gltf","configuration","enum"],"backgroundTag":"invalid-enum-config-value","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}