@opentui/three 0.5.10 → 0.5.12
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 +36 -40
- package/package.json +5 -2
- package/runtime-modules.js +0 -2
- package/chunk-2mx7fq49.js +0 -4
package/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import {
|
|
3
|
-
__require
|
|
4
|
-
} from "./chunk-2mx7fq49.js";
|
|
5
|
-
|
|
6
2
|
// src/WGPURenderer.ts
|
|
7
3
|
import { PerspectiveCamera, Color, NoToneMapping, LinearSRGBColorSpace } from "three";
|
|
8
4
|
import { WebGPURenderer } from "three/webgpu";
|
|
@@ -221,9 +217,9 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) {
|
|
|
221
217
|
var WORKGROUP_SIZE = 4;
|
|
222
218
|
var SUPERSAMPLING_COMPUTE_SHADER = supersampling_default.replace(/\${WORKGROUP_SIZE}/g, WORKGROUP_SIZE.toString());
|
|
223
219
|
var SuperSampleAlgorithm;
|
|
224
|
-
((
|
|
225
|
-
|
|
226
|
-
|
|
220
|
+
((SuperSampleAlgorithm) => {
|
|
221
|
+
SuperSampleAlgorithm[SuperSampleAlgorithm["STANDARD"] = 0] = "STANDARD";
|
|
222
|
+
SuperSampleAlgorithm[SuperSampleAlgorithm["PRE_SQUEEZED"] = 1] = "PRE_SQUEEZED";
|
|
227
223
|
})(SuperSampleAlgorithm ||= {});
|
|
228
224
|
|
|
229
225
|
class CLICanvas {
|
|
@@ -567,10 +563,10 @@ class CLICanvas {
|
|
|
567
563
|
|
|
568
564
|
// src/WGPURenderer.ts
|
|
569
565
|
var SuperSampleType;
|
|
570
|
-
((
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
566
|
+
((SuperSampleType) => {
|
|
567
|
+
SuperSampleType["NONE"] = "none";
|
|
568
|
+
SuperSampleType["GPU"] = "gpu";
|
|
569
|
+
SuperSampleType["CPU"] = "cpu";
|
|
574
570
|
})(SuperSampleType ||= {});
|
|
575
571
|
|
|
576
572
|
class ThreeCliRenderer {
|
|
@@ -1132,10 +1128,10 @@ class MeshPool {
|
|
|
1132
1128
|
const poolArray = this.pools.get(poolId) ?? [];
|
|
1133
1129
|
this.pools.set(poolId, poolArray);
|
|
1134
1130
|
if (poolArray.length > 0) {
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
return
|
|
1131
|
+
const mesh = poolArray.pop();
|
|
1132
|
+
mesh.material = options.material;
|
|
1133
|
+
mesh.count = options.maxInstances;
|
|
1134
|
+
return mesh;
|
|
1139
1135
|
}
|
|
1140
1136
|
const mesh = new THREE.InstancedMesh(options.geometry(), options.material, options.maxInstances);
|
|
1141
1137
|
if (options.name) {
|
|
@@ -2778,30 +2774,30 @@ class PlanckPhysicsWorld {
|
|
|
2778
2774
|
// src/index.ts
|
|
2779
2775
|
import * as THREE6 from "three";
|
|
2780
2776
|
export {
|
|
2781
|
-
|
|
2782
|
-
ThreeRenderable,
|
|
2783
|
-
ThreeCliRenderer,
|
|
2784
|
-
TextureUtils,
|
|
2785
|
-
THREE6 as THREE,
|
|
2786
|
-
SuperSampleType,
|
|
2787
|
-
SuperSampleAlgorithm,
|
|
2788
|
-
SpriteUtils,
|
|
2789
|
-
SpriteResourceManager,
|
|
2790
|
-
SpriteResource,
|
|
2791
|
-
SpriteParticleGenerator,
|
|
2792
|
-
SpriteAnimator,
|
|
2793
|
-
SheetSprite,
|
|
2794
|
-
RapierRigidBody,
|
|
2795
|
-
RapierPhysicsWorld,
|
|
2796
|
-
PlanckRigidBody,
|
|
2797
|
-
PlanckPhysicsWorld,
|
|
2798
|
-
PhysicsExplosionManager,
|
|
2799
|
-
PhysicsExplodingSpriteEffect,
|
|
2800
|
-
MeshPool,
|
|
2801
|
-
InstanceManager,
|
|
2802
|
-
ExplosionManager,
|
|
2803
|
-
ExplodingSpriteEffect,
|
|
2804
|
-
DEFAULT_PHYSICS_EXPLOSION_PARAMETERS,
|
|
2777
|
+
CLICanvas,
|
|
2805
2778
|
DEFAULT_EXPLOSION_PARAMETERS,
|
|
2806
|
-
|
|
2779
|
+
DEFAULT_PHYSICS_EXPLOSION_PARAMETERS,
|
|
2780
|
+
ExplodingSpriteEffect,
|
|
2781
|
+
ExplosionManager,
|
|
2782
|
+
InstanceManager,
|
|
2783
|
+
MeshPool,
|
|
2784
|
+
PhysicsExplodingSpriteEffect,
|
|
2785
|
+
PhysicsExplosionManager,
|
|
2786
|
+
PlanckPhysicsWorld,
|
|
2787
|
+
PlanckRigidBody,
|
|
2788
|
+
RapierPhysicsWorld,
|
|
2789
|
+
RapierRigidBody,
|
|
2790
|
+
SheetSprite,
|
|
2791
|
+
SpriteAnimator,
|
|
2792
|
+
SpriteParticleGenerator,
|
|
2793
|
+
SpriteResource,
|
|
2794
|
+
SpriteResourceManager,
|
|
2795
|
+
SpriteUtils,
|
|
2796
|
+
SuperSampleAlgorithm,
|
|
2797
|
+
SuperSampleType,
|
|
2798
|
+
THREE6 as THREE,
|
|
2799
|
+
TextureUtils,
|
|
2800
|
+
ThreeCliRenderer,
|
|
2801
|
+
ThreeRenderable,
|
|
2802
|
+
TiledSprite
|
|
2807
2803
|
};
|
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.5.
|
|
7
|
+
"version": "0.5.12",
|
|
8
8
|
"description": "Three.js WebGPU renderer for OpenTUI",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"url": "https://github.com/anomalyco/opentui",
|
|
13
13
|
"directory": "packages/three"
|
|
14
14
|
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"bun": ">=1.3.0"
|
|
17
|
+
},
|
|
15
18
|
"exports": {
|
|
16
19
|
".": {
|
|
17
20
|
"import": "./index.js",
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
}
|
|
26
29
|
},
|
|
27
30
|
"dependencies": {
|
|
28
|
-
"@opentui/core": "0.5.
|
|
31
|
+
"@opentui/core": "0.5.12",
|
|
29
32
|
"jimp": "1.6.1",
|
|
30
33
|
"three": "0.177.0"
|
|
31
34
|
},
|
package/runtime-modules.js
CHANGED
package/chunk-2mx7fq49.js
DELETED