konratnox
2/9/2016 - 2:50 PM

Лимпринт миски старый вариант для одинарной

Лимпринт миски старый вариант для одинарной

		

		СТАРЫЙ ВАРИАНТ
		var 
			text = $('#inscriptionExapmle').val().toUpperCase(),
			bowlWidth = 305,
			fontSize,
			leftPosition = 170,
			topPosition;
			console.log(text.length)
		for (var i = 0; i < text.length; i++) {
			var letter = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: '#F8F0D8',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '0px 0px 0 rgb(49,49,49)',
		  				stroke: 'rgb(49,49,49)',
		  				strokeWidth: 1
					});
				var letter1 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '1px -1px 0 rgb(43,43,43)',
					});
				var letter2 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '2px -2px 0 rgb(36,36,36)',
					});
				var letter3 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '3px -3px 0 rgb(29,29,29)',
					});
				var letter4 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '4px -4px 0 rgb(23,23,23)',
					});
				var letter5 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '5px -5px 0 rgb(16,16,16)',
					});
				var letter6 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '6px -6px 0 rgb(9,9,9)',
					});
				var letter7 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '7px -7px 0 rgb(2,2,2)',
					});
				var letter8 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '8px -8px 0 rgb(-4,-4,-4)',
					});
				var letter9 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '9px -9px 0 rgb(-11,-11,-11)',
					});
				var letter10 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '10px -10px 0 rgb(-18,-18,-18)',
					});
				var letter11 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '11px -11px 0 rgb(-24,-24,-24)',
					});
				var letter12 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '12px -12px 0 rgb(-31,-31,-31)',
					});
				var letter13 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '13px -13px 0 rgb(-38,-38,-38)',
					});
				var letter14 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '14px -14px 13px rgba(0,0,0,0)',
					});
				var letter15 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '14px -14px 1px rgba(0,0,0,0.5)',
					});
				var letter16 = new fabric.Text(text[i], {
						fontSize: 100,
						fontFamily: 'BookmanOldStd',
						fill: 'rgb(36,36,36)',
						top: 109,
		  				left: 179,
		  				height: 100,
		  				lineHeight: 1,
		  				shadow: '0px 0px 13px rgba(0,0,0,.2)',
					});


			var groupLetter = new fabric.Group([letter1, letter2, letter3, letter4, letter5, letter6, letter7, letter8, letter9, letter ], {
  				top: 109,
		  		left: leftPosition,
		  		fontFamily: 'BookmanOldStd',
			});
			canvas.add(groupLetter);
			console.log(groupLetter.width);
			leftPosition+=groupLetter.width;
		}
		canvas.renderAll();

Лимпринт миски старый вариант для одинарной