@inglorious/logo 2.0.14 → 2.0.16
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/package.json +1 -1
- package/src/handlers.js +6 -0
- package/src/render.js +1 -1
- package/src/utils.js +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/logo",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "The Inglorious Coderz logo, remade to be compatible with Inglorious Web.",
|
|
5
5
|
"author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
package/src/handlers.js
CHANGED
|
@@ -53,6 +53,9 @@ export const logo = {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
export function startInteraction(entity, api) {
|
|
56
|
+
// skip during SSX
|
|
57
|
+
if (typeof document === "undefined") return
|
|
58
|
+
|
|
56
59
|
moveListener = createMoveListener(entity.id, api)
|
|
57
60
|
document.addEventListener(eventType, moveListener, {
|
|
58
61
|
passive: !entity.isScrollPrevented,
|
|
@@ -60,6 +63,9 @@ export function startInteraction(entity, api) {
|
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
export function stopInteraction() {
|
|
66
|
+
// skip during SSX
|
|
67
|
+
if (typeof document === "undefined") return
|
|
68
|
+
|
|
63
69
|
document.removeEventListener(eventType, moveListener)
|
|
64
70
|
}
|
|
65
71
|
|
package/src/render.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { html, styleMap, when } from "@inglorious/web"
|
|
18
18
|
|
|
19
19
|
import eye from "./assets/eye.svg"
|
|
20
|
-
import * as faces from "./assets/faces"
|
|
20
|
+
import * as faces from "./assets/faces/index.js"
|
|
21
21
|
|
|
22
22
|
const MINUS_FORTY_DEGREES = -0.6981
|
|
23
23
|
const MINUS_FORTY_FIVE_DEGREES = -0.7854
|