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();", "", "" ],