A nice moving bookshelf animation done only with css animations.
From Dribbble : https://dribbble.com/shots/2332418-Book-shelf-Loader-Icon
A Pen by Grélard Antoine on CodePen.
class GameEvent { | |
/** | |
* @param {string} target | |
* @param {string} trigger | |
* @param {string} weight | |
* @param {string} priority | |
*/ | |
constructor(target, trigger, weight, priority) { | |
this.target = String(target); | |
this.trigger = trigger; |
/* The dialogue setup - typically at the start of the passage */ | |
<<set _dialogue = { | |
"": { | |
text: "<div>Before you stands a wizard, clad in heavy robes, scarves, and a pointed hat. He gives a cheerful but heavily muffled greeting. <q>Ownt fon?</q> the wizard inquires as he holds out a handful of rings which radiate magical energy.</div><div>Take one?</div>", | |
choices: [ | |
{ text: "One with a shiny jewel on top!", next: "death" }, | |
{ text: "A band with runes glowing around it!", next: "runes" }, | |
{ text: "Mom told me not to accept strange items from people I don't know…", next: "death"}, | |
{ text: "Go away.", next: "death", filter: "$day != 7" } | |
]}, |
/** | |
* @param {string} tex | |
* @param {number[]} rect | |
*/ | |
var Sprite = function Sprite(tex, rect) { | |
var sp = this; | |
sp.tex = String(tex); | |
if (Array.isArray(rect)) { | |
if (rect.length != 4) { | |
throw new Error("new Sprite(): rect parameter needs to be exactly four numbers long - [x, y, width, height]"); |
A nice moving bookshelf animation done only with css animations.
From Dribbble : https://dribbble.com/shots/2332418-Book-shelf-Loader-Icon
A Pen by Grélard Antoine on CodePen.