Browse Source

turn off antialiasing on texture diagrams

Gregg Tavares 4 years ago
parent
commit
99c00ccee7

+ 2 - 1
threejs/lessons/resources/threejs-lesson-utils.js

@@ -3,7 +3,7 @@ import {OrbitControls} from '../../resources/threejs/r127/examples/jsm/controls/
 
 export const threejsLessonUtils = {
   _afterPrettifyFuncs: [],
-  init() {
+  init(options = {threejsOptions:{}}) {
     if (this.renderer) {
       return;
     }
@@ -15,6 +15,7 @@ export const threejsLessonUtils = {
       canvas,
       alpha: true,
       powerPreference: 'low-power',
+      ...options.threejsOptions,
     });
     this.pixelRatio = Math.max(2, window.devicePixelRatio);
 

+ 3 - 0
threejs/lessons/resources/threejs-textures.js

@@ -108,6 +108,9 @@ import {threejsLessonUtils} from './threejs-lesson-utils.js';
     return ctx.canvas;
   }
 
+  threejsLessonUtils.init({
+    threejsOptions: {antialias: false},
+  });
   threejsLessonUtils.addDiagrams({
     filterCube: {
       create() {