Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// 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
// 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
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;