Adding Method To Predefined THREE.js Class

Hii,
Can we add our own method to predefined class like I want to add my own method in THREE.Line.if yes can you give me one example.

Thanks & Regards
Gaurav

Yes, you can always add your own properties to any object in JavaScript - it’s generally recommended not to since because this can lead to hard to track down bugs (for example if you overwrite some existing code), however in practice if you are careful and make sure the name doesn’t conflict it should be fine.

THREE.Line.myMethod = function() {};
THREE.Line.myVariable = 3;