From 689b49dc59ba609dd904890336b7cebc5950d74c Mon Sep 17 00:00:00 2001 From: PANDAKO-GitHub <68310169+PANDAKO-GitHub@users.noreply.github.com> Date: Sat, 14 Nov 2026 21:37:37 +0900 Subject: [PATCH] [Experimental] [Advanced 3D Features] Fixed an error that occurred when 3D was disabled. Fixed an error in this extension that occurred when 3D was not enabled in the project. --- extensions/community/A3F.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/extensions/community/A3F.json b/extensions/community/A3F.json index 8800f2bf6..6b8dbe51b 100644 --- a/extensions/community/A3F.json +++ b/extensions/community/A3F.json @@ -10,7 +10,7 @@ "name": "A3F", "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Graphic Design/f4c71080f9213188ee5556b1acb45ad46fe6e5225947301c363105b080fca008_Graphic Design_3d_cube_isometric.svg", "shortDescription": "Adds advanced 3D features such as lighting, shadows, 3D audio, object and camera controls, split-screen rendering, and camera screens.", - "version": "1.6.0", + "version": "1.6.1", "description": [ "3D features added by this extension: ", "- Add lights to 3D scenes", @@ -280,7 +280,7 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "if (gdjs._A3F.Vec1) return;\r", + "if (typeof THREE === \"undefined\" || gdjs._A3F.Vec1) return;\r", "//\r", "gdjs._A3F.Vec1 = new THREE.Vector3();\r", "gdjs._A3F.Vec2 = new THREE.Vector3();\r", @@ -321,7 +321,8 @@ { "type": "BuiltinCommonInstructions::JsCode", "inlineCode": [ - "if (gdjs._A3F.AudioBufferCache) return;", + "if (!gdjs._A3F.AudioBufferCache) gdjs._A3F.AudioBufferCache = new Map();", + "if (typeof THREE === \"undefined\" || gdjs._A3F.AudioListener) return;", "/**", " * CustomAudioListenerForGD", " * ", @@ -408,10 +409,7 @@ " }", "}", "// AudioListener and AudioBufferCache", - "if (THREE) {", - " gdjs._A3F.AudioListener = new CustomAudioListenerForGD();", - "}", - "gdjs._A3F.AudioBufferCache = new Map();", + "gdjs._A3F.AudioListener = new CustomAudioListenerForGD();", "", "" ],