I am currently working on an application that utilizes different standard geometries, such as box geometry. The application can apply up to 5 levels of subdivision on the original geometry. I am facing challenges in coding a color-coding system for the vertices to visualize the disparity between the iterations/levels of subdivision.
My goal is to have the vertices of the original geometry (no subdivision applied) colored one way (e.g., purple), and then differentiate the new vertices created from the subdivision with another color (e.g., red) in subsequent iterations. Is there a method to achieve this?
UPDATE: While I have managed to add colored points to each vertex, I still encounter certain issues. Specifically, when it comes to shapes like cylinders, extra vertices seem to be present, creating confusion about their placement and how to remove them.
I am also struggling to distinguish between the various subdivision levels. Any insights or assistance would be highly appreciated.
https://i.sstatic.net/KcJDC.png
https://i.sstatic.net/9PgqY.png
import * as THREE from 'three';
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import LoopSubdivision from './LoopSubdivision.js';
import { OBJLoader } from 'three/addons/loaders/OBJLoader.js';
// Rest of the JavaScript code goes here...