simulationjsv2 0.2.0 → 0.2.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/dist/graphics.js +5 -1
- package/dist/simulation.d.ts +1 -1
- package/package.json +7 -7
package/dist/graphics.js
CHANGED
|
@@ -7,7 +7,11 @@ export class SimulationElement {
|
|
|
7
7
|
vertexCache;
|
|
8
8
|
constructor(pos, color = new Color()) {
|
|
9
9
|
this.pos = pos;
|
|
10
|
-
|
|
10
|
+
const temp = vector3(...this.pos);
|
|
11
|
+
vec3ToPixelRatio(temp);
|
|
12
|
+
for (let i = 0; i < this.pos.length; i++) {
|
|
13
|
+
this.pos[i] = temp[i];
|
|
14
|
+
}
|
|
11
15
|
this.color = color;
|
|
12
16
|
this.vertexCache = new VertexCache();
|
|
13
17
|
this.camera = null;
|
package/dist/simulation.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare class SceneCollection extends SimulationElement {
|
|
|
25
25
|
private scene;
|
|
26
26
|
constructor(name: string);
|
|
27
27
|
getName(): string;
|
|
28
|
-
add(el: SimulationElement): void;
|
|
28
|
+
add(el: SimulationElement<any>): void;
|
|
29
29
|
empty(): void;
|
|
30
30
|
getBuffer(camera: Camera, force: boolean): number[];
|
|
31
31
|
}
|
package/package.json
CHANGED
|
@@ -5,18 +5,13 @@
|
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Jackson Otto",
|
|
7
7
|
"description": "A simple graphics library using WebGPU",
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.1",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"import": "./dist/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts"
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"dev": "npx nodemon --watch src -e ts --exec 'npx tsc || exit 1'",
|
|
17
|
-
"test": "vite --port 3000",
|
|
18
|
-
"build": "npx tsc"
|
|
19
|
-
},
|
|
20
15
|
"devDependencies": {
|
|
21
16
|
"nodemon": "^3.0.1",
|
|
22
17
|
"typescript": "^5.1.6",
|
|
@@ -25,5 +20,10 @@
|
|
|
25
20
|
"dependencies": {
|
|
26
21
|
"@webgpu/types": "^0.1.34",
|
|
27
22
|
"wgpu-matrix": "^2.5.1"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "npx nodemon --watch src -e ts --exec 'npx tsc || exit 1'",
|
|
26
|
+
"test": "vite --port 3000",
|
|
27
|
+
"build": "npx tsc"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|