var MESHBUILDER = function(options, scene, callback){
if(!options){
throw "MESHBUILDER CLASS requires an options object as first parameter";
}
if(!scene){
throw "MESHBUILDER CLASS requires a scene object as second parameter";
}
// default settings
if(!options.tessellation){
options.tessellation = 24; // double this value
}
if(!options.coverColor){
options.coverColor = new BABYLON.Color4(1,1,1,0.1); // double this value
}
if(!options.accents){
options.accents = true;
}
if(!options.endAccentsColor){
options.endAccentsColor = new BABYLON.Color4(1,0,0,1); // double this value
}
if(!options.len){
options.len = 18.288; // in meters = 60 feet for default
}
if(!options.segmentLength){
options.segmentLength = 1.8288; // in meters = 6 feet for default 24 foot width and 30 foot wide will change to 5 feet or 1.524M for 36 foot width
}
if(!options.segments){
options.segments = parseInt(options.len/options.segmentLength);
}
if(!options.width){
options.width = 7.3152/2; // in meters = 24 feet for default
}
if(!options.lap){
options.lap = 0.4; // in meters
}
if(!options.overlap){
options.overlap = 0.1; // in meters
}
if(!options.rungWidth){
options.rungWidth = 0.08; // in meters
}
if(!options.rungLap){
options.rungLap = 0.01; // in meters each side of rung
}
if(!options.rungSag){
options.rungSag = 0.005; // in meters
}
if(!options.material){
if(scene.getMaterialByName('wallMaterial')){
options.material = scene.getMaterialByName('wallMaterial');
} else {
options.material = new BABYLON.StandardMaterial("wallMaterial", scene);
options.material.alpha = 1;
options.material.diffuseColor = new BABYLON.Color3(0.9803921568627451,0.9803921568627451,0.9803921568627451);
options.material.specularColor = new BABYLON.Color3(0,0,0);
options.material.emissiveColor =...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.