@opentui/three 0.5.9 → 0.5.11

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 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
- ((SuperSampleAlgorithm2) => {
225
- SuperSampleAlgorithm2[SuperSampleAlgorithm2["STANDARD"] = 0] = "STANDARD";
226
- SuperSampleAlgorithm2[SuperSampleAlgorithm2["PRE_SQUEEZED"] = 1] = "PRE_SQUEEZED";
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 {
@@ -525,9 +521,8 @@ class CLICanvas {
525
521
  textureBuffer.unmap();
526
522
  return;
527
523
  }
528
- const mappedRangePtr = textureBuffer.getMappedRangePtr(0, textureBuffer.size);
529
- const bufPtr = mappedRangePtr;
530
524
  if (this.superSample === "cpu" /* CPU */) {
525
+ const bufPtr = textureBuffer.getMappedRangePtr(0, textureBuffer.size);
531
526
  const format = contextFormat === "bgra8unorm" ? "bgra8unorm" : "rgba8unorm";
532
527
  const ssStart = performance.now();
533
528
  buffer.drawSuperSampleBuffer(0, 0, bufPtr, textureBuffer.size, format, alignedBytesPerRow);
@@ -568,10 +563,10 @@ class CLICanvas {
568
563
 
569
564
  // src/WGPURenderer.ts
570
565
  var SuperSampleType;
571
- ((SuperSampleType2) => {
572
- SuperSampleType2["NONE"] = "none";
573
- SuperSampleType2["GPU"] = "gpu";
574
- SuperSampleType2["CPU"] = "cpu";
566
+ ((SuperSampleType) => {
567
+ SuperSampleType["NONE"] = "none";
568
+ SuperSampleType["GPU"] = "gpu";
569
+ SuperSampleType["CPU"] = "cpu";
575
570
  })(SuperSampleType ||= {});
576
571
 
577
572
  class ThreeCliRenderer {
@@ -1133,10 +1128,10 @@ class MeshPool {
1133
1128
  const poolArray = this.pools.get(poolId) ?? [];
1134
1129
  this.pools.set(poolId, poolArray);
1135
1130
  if (poolArray.length > 0) {
1136
- const mesh2 = poolArray.pop();
1137
- mesh2.material = options.material;
1138
- mesh2.count = options.maxInstances;
1139
- return mesh2;
1131
+ const mesh = poolArray.pop();
1132
+ mesh.material = options.material;
1133
+ mesh.count = options.maxInstances;
1134
+ return mesh;
1140
1135
  }
1141
1136
  const mesh = new THREE.InstancedMesh(options.geometry(), options.material, options.maxInstances);
1142
1137
  if (options.name) {
@@ -2779,30 +2774,30 @@ class PlanckPhysicsWorld {
2779
2774
  // src/index.ts
2780
2775
  import * as THREE6 from "three";
2781
2776
  export {
2782
- TiledSprite,
2783
- ThreeRenderable,
2784
- ThreeCliRenderer,
2785
- TextureUtils,
2786
- THREE6 as THREE,
2787
- SuperSampleType,
2788
- SuperSampleAlgorithm,
2789
- SpriteUtils,
2790
- SpriteResourceManager,
2791
- SpriteResource,
2792
- SpriteParticleGenerator,
2793
- SpriteAnimator,
2794
- SheetSprite,
2795
- RapierRigidBody,
2796
- RapierPhysicsWorld,
2797
- PlanckRigidBody,
2798
- PlanckPhysicsWorld,
2799
- PhysicsExplosionManager,
2800
- PhysicsExplodingSpriteEffect,
2801
- MeshPool,
2802
- InstanceManager,
2803
- ExplosionManager,
2804
- ExplodingSpriteEffect,
2805
- DEFAULT_PHYSICS_EXPLOSION_PARAMETERS,
2777
+ CLICanvas,
2806
2778
  DEFAULT_EXPLOSION_PARAMETERS,
2807
- CLICanvas
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
2808
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.9",
7
+ "version": "0.5.11",
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.9",
31
+ "@opentui/core": "0.5.11",
29
32
  "jimp": "1.6.1",
30
33
  "three": "0.177.0"
31
34
  },
@@ -1,6 +1,4 @@
1
1
  // @bun
2
- import"./chunk-2mx7fq49.js";
3
-
4
2
  // src/runtime-modules.ts
5
3
  import * as threeRuntime from "@opentui/three";
6
4
  var runtimeModules = {
package/chunk-2mx7fq49.js DELETED
@@ -1,4 +0,0 @@
1
- // @bun
2
- var __require = import.meta.require;
3
-
4
- export { __require };