In my ThreeJS project, I am implementing an interactive feature where users can click on cubes that behave differently when clicked, such as having different color animations.
To achieve this, I plan to create extension classes for the THREE.Mesh object and incorporate custom functions and attributes. By doing so, I aim to segregate the various cube behaviors and enhance the clarity of my code.
Although I attempted to utilize John Resig's method for class extension, it appears to only work effectively with classes that ultimately derive from his "Class" class.
Is there an alternative approach to accomplish this goal?