How to use the co.lanica.platino.createTransform function in co

To help you get started, we’ve selected a few co examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NatWeiss / BreakoutClones / Control / Titanium / Resources / MenuScene.js View on Github external
// Logo label
		logoLabel = platino.createTextSprite({
			text: logoText,
			fontSize: 220,
			fontFamily: "Dolce Vita",
			alpha: 0.5
		});
		size = logoLabel.sizeWithText(logoLabel.text);
		logoLabel.center = {x: logo.center.x - size.width * .5, y: logo.center.y - size.height * .5};
		scene.add(logoLabel);

		// Logo tween
		var tweenY = 25;
		logo.y -= tweenY * .5;
		transform = platino.createTransform({
			duration: 2000,
			y: logo.y + tweenY,
			autoreverse: true,
			repeat: -1,
			easing: platino.ANIMATION_CURVE_EASE_IN_OUT
		});
		logo.transform(transform);

		// Play label
		var xOffset = 300;
		var yOffset = 400;
		playLabel = platino.createTextSprite({
			text: "Play",
			fontSize: 120,
			fontFamily: "Dolce Vita",
			alpha: 0.333
github NatWeiss / RapidGame / templates / titanium / TwoScene / Resources / MenuScene.js View on Github external
// Logo label
		logoLabel = platino.createTextSprite({
			text: logoText,
			fontSize: 220,
			fontFamily: "Dolce Vita",
			alpha: 0.5
		});
		size = logoLabel.sizeWithText(logoLabel.text);
		logoLabel.center = {x: logo.center.x - size.width * .5, y: logo.center.y - size.height * .5};
		scene.add(logoLabel);

		// Logo tween
		var tweenY = 25;
		logo.y -= tweenY * .5;
		transform = platino.createTransform({
			duration: 2000,
			y: logo.y + tweenY,
			autoreverse: true,
			repeat: -1,
			easing: platino.ANIMATION_CURVE_EASE_IN_OUT
		});
		logo.transform(transform);

		// Play label
		var xOffset = 0;
		var yOffset = 400;
		playLabel = platino.createTextSprite({
			text: "Play",
			fontSize: 120,
			fontFamily: "Dolce Vita",
			alpha: 0.333
github NatWeiss / BreakoutClones / Control / Titanium / Resources / GameScene.js View on Github external
scene.createBrickExplosion = function(x, y) {
		var i,
			count = 15,
			xRange = 400,
			yRange = 100,
			xMin = x-xRange,
			xMax = x+xRange,
			yMin = y-yRange,
			yMax = y+yRange,
			transform;
		
		for (i = 0; i < count; i++) {
			transform = platino.createTransform({
				duration: rand(250, 500),
				x: rand(xMin, xMax),
				y: rand(yMin, yMax),
				scaleX: 0.3,
				scaleY: 0.3,
				alpha: 0
			});
			transform.sprite = platino.createSprite({image: "Particle.png"});
			transform.sprite.anchorPoint = {x: 0.5, y: 0.5};
			transform.sprite.x = x;
			transform.sprite.y = y;
			scene.add(transform.sprite);
			transform.addEventListener("complete", function(e){
				e.source.sprite.hide();
				e.source.sprite.dispose();
				e.source.sprite = null;