Skip to content

Instantly share code, notes, and snippets.

View daybrush's full-sized avatar
😀
HAHAHAHAHAHA

Daybrush (Younkue Choi) daybrush

😀
HAHAHAHAHAHA
View GitHub Profile
const { removed, added, ordered, pureChanged,prevList, list } = result;
const nextList = prevList.slice();
removed.forEach(index => {
nextList.splice(index, 1);
});
ordered.forEach(([from, to], i) => {
nextList.splice(from, 1);
nextList.splice(to, 0, list[pureChanged[i][1]]);
scene.set({
"[data-typing='i']": Scene.typing({ text: "I ", duration: 1}),
"[data-typing='frontend']": {
1: Scene.typing({ text: "'m Front-End", duration: 1}),
},
"[data-typing='engineer']": {
1.5: Scene.typing({ text: "Engineer", duration: 1}),
},
"[data-typing='with']": {
3.3: Scene.typing({ text: "with", duration: 0.5}),
Scene.kineticFrame({ left: "20px", top: "-40px" });
.kinetic {
transform: translate(20px, -40px);
transform-origin: calc(50% - 20px) calc(50% + 40px);
}
@daybrush
daybrush / scene.typing.js
Created June 18, 2019 18:38
scene.typing.js
Scene.typing({ text: "Make a typing effect with Scene.js." });
@daybrush
daybrush / scene.js
Last active June 24, 2019 13:25
Make a typing effect with Scene.js
const text = "Make a typing effect with Scene.js.";
const length = text.length;
let count = 0;
setTimeout(function loop() {
element.innerHTML = text.substring(0, count++);
if (count >= length) {
return;
@daybrush
daybrush / README.md
Last active May 22, 2024 10:15
Scene.js README.md

Scene.js

npm version

🎬 Scene.js is an JavaScript & CSS timeline-based animation library.

About Scene.js  / 

@daybrush
daybrush / index.html
Created June 2, 2019 23:32
Scene.js examples number description
<div class="squares">
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
/* Scene.js */
new Scene({
".selector": {
0: {
transform: {
tranlsate: "0px",
},
},
1: {
transform: {