PIXI text effect
How do I make an pixi text effect?
What is a pixi text effect? How do you make a pixi text effect? This script and codes were developed by Luca De Blasio on 04 September 2022, Sunday.
PIXI text effect - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>PIXI text effect</title>
</head>
<body> <script src='https://cdnjs.cloudflare.com/ajax/libs/pixi.js/4.2.3/pixi.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/TweenMax.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
PIXI text effect - Script Codes JS Codes
var renderer = new PIXI.WebGLRenderer( 600, 300, {antialias: true, transparent: false, resolution: 1, autoResize: 1});
var stage = new PIXI.Container();
document.body.appendChild(renderer.view);
var text = 'hello'.split('');
var textLetters = [];
var textLettersMasks = [];
var maskSize = { x : 0
};
text.forEach( function(letter,i) { var t = new PIXI.Text(letter.toUpperCase(), { fontFamily: "Arial", fontSize: 100, fill: "#fff", letterSpacing: 1 }); var s = new PIXI.Graphics(); s.beginFill(0xFFFF00); s.drawRect(0, 0, 600, 300); s.height = 100; s.width = maskSize.x; s.position.y = 100; s.position.x = 70*(i+1); textLettersMasks.push(s); t.height = 100; t.width = 70; t.position.y = 100; t.position.x = 70*(i+1); textLetters.push(t); t.mask = s; stage.addChild(t)
});
renderer.render(stage);
function animate() { textLettersMasks.forEach( function(mask,i) { mask.width = maskSize.x; }); renderer.render(stage);
}
TweenLite.to(maskSize, 3, {x:70,ease:Back.easeOut.config(1.7)});
TweenLite.ticker.addEventListener("tick", animate);
Developer | Luca De Blasio |
Username | LucaDb |
Uploaded | September 04, 2022 |
Rating | 3 |
Size | 1,908 Kb |
Views | 68,816 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Nintendo Switch | 1,989 Kb |
Medium Loader Canvas Example | 2,030 Kb |
Svg tiger | 23,970 Kb |
Svg vs base64img | 5,473 Kb |
PIXI Glitch FIlter | 2,553 Kb |
Threejs load obj | 4,774 Kb |
Prova gyro | 5,472 Kb |
A Pen by Luca De Blasio | 2,271 Kb |
360 Video with Three js | 2,955 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Mandelbrot Fractal | _Billy_Brown | 2,706 Kb |
Sidebar Thing | Jonambas | 2,779 Kb |
Kudos Please | TimPietrusky | 6,624 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
Svg penguin | _massimo | 2,990 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
Slide like Mailbox | Hmps | 3,758 Kb |
The Fly | GianlucaGuarini | 3,405 Kb |
Exploding Text | Jjmartucci | 4,749 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!