Browse Source

safari fix 😡

Gregg Tavares 5 years ago
parent
commit
d0351c40c7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      threejs/lessons/resources/threejs-align-html-elements-to-3d.js

+ 1 - 1
threejs/lessons/resources/threejs-align-html-elements-to-3d.js

@@ -139,7 +139,7 @@ import {GUI} from '../../../3rdparty/dat.gui.module.js';
         };
 
         const darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
-        darkMatcher.addEventListener('change', render);
+        darkMatcher.addListener(render);
 
         function render() {
           const {rotation} = settings;