@woosh/meep-engine 2.83.0 → 2.84.1

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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.83.0",
8
+ "version": "2.84.1",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,7 @@
1
+ export declare function array_copy<T>(
2
+ source: ArrayLike<T>,
3
+ source_position: number,
4
+ destination: ArrayLike<T>,
5
+ destination_position: number,
6
+ length: number
7
+ ): void;
@@ -0,0 +1,6 @@
1
+ export declare function sh3_sample_by_direction(
2
+ result: ArrayLike<number>, result_offset: number,
3
+ harmonics: ArrayLike<number>, harmonics_offset: number,
4
+ dimension_count: number,
5
+ direction: ArrayLike<number>, direction_offset: number
6
+ ): void
@@ -0,0 +1,9 @@
1
+ import {PointSet} from "./PointSet";
2
+
3
+ export declare class Miniball {
4
+ constructor(points: PointSet)
5
+
6
+ size(): number
7
+
8
+ center(): ArrayLike<number>
9
+ }
@@ -0,0 +1,3 @@
1
+ export declare class PointSet {
2
+ constructor(size: number, dimensions: number, data: ArrayLike<number>)
3
+ }
File without changes
@@ -0,0 +1 @@
1
+ export declare function v3_length(x: number, y: number, z: number): number
@@ -0,0 +1,4 @@
1
+ import {UvEncoder} from "./UvEncoder";
2
+
3
+ export declare class OctahedralUvEncoder extends UvEncoder {
4
+ }
@@ -0,0 +1,7 @@
1
+ import {vec2, vec3} from "gl-matrix";
2
+
3
+ export declare class UvEncoder {
4
+ uv_to_unit(output: vec3, input: vec2): void
5
+
6
+ unit_to_uv(output: vec2, inout: vec3): void
7
+ }
@@ -1,43 +0,0 @@
1
- import { AbstractAsyncMap } from "./AbstractAsyncMap.js";
2
-
3
- /**
4
- * Two-tier key-value storage. Intended to accelerate slow asynchronous
5
- * storage with a fast but limited (in space and reliability) cache in front.
6
- *
7
- * First tier (volatile) is considered to be fast an unreliable,
8
- * whereas second tier (persisted) is considered to be reliable, but slow.
9
- */
10
- export class CachedAsyncMap extends AbstractAsyncMap {
11
- /**
12
- *
13
- * @param {AbstractAsyncMap} volatile data here may be lost at any point, this is our "cache"
14
- * @param {AbstractAsyncMap} persisted data here is stored reliably
15
- */
16
- constructor(volatile, persisted) {
17
- super();
18
-
19
- this.__volatile = volatile;
20
- this.__persisted = persisted;
21
- }
22
-
23
- async get(key) {
24
- const volatile_value = await this.__volatile.get(key);
25
-
26
- if (volatile_value !== undefined && volatile_value !== null) {
27
- return volatile_value;
28
- }
29
-
30
- // TODO re-insert into volatile if persisted has a hit
31
-
32
- return await this.__persisted.get(key);
33
- }
34
-
35
- async set(key, value) {
36
- const lock = this.__volatile.set(key, value);
37
-
38
- // don't wait for completion on persisted
39
- this.__persisted.set(key, value);
40
-
41
- await lock;
42
- }
43
- }
@@ -1,47 +0,0 @@
1
- import { CachedAsyncMap } from "./CachedAsyncMap.js";
2
- import { AsyncMapWrapper } from "./AsyncMapWrapper.js";
3
-
4
- test("'get' retrieves data if it is available in volatile level", async () => {
5
-
6
- const first = new Map();
7
-
8
- const sut = new CachedAsyncMap(new AsyncMapWrapper(first), new AsyncMapWrapper());
9
-
10
- first.set(1, 3);
11
-
12
- expect(await sut.get(1)).toBe(3);
13
- });
14
-
15
- test("'get' retrieves data if it is available in persisted level", async () => {
16
-
17
- const second = new Map();
18
-
19
- const sut = new CachedAsyncMap(new AsyncMapWrapper(), new AsyncMapWrapper(second));
20
-
21
- second.set(1, 3);
22
-
23
- expect(await sut.get(1)).toBe(3);
24
- });
25
-
26
- test("'set' propagates data into volatile level", async () => {
27
-
28
- const first = new Map();
29
-
30
- const sut = new CachedAsyncMap(new AsyncMapWrapper(first), new AsyncMapWrapper());
31
-
32
- await sut.set(1, 3);
33
-
34
- expect(first.get(1)).toBe(3);
35
- });
36
-
37
-
38
- test("'set' propagates data into persisted level", async () => {
39
-
40
- const second = new Map();
41
-
42
- const sut = new CachedAsyncMap(new AsyncMapWrapper(), new AsyncMapWrapper(second));
43
-
44
- await sut.set(1, 3);
45
-
46
- expect(second.get(1)).toBe(3);
47
- });