3D Part Preview added to Parts Tracker


RE: 3D Part Preview added to Parts Tracker
#31
(2019-07-16, 2:00)Orion Pobursky Wrote: I'm sure it's possible but Lasse will need to chime in about how to do it.

A quick and dirty approach to this is to use the same type of method overwriting as for the other modes:

Code:
var acceptedColors = [1, 2, 4, 5, 13, 14, 19, 22, 25, 27, 69, 71, 72, 73, 74, 77, 288, 308, 484];
   THREE.LDRStep.prototype.addSubModel = function(subModel) {
     subModel.colorID = acceptedColors[Math.floor(Math.random() * acceptedColors.length)];
     this.subModels.push(subModel);
   }

This leaves each type of part with a random color. All studs on a brick will thus be colored the same random color.

If you want each part to have its own color (such as each stud on a brick in its own color) then additional functions have to be overwritten.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: 3D Part Preview added to Parts Tracker - by Lasse Deleuran - 2019-07-16, 6:41

Forum Jump:


Users browsing this thread: 2 Guest(s)