// CLIMB TRACK FOR SCUBANAUT
function Climb(data){
Climb.prototype.setData(data);
}
Climb.prototype.data = [];
Climb.prototype.observable;
Climb.prototype.flagMeshStake; // the non-emissive part of the flag
Climb.prototype.flagMeshBulb; // the non-emissive part of the flag
// DATA Required in the form of an array of objects with the format:
/*
{
position: V3,
rotation: V3,
onReached: function(){
// what happens when they have reached the flag
},
reached: false
}
*/
Climb.prototype.setData = function(data){
Climb.prototype.data = data;
}
Climb.prototype.buildFlagMeshes = function(){
}
Climb.prototype.buildFlag = function(){
}
// EXAMPLE OF CREATING ANEW INSTANCE OF THE PROTOTYPE
var c = new Climb([
{
position: { x: 0, y: 0, z: 0 },
rotation: { x: 0, y: 0, z: 0 },
onReached: function(){
},
reached: false
},
{
position: { x: 10, y: 10, z: 10 },
rotation: { x: 0, y: 0, z: 0 },
onReached: function(){
},
reached: false
}
]);
console.log(c);
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.