update(time)
	{
		if (this.treasureobj)
		{
			this.treasureobj.rotation.y += this.spatial.rot;
			this.treasureobj.position.y = 2* Math.sin(2 * time+1) +8;
		}
	}
// updating rotation of the treasure based on received inputs
updating rotation of the treasure based on received inputs
updating rotation of the treasure based on received inputs
update(time)
	{
		if (this.treasureobj)
		{
			this.treasureobj.rotation.y += this.spatial.rot;
			this.treasureobj.position.y = 2* Math.sin(2 * time+1) +8;
		}
	}
update ( time ) { if ( this . treasureobj ) { this . treasureobj . rotation . y += this . spatial . rot ; this . treasureobj . position . y = 2 * Math . sin ( 2 * time + 1 ) + 8 ; } }
updating rotation of the treasure based on received inputs
updating rotation of the treasure based on received inputs