easter-egg-quest 1.0.1 โ 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +45 -51
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
# ๐ฅ Easter Egg Quest
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Something is hiding on your website. Your visitors don't know it yet.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One line of code โ and your page holds a secret. A poetic journey disguised as ordinary text. Three riddles. Three eggs. One question: *will they notice?*
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
No buttons. No banners. No hints. Just a quiet invitation woven into the fabric of your page.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Those who find it will never look at your website the same way again.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### One line (CDN)
|
|
10
16
|
|
|
11
17
|
```html
|
|
12
|
-
<script src="https://unpkg.com/easter-egg-quest"></script>
|
|
13
|
-
<script>
|
|
14
|
-
EasterEggQuest.init();
|
|
15
|
-
</script>
|
|
18
|
+
<script src="https://unpkg.com/easter-egg-quest/dist/easter-egg-quest.umd.js"></script>
|
|
16
19
|
```
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
Nothing else needed. The script activates itself after your page loads.
|
|
19
22
|
|
|
20
|
-
### npm
|
|
23
|
+
### npm / yarn
|
|
21
24
|
|
|
22
25
|
```bash
|
|
23
26
|
npm install easter-egg-quest
|
|
@@ -29,59 +32,50 @@ import { EasterEggQuest } from 'easter-egg-quest';
|
|
|
29
32
|
EasterEggQuest.init();
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## What happens next?
|
|
38
|
+
|
|
39
|
+
That's for your visitors to discover.
|
|
40
|
+
|
|
41
|
+
We'll only say this: the experience has three chapters, each asking something different. Something about stillness. Something about motion. Something about the space between.
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
2. **Stage 1: Stillness** โ stop moving. The egg comes to those who wait
|
|
36
|
-
3. **Stage 2: Motion** โ keep moving. Be the river
|
|
37
|
-
4. **Stage 3: Rhythm** โ find the pulse. Breathe
|
|
38
|
-
5. **Finale** โ all three eggs appear in a 3D carousel with a "Happy Easter!" greeting
|
|
39
|
-
6. **Results** โ a personalized profile card based on your behavior (shareable as image)
|
|
43
|
+
The whole thing takes a few minutes. At the end, each person gets a unique result โ a portrait of how they moved through the unknown.
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
---
|
|
42
46
|
|
|
43
47
|
## Configuration
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
Everything works out of the box. But if you want control:
|
|
46
50
|
|
|
47
51
|
```js
|
|
48
52
|
EasterEggQuest.init({
|
|
49
|
-
// Lifecycle callbacks
|
|
50
53
|
callbacks: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onEggFound: (eggIndex) => {},
|
|
55
|
-
onComplete: (score) => {},
|
|
56
|
-
onDestroy: () => {},
|
|
54
|
+
onComplete: (score) => {
|
|
55
|
+
// The visitor finished the quest
|
|
56
|
+
},
|
|
57
57
|
},
|
|
58
58
|
|
|
59
|
-
// Stage durations
|
|
60
59
|
stageDurations: {
|
|
61
60
|
stillnessMs: 20000,
|
|
62
61
|
motionMs: 20000,
|
|
63
62
|
rhythmCycles: 6,
|
|
64
63
|
},
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
renderer: 'auto',
|
|
65
|
+
renderer: 'auto', // 'auto' | '3d' | '2d'
|
|
68
66
|
|
|
69
|
-
// Accessibility
|
|
70
67
|
accessibility: {
|
|
71
|
-
reducedMotion: 'auto',
|
|
72
|
-
disableHiddenEntry: false,
|
|
68
|
+
reducedMotion: 'auto',
|
|
69
|
+
disableHiddenEntry: false,
|
|
73
70
|
},
|
|
74
71
|
|
|
75
|
-
// Hidden entry targeting
|
|
76
72
|
hiddenEntry: {
|
|
77
|
-
selector: undefined,
|
|
78
|
-
excludeSelectors: [],
|
|
73
|
+
selector: undefined,
|
|
74
|
+
excludeSelectors: [],
|
|
79
75
|
},
|
|
80
76
|
|
|
81
|
-
// Custom narrative text
|
|
82
77
|
narrative: {
|
|
83
|
-
//
|
|
84
|
-
// stage1Intro: ['your', 'custom', 'lines'],
|
|
78
|
+
// Your own words for any chapter
|
|
85
79
|
},
|
|
86
80
|
});
|
|
87
81
|
```
|
|
@@ -89,26 +83,26 @@ EasterEggQuest.init({
|
|
|
89
83
|
## API
|
|
90
84
|
|
|
91
85
|
```js
|
|
92
|
-
EasterEggQuest.init(config?) //
|
|
93
|
-
EasterEggQuest.pause() //
|
|
94
|
-
EasterEggQuest.resume() //
|
|
95
|
-
EasterEggQuest.destroy() //
|
|
86
|
+
EasterEggQuest.init(config?) // Awaken the quest
|
|
87
|
+
EasterEggQuest.pause() // Freeze time
|
|
88
|
+
EasterEggQuest.resume() // Let it breathe again
|
|
89
|
+
EasterEggQuest.destroy() // Erase all traces
|
|
96
90
|
```
|
|
97
91
|
|
|
98
|
-
|
|
92
|
+
---
|
|
99
93
|
|
|
100
|
-
|
|
94
|
+
## Safe by design
|
|
101
95
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
96
|
+
- Your layout stays untouched โ everything floats above
|
|
97
|
+
- Styles are sealed in Shadow DOM โ no collisions
|
|
98
|
+
- Dangerous buttons (Buy, Delete, Submit) are never used as entry points
|
|
99
|
+
- `destroy()` leaves your page exactly as it was
|
|
106
100
|
|
|
107
|
-
##
|
|
101
|
+
## Compatibility
|
|
108
102
|
|
|
109
|
-
Chrome
|
|
103
|
+
Chrome ยท Edge ยท Firefox ยท Safari ยท Mobile
|
|
110
104
|
|
|
111
|
-
Falls back
|
|
105
|
+
Falls back gracefully without WebGL.
|
|
112
106
|
|
|
113
107
|
## License
|
|
114
108
|
|
package/package.json
CHANGED