@zylem/game-lib 0.3.16 → 0.3.17
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 +38 -13
- package/dist/.vite/manifest.json +82 -12
- package/dist/core.d.ts +1 -1
- package/dist/lib/core/base-node-life-cycle.d.ts +14 -0
- package/dist/lib/core/base-node.d.ts +6 -2
- package/dist/lib/core/base-node.js +6 -2
- package/dist/lib/core/lazy-loader.d.ts +2 -2
- package/dist/lib/core/utility/nodes.d.ts +11 -0
- package/dist/lib/core/utility/nodes.js +27 -0
- package/dist/lib/core/utility/strings.d.ts +2 -0
- package/dist/lib/core/utility/strings.js +14 -0
- package/dist/lib/core/{utility.d.ts → utility/vector.d.ts} +0 -2
- package/dist/lib/core/utility/vector.js +8 -0
- package/dist/lib/core/vessel.d.ts +3 -1
- package/dist/lib/core/vessel.js +13 -9
- package/dist/lib/device/aspect-ratio.d.ts +37 -0
- package/dist/lib/device/aspect-ratio.js +44 -0
- package/dist/lib/entities/entity.d.ts +3 -1
- package/dist/lib/entities/entity.js +9 -5
- package/dist/lib/game/game-blueprint.d.ts +44 -0
- package/dist/lib/game/game-canvas.d.ts +34 -0
- package/dist/lib/game/game-canvas.js +57 -0
- package/dist/lib/game/game-config.d.ts +47 -0
- package/dist/lib/game/game-config.js +53 -0
- package/dist/lib/game/game-default.d.ts +18 -0
- package/dist/lib/game/game-default.js +24 -0
- package/dist/lib/game/game.d.ts +2 -5
- package/dist/lib/game/game.js +48 -72
- package/dist/lib/game/zylem-game.d.ts +12 -1
- package/dist/lib/game/zylem-game.js +55 -29
- package/dist/lib/graphics/material.d.ts +1 -1
- package/dist/lib/graphics/material.js +1 -1
- package/dist/lib/graphics/zylem-scene.d.ts +7 -7
- package/dist/lib/graphics/zylem-scene.js +26 -40
- package/dist/lib/stage/stage-blueprint.d.ts +44 -0
- package/dist/lib/stage/stage-blueprint.js +56 -0
- package/dist/lib/stage/stage-default.d.ts +9 -0
- package/dist/lib/stage/stage-default.js +42 -0
- package/dist/lib/stage/stage.d.ts +2 -2
- package/dist/lib/stage/stage.js +7 -5
- package/dist/lib/stage/zylem-stage.d.ts +4 -3
- package/dist/lib/stage/zylem-stage.js +38 -49
- package/dist/main.d.ts +2 -1
- package/dist/main.js +50 -48
- package/dist/stage.d.ts +3 -0
- package/dist/stage.js +20 -4
- package/dist/tests/stage/stage-blueprint.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lib/core/game-canvas.d.ts +0 -4
- package/dist/lib/core/utility.js +0 -20
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { createWorld as
|
|
2
|
-
import { Vector3 as o, Vector2 as
|
|
3
|
-
import { ZylemWorld as
|
|
4
|
-
import { ZylemScene as
|
|
5
|
-
import { setStageBackgroundColor as
|
|
6
|
-
import { ZylemBlueColor as
|
|
1
|
+
import { createWorld as c, addEntity as f, addComponent as u, removeEntity as p } from "bitecs";
|
|
2
|
+
import { Vector3 as o, Color as d, Vector2 as m } from "three";
|
|
3
|
+
import { ZylemWorld as h } from "../collision/world.js";
|
|
4
|
+
import { ZylemScene as y } from "../graphics/zylem-scene.js";
|
|
5
|
+
import { setStageBackgroundColor as g, setStageBackgroundImage as E, setStageVariables as w, resetStageVariables as b } from "./stage-state.js";
|
|
6
|
+
import { ZylemBlueColor as S } from "../core/utility/vector.js";
|
|
7
7
|
import { debugState as a } from "../debug/debug-state.js";
|
|
8
|
-
import { getGlobalState as
|
|
8
|
+
import { getGlobalState as l } from "../game/game-state.js";
|
|
9
9
|
import { LifeCycleBase as v } from "../core/lifecycle-base.js";
|
|
10
|
-
import
|
|
11
|
-
import { BaseNode as
|
|
10
|
+
import M from "../systems/transformable.system.js";
|
|
11
|
+
import { BaseNode as _ } from "../core/base-node.js";
|
|
12
12
|
import { nanoid as C } from "nanoid";
|
|
13
|
-
import { ZylemCamera as
|
|
14
|
-
import { Perspectives as
|
|
15
|
-
import { CameraWrapper as
|
|
16
|
-
import { StageDebugDelegate as
|
|
17
|
-
import { GameEntity as
|
|
18
|
-
const
|
|
19
|
-
class
|
|
20
|
-
type =
|
|
13
|
+
import { ZylemCamera as B } from "../camera/zylem-camera.js";
|
|
14
|
+
import { Perspectives as O } from "../camera/perspective.js";
|
|
15
|
+
import { CameraWrapper as P } from "../camera/camera.js";
|
|
16
|
+
import { StageDebugDelegate as R } from "./stage-debug-delegate.js";
|
|
17
|
+
import { GameEntity as W } from "../entities/entity.js";
|
|
18
|
+
const k = "Stage";
|
|
19
|
+
class Y extends v {
|
|
20
|
+
type = k;
|
|
21
21
|
state = {
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: S,
|
|
23
23
|
backgroundImage: null,
|
|
24
24
|
inputs: {
|
|
25
25
|
p1: ["gamepad-1", "keyboard"],
|
|
@@ -40,7 +40,7 @@ class K extends v {
|
|
|
40
40
|
isLoaded = !1;
|
|
41
41
|
_debugMap = /* @__PURE__ */ new Map();
|
|
42
42
|
entityAddedHandlers = [];
|
|
43
|
-
ecs =
|
|
43
|
+
ecs = c();
|
|
44
44
|
testSystem = null;
|
|
45
45
|
transformSystem = null;
|
|
46
46
|
debugDelegate = null;
|
|
@@ -55,18 +55,7 @@ class K extends v {
|
|
|
55
55
|
constructor(e = []) {
|
|
56
56
|
super(), this.world = null, this.scene = null, this.uuid = C();
|
|
57
57
|
const { config: t, entities: i, asyncEntities: s, camera: r } = this.parseOptions(e);
|
|
58
|
-
this.camera = r, this.children = i, this.pendingEntities = s, this.saveState({
|
|
59
|
-
backgroundColor: t.backgroundColor ?? this.state.backgroundColor,
|
|
60
|
-
backgroundImage: t.backgroundImage ?? this.state.backgroundImage,
|
|
61
|
-
inputs: t.inputs ?? this.state.inputs,
|
|
62
|
-
gravity: t.gravity ?? this.state.gravity,
|
|
63
|
-
variables: t.variables ?? this.state.variables,
|
|
64
|
-
entities: []
|
|
65
|
-
}), this.gravity = t.gravity ?? new o(0, 0, 0);
|
|
66
|
-
const n = this;
|
|
67
|
-
window.onresize = function() {
|
|
68
|
-
n.resize(window.innerWidth, window.innerHeight);
|
|
69
|
-
};
|
|
58
|
+
this.camera = r, this.children = i, this.pendingEntities = s, this.saveState({ ...this.state, ...t, entities: [] }), this.gravity = t.gravity ?? new o(0, 0, 0);
|
|
70
59
|
}
|
|
71
60
|
parseOptions(e) {
|
|
72
61
|
let t = {};
|
|
@@ -77,7 +66,7 @@ class K extends v {
|
|
|
77
66
|
return { config: t, entities: i, asyncEntities: s, camera: r };
|
|
78
67
|
}
|
|
79
68
|
isZylemStageConfig(e) {
|
|
80
|
-
return e && typeof e == "object" && !(e instanceof
|
|
69
|
+
return e && typeof e == "object" && !(e instanceof _) && !(e instanceof P);
|
|
81
70
|
}
|
|
82
71
|
isBaseNode(e) {
|
|
83
72
|
return e && typeof e == "object" && typeof e.create == "function";
|
|
@@ -101,8 +90,8 @@ class K extends v {
|
|
|
101
90
|
this.state = e;
|
|
102
91
|
}
|
|
103
92
|
setState() {
|
|
104
|
-
const { backgroundColor: e, backgroundImage: t } = this.state;
|
|
105
|
-
|
|
93
|
+
const { backgroundColor: e, backgroundImage: t } = this.state, i = e instanceof d ? e : new d(e);
|
|
94
|
+
g(i), E(t), w(this.state.variables ?? {});
|
|
106
95
|
}
|
|
107
96
|
/**
|
|
108
97
|
* Load and initialize the stage's scene and world.
|
|
@@ -112,9 +101,9 @@ class K extends v {
|
|
|
112
101
|
async load(e, t) {
|
|
113
102
|
this.setState();
|
|
114
103
|
const i = t || (this.camera ? this.camera.cameraRef : this.createDefaultCamera());
|
|
115
|
-
this.cameraRef = i, this.scene = new
|
|
116
|
-
const s = await
|
|
117
|
-
this.world = new
|
|
104
|
+
this.cameraRef = i, this.scene = new y(e, i, this.state);
|
|
105
|
+
const s = await h.loadPhysics(this.gravity ?? new o(0, 0, 0));
|
|
106
|
+
this.world = new h(s), this.scene.setup();
|
|
118
107
|
for (let r of this.children)
|
|
119
108
|
this.spawnEntity(r);
|
|
120
109
|
if (this.pendingEntities.length && (this.enqueue(...this.pendingEntities), this.pendingEntities = []), this.pendingPromises.length) {
|
|
@@ -122,18 +111,18 @@ class K extends v {
|
|
|
122
111
|
r.then((n) => this.spawnEntity(n)).catch((n) => console.error("Failed to resolve pending stage entity", n));
|
|
123
112
|
this.pendingPromises = [];
|
|
124
113
|
}
|
|
125
|
-
this.transformSystem =
|
|
114
|
+
this.transformSystem = M(this), this.isLoaded = !0;
|
|
126
115
|
}
|
|
127
116
|
createDefaultCamera() {
|
|
128
|
-
const e = window.innerWidth, t = window.innerHeight, i = new
|
|
129
|
-
return new
|
|
117
|
+
const e = window.innerWidth, t = window.innerHeight, i = new m(e, t);
|
|
118
|
+
return new B(O.ThirdPerson, i);
|
|
130
119
|
}
|
|
131
120
|
_setup(e) {
|
|
132
121
|
if (!this.scene || !this.world) {
|
|
133
122
|
this.logMissingEntities();
|
|
134
123
|
return;
|
|
135
124
|
}
|
|
136
|
-
a.on && (this.debugDelegate = new
|
|
125
|
+
a.on && (this.debugDelegate = new R(this));
|
|
137
126
|
}
|
|
138
127
|
_update(e) {
|
|
139
128
|
const { delta: t } = e;
|
|
@@ -159,10 +148,10 @@ class K extends v {
|
|
|
159
148
|
_destroy(e) {
|
|
160
149
|
this._childrenMap.forEach((t) => {
|
|
161
150
|
try {
|
|
162
|
-
t.nodeDestroy({ me: t, globals:
|
|
151
|
+
t.nodeDestroy({ me: t, globals: l() });
|
|
163
152
|
} catch {
|
|
164
153
|
}
|
|
165
|
-
}), this._childrenMap.clear(), this._removalMap.clear(), this._debugMap.clear(), this.world?.destroy(), this.scene?.destroy(), this.debugDelegate?.dispose(), this.isLoaded = !1, this.world = null, this.scene = null, this.cameraRef = null,
|
|
154
|
+
}), this._childrenMap.clear(), this._removalMap.clear(), this._debugMap.clear(), this.world?.destroy(), this.scene?.destroy(), this.debugDelegate?.dispose(), this.isLoaded = !1, this.world = null, this.scene = null, this.cameraRef = null, b();
|
|
166
155
|
}
|
|
167
156
|
/**
|
|
168
157
|
* Create, register, and add an entity to the scene/world.
|
|
@@ -171,7 +160,7 @@ class K extends v {
|
|
|
171
160
|
async spawnEntity(e) {
|
|
172
161
|
if (!this.scene || !this.world)
|
|
173
162
|
return;
|
|
174
|
-
const t = e.create(), i =
|
|
163
|
+
const t = e.create(), i = f(this.ecs);
|
|
175
164
|
if (t.eid = i, this.scene.addEntity(t), e.behaviors)
|
|
176
165
|
for (let s of e.behaviors) {
|
|
177
166
|
u(this.ecs, s.component, t.eid);
|
|
@@ -181,12 +170,12 @@ class K extends v {
|
|
|
181
170
|
}
|
|
182
171
|
t.colliderDesc && this.world.addEntity(t), e.nodeSetup({
|
|
183
172
|
me: e,
|
|
184
|
-
globals:
|
|
173
|
+
globals: l(),
|
|
185
174
|
camera: this.scene.zylemCamera
|
|
186
175
|
}), this.addEntityToStage(t);
|
|
187
176
|
}
|
|
188
177
|
buildEntityState(e) {
|
|
189
|
-
return e instanceof
|
|
178
|
+
return e instanceof W ? { ...e.buildInfo() } : {
|
|
190
179
|
uuid: e.uuid,
|
|
191
180
|
name: e.name,
|
|
192
181
|
eid: e.eid
|
|
@@ -229,7 +218,7 @@ class K extends v {
|
|
|
229
218
|
const i = this.world.collisionMap.get(e) ?? this._debugMap.get(e);
|
|
230
219
|
if (!i)
|
|
231
220
|
return !1;
|
|
232
|
-
this.world.destroyEntity(i), i.group ? this.scene.scene.remove(i.group) : i.mesh && this.scene.scene.remove(i.mesh),
|
|
221
|
+
this.world.destroyEntity(i), i.group ? this.scene.scene.remove(i.group) : i.mesh && this.scene.scene.remove(i.mesh), p(this.ecs, i.eid);
|
|
233
222
|
let s = null;
|
|
234
223
|
return this._childrenMap.forEach((r, n) => {
|
|
235
224
|
r.uuid === e && (s = n);
|
|
@@ -274,6 +263,6 @@ class K extends v {
|
|
|
274
263
|
}
|
|
275
264
|
}
|
|
276
265
|
export {
|
|
277
|
-
|
|
278
|
-
|
|
266
|
+
k as STAGE_TYPE,
|
|
267
|
+
Y as ZylemStage
|
|
279
268
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { game } from './lib/game/game';
|
|
2
2
|
export type { ZylemGameConfig } from './lib/game/game-interfaces';
|
|
3
|
+
export { gameConfig } from './lib/game/game-config';
|
|
3
4
|
export { stage } from './lib/stage/stage';
|
|
4
5
|
export { entitySpawner } from './lib/stage/entity-spawner';
|
|
5
6
|
export type { StageOptions } from './lib/stage/zylem-stage';
|
|
@@ -7,7 +8,7 @@ export { vessel } from './lib/core/vessel';
|
|
|
7
8
|
export { camera } from './lib/camera/camera';
|
|
8
9
|
export type { PerspectiveType } from './lib/camera/perspective';
|
|
9
10
|
export { Perspectives } from './lib/camera/perspective';
|
|
10
|
-
export type { Vect3 } from './lib/core/utility';
|
|
11
|
+
export type { Vect3 } from './lib/core/utility/vector';
|
|
11
12
|
export { box } from './lib/entities/box';
|
|
12
13
|
export { sphere } from './lib/entities/sphere';
|
|
13
14
|
export { sprite } from './lib/entities/sprite';
|
package/dist/main.js
CHANGED
|
@@ -1,56 +1,58 @@
|
|
|
1
1
|
import { game as m } from "./lib/game/game.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
2
|
+
import { gameConfig as a } from "./lib/game/game-config.js";
|
|
3
|
+
import { stage as f } from "./lib/stage/stage.js";
|
|
4
|
+
import { entitySpawner as s } from "./lib/stage/entity-spawner.js";
|
|
5
|
+
import { vessel as i } from "./lib/core/vessel.js";
|
|
6
|
+
import { camera as b } from "./lib/camera/camera.js";
|
|
7
|
+
import { Perspectives as h } from "./lib/camera/perspective.js";
|
|
8
|
+
import { ZylemBox as v, box as d } from "./lib/entities/box.js";
|
|
9
|
+
import { sphere as R } from "./lib/entities/sphere.js";
|
|
10
|
+
import { sprite as E } from "./lib/entities/sprite.js";
|
|
11
|
+
import { plane as w } from "./lib/entities/plane.js";
|
|
12
|
+
import { zone as D } from "./lib/entities/zone.js";
|
|
13
|
+
import { actor as I } from "./lib/entities/actor.js";
|
|
14
|
+
import { text as T } from "./lib/entities/text.js";
|
|
15
|
+
import { rect as A } from "./lib/entities/rect.js";
|
|
16
|
+
import { makeMoveable as S } from "./lib/actions/capabilities/moveable.js";
|
|
17
|
+
import { makeRotatable as j } from "./lib/actions/capabilities/rotatable.js";
|
|
18
|
+
import { makeTransformable as F } from "./lib/actions/capabilities/transformable.js";
|
|
19
|
+
import { ricochet2DInBounds as J } from "./lib/actions/behaviors/ricochet/ricochet-2d-in-bounds.js";
|
|
20
|
+
import { ricochet2DCollision as L } from "./lib/actions/behaviors/ricochet/ricochet-2d-collision.js";
|
|
21
|
+
import { boundary2d as O } from "./lib/actions/behaviors/boundaries/boundary.js";
|
|
22
|
+
import { destroy as U } from "./lib/entities/destroy.js";
|
|
23
|
+
import { Howl as W } from "howler";
|
|
23
24
|
import * as o from "three";
|
|
24
25
|
import * as r from "@dimforge/rapier3d-compat";
|
|
25
|
-
import { globalChange as
|
|
26
|
+
import { globalChange as Y, globalChanges as _, variableChange as $, variableChanges as oo } from "./lib/actions/global-change.js";
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
W as Howl,
|
|
29
|
+
h as Perspectives,
|
|
29
30
|
r as RAPIER,
|
|
30
31
|
o as THREE,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
v as ZylemBox,
|
|
33
|
+
I as actor,
|
|
34
|
+
O as boundary2d,
|
|
35
|
+
d as box,
|
|
36
|
+
b as camera,
|
|
37
|
+
U as destroy,
|
|
38
|
+
s as entitySpawner,
|
|
38
39
|
m as game,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
S as
|
|
43
|
-
j as
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
R as
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
a as gameConfig,
|
|
41
|
+
Y as globalChange,
|
|
42
|
+
_ as globalChanges,
|
|
43
|
+
S as makeMoveable,
|
|
44
|
+
j as makeRotatable,
|
|
45
|
+
F as makeTransformable,
|
|
46
|
+
w as plane,
|
|
47
|
+
A as rect,
|
|
48
|
+
L as ricochet2DCollision,
|
|
49
|
+
J as ricochet2DInBounds,
|
|
50
|
+
R as sphere,
|
|
51
|
+
E as sprite,
|
|
52
|
+
f as stage,
|
|
53
|
+
T as text,
|
|
54
|
+
$ as variableChange,
|
|
55
|
+
oo as variableChanges,
|
|
56
|
+
i as vessel,
|
|
57
|
+
D as zone
|
|
56
58
|
};
|
package/dist/stage.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { stage } from './lib/stage/stage';
|
|
2
2
|
export { entitySpawner } from './lib/stage/entity-spawner';
|
|
3
3
|
export type { StageOptions } from './lib/stage/zylem-stage';
|
|
4
|
+
export { stageBlueprintsState, createStageBlueprint, upsertStageBlueprint, removeStageBlueprint, getStageBlueprint, listStageBlueprints, setCurrentStageBlueprint, getCurrentStageBlueprint, buildStageFromBlueprint, resetStageBlueprints, } from './lib/stage/stage-blueprint';
|
|
5
|
+
export type { StageBlueprint } from './lib/stage/stage-blueprint';
|
|
6
|
+
export { stageDefaultsState, setStageDefaults, resetStageDefaults, getStageDefaultConfig, } from './lib/stage/stage-default';
|
package/dist/stage.js
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import { stage as
|
|
2
|
-
import { entitySpawner as
|
|
1
|
+
import { stage as r } from "./lib/stage/stage.js";
|
|
2
|
+
import { entitySpawner as g } from "./lib/stage/entity-spawner.js";
|
|
3
|
+
import { buildStageFromBlueprint as l, createStageBlueprint as p, getCurrentStageBlueprint as n, getStageBlueprint as s, listStageBlueprints as S, removeStageBlueprint as i, resetStageBlueprints as o, setCurrentStageBlueprint as B, stageBlueprintsState as f, upsertStageBlueprint as m } from "./lib/stage/stage-blueprint.js";
|
|
4
|
+
import { getStageDefaultConfig as D, resetStageDefaults as C, setStageDefaults as b, stageDefaultsState as c } from "./lib/stage/stage-default.js";
|
|
3
5
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
l as buildStageFromBlueprint,
|
|
7
|
+
p as createStageBlueprint,
|
|
8
|
+
g as entitySpawner,
|
|
9
|
+
n as getCurrentStageBlueprint,
|
|
10
|
+
s as getStageBlueprint,
|
|
11
|
+
D as getStageDefaultConfig,
|
|
12
|
+
S as listStageBlueprints,
|
|
13
|
+
i as removeStageBlueprint,
|
|
14
|
+
o as resetStageBlueprints,
|
|
15
|
+
C as resetStageDefaults,
|
|
16
|
+
B as setCurrentStageBlueprint,
|
|
17
|
+
b as setStageDefaults,
|
|
18
|
+
r as stage,
|
|
19
|
+
f as stageBlueprintsState,
|
|
20
|
+
c as stageDefaultsState,
|
|
21
|
+
m as upsertStageBlueprint
|
|
6
22
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
package/dist/lib/core/utility.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Color as i } from "three";
|
|
2
|
-
import { Vector3 as n } from "@dimforge/rapier3d-compat";
|
|
3
|
-
const u = new i("#0333EC");
|
|
4
|
-
function f(r) {
|
|
5
|
-
const e = Object.keys(r).sort().reduce((t, o) => (t[o] = r[o], t), {});
|
|
6
|
-
return JSON.stringify(e);
|
|
7
|
-
}
|
|
8
|
-
function h(r) {
|
|
9
|
-
let e = 0;
|
|
10
|
-
for (let t = 0; t < r.length; t++)
|
|
11
|
-
e = Math.imul(31, e) + r.charCodeAt(t) | 0;
|
|
12
|
-
return e.toString(36);
|
|
13
|
-
}
|
|
14
|
-
new n(0, 0, 0);
|
|
15
|
-
new n(1, 1, 1);
|
|
16
|
-
export {
|
|
17
|
-
u as ZylemBlueColor,
|
|
18
|
-
h as shortHash,
|
|
19
|
-
f as sortedStringify
|
|
20
|
-
};
|