@opentui/three 0.0.0-20260604-34bc02bf → 0.0.0-20260604-5b641b77
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/index.js +3 -2
- package/package.json +2 -2
- package/physics/RapierPhysicsAdapter.d.ts +5 -5
package/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { CliRenderEvents, RGBA as RGBA2 } from "@opentui/core";
|
|
|
8
8
|
// src/canvas.ts
|
|
9
9
|
import { GPUCanvasContextMock } from "bun-webgpu";
|
|
10
10
|
import { RGBA } from "@opentui/core";
|
|
11
|
+
import { toArrayBuffer } from "bun:ffi";
|
|
11
12
|
import { Jimp } from "jimp";
|
|
12
13
|
|
|
13
14
|
// src/shaders/supersampling.wgsl
|
|
@@ -530,7 +531,7 @@ class CLICanvas {
|
|
|
530
531
|
this.superSampleDrawTimeMs = performance.now() - ssStart;
|
|
531
532
|
} else {
|
|
532
533
|
this.superSampleDrawTimeMs = 0;
|
|
533
|
-
const pixelData = new Uint8Array(textureBuffer.
|
|
534
|
+
const pixelData = new Uint8Array(toArrayBuffer(bufPtr, 0, textureBuffer.size));
|
|
534
535
|
const isBGRA = contextFormat === "bgra8unorm";
|
|
535
536
|
const backgroundColor = RGBA.fromValues(0, 0, 0, 1);
|
|
536
537
|
for (let y = 0;y < this.height; y++) {
|
|
@@ -2663,7 +2664,7 @@ class PhysicsExplosionManager {
|
|
|
2663
2664
|
}
|
|
2664
2665
|
}
|
|
2665
2666
|
// src/physics/RapierPhysicsAdapter.ts
|
|
2666
|
-
import
|
|
2667
|
+
import RAPIER from "@dimforge/rapier2d-simd-compat";
|
|
2667
2668
|
|
|
2668
2669
|
class RapierRigidBody {
|
|
2669
2670
|
rapierBody;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"version": "0.0.0-20260604-
|
|
7
|
+
"version": "0.0.0-20260604-5b641b77",
|
|
8
8
|
"description": "Three.js WebGPU renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentui/core": "0.0.0-20260604-
|
|
28
|
+
"@opentui/core": "0.0.0-20260604-5b641b77",
|
|
29
29
|
"jimp": "1.6.1",
|
|
30
30
|
"three": "0.177.0"
|
|
31
31
|
},
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import RAPIER from "@dimforge/rapier2d-simd-compat";
|
|
2
2
|
import type { PhysicsVector2, PhysicsRigidBodyDesc, PhysicsColliderDesc, PhysicsRigidBody, PhysicsWorld } from "./physics-interface.js";
|
|
3
3
|
export declare class RapierRigidBody implements PhysicsRigidBody {
|
|
4
4
|
private rapierBody;
|
|
5
|
-
constructor(rapierBody: RigidBody);
|
|
5
|
+
constructor(rapierBody: RAPIER.RigidBody);
|
|
6
6
|
applyImpulse(force: PhysicsVector2): void;
|
|
7
7
|
applyTorqueImpulse(torque: number): void;
|
|
8
8
|
getTranslation(): PhysicsVector2;
|
|
9
9
|
getRotation(): number;
|
|
10
|
-
get nativeBody(): RigidBody;
|
|
10
|
+
get nativeBody(): RAPIER.RigidBody;
|
|
11
11
|
}
|
|
12
12
|
export declare class RapierPhysicsWorld implements PhysicsWorld {
|
|
13
13
|
private rapierWorld;
|
|
14
|
-
constructor(rapierWorld: World);
|
|
14
|
+
constructor(rapierWorld: RAPIER.World);
|
|
15
15
|
createRigidBody(desc: PhysicsRigidBodyDesc): PhysicsRigidBody;
|
|
16
16
|
createCollider(colliderDesc: PhysicsColliderDesc, rigidBody: PhysicsRigidBody): void;
|
|
17
17
|
removeRigidBody(rigidBody: PhysicsRigidBody): void;
|
|
18
|
-
static createFromRapierWorld(rapierWorld: World): RapierPhysicsWorld;
|
|
18
|
+
static createFromRapierWorld(rapierWorld: RAPIER.World): RapierPhysicsWorld;
|
|
19
19
|
}
|