JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

JavaScript

"use strict"

// LEVEL DOCUMENT FOR SCUBANAUT //

if(typeof(levels) == "undefined"){
	
	var levels = new Array();
	
}

// map size is 1.5 KM radius

levels['level_learning_to_dive'] = {
	
	id: 'learning_to_dive',
	mode: 1,
	title: "Underwater Volcano",
	locked: false,
	
	soundtrack: "assets/soundtracks/call.from.a.siren.mp3",
	menuImage: "assets/gui/levels/learning.to.dive.jpg",
	
	/*
	bubbles: [
		{ 
			position: new window.BABYLON.Vector3(111.09,71,3.17),
			count: 64,
			scale: 1
		},
		{
			position: new window.BABYLON.Vector3(-255.93,2.3,61.93),
			count: 48,
			scale: 1.2
		}
		
	],
	*/
	
	poi: [
		{
			name: "Volcanic Vent",
			position: new window.BABYLON.Vector3(113.09,74,3.17),
			scaling: new window.BABYLON.Vector3(0.5,0.5,0.5),
			audio: "assets/poi/audio/volcanic.vent.mp3",
			inVehicleEnabled: false,
			range: 16,
			triggered: false,
			triggerOn: function(){
				
				window.blink(10,function(){});
				
			},
			triggerOff: function(){
				
				window.blink(15,function(){});
				
			}
		},
		{
			name: "Smaller Active Volcano",
			position: new window.BABYLON.Vector3(-256.93,5.72,60.93),
			scaling: new window.BABYLON.Vector3(0.5,0.5,0.5),
			audio: "assets/poi/audio/volcanic.cone.mp3",
			inVehicleEnabled: true,
			range: 60,
			triggered: false,
			triggerOn: function(){
				
				window.blink(20,function(){
					
					
					
				});
				
			},
			triggerOff: function(){
				
				window.blink(15,function(){
					
					
					
					
				});
				
			}
		}
		
	],
	props: [
		{
			name: "grass",
			scale: 0.4,
			count: 500,
			minIncline: -0.1,
			maxIncline: 1.6,
			minY: -1,
			maxY: 100,
			brightness: 1,
			colors: [
				{
					r: 59/255,
					g: 143/255,
					b: 31/255
				},
				{
					r: 79/255,
					g: 143/255,
					b: 31/255
				},
				{
					r: 59/255,
					g: 153/255,
					b: 21/255
				},
				{
					r: 59/255,
					g: 163/255,
					b: 41/255
				},
				{
					r: 59/255,
					g: 153/255,
					b: 31/255
				}
			],
			renderIndex:...