Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
be652e9
create 3d package
remorses Dec 12, 2025
e48f864
pin node types
kommander Dec 11, 2025
f471742
add build and publish scripts for @opentui/3d
remorses Dec 12, 2025
5779db5
move 3D examples and benchmark to @opentui/3d package
remorses Dec 12, 2025
df292ca
remove 3D examples from core examples index
remorses Dec 12, 2025
8e396e4
move assets from core to 3d package (git rename)
remorses Dec 12, 2025
15b803d
format
remorses Dec 12, 2025
e9c8d59
align 3d package.json with repo conventions
remorses Dec 12, 2025
abdb5e1
remove unnecessary @types/node from 3d package
remorses Dec 12, 2025
42c8186
simplify 3d build: publish TS source directly (152KB vs 1.1MB)
remorses Dec 12, 2025
75332e7
use packages:external in 3d build (168KB vs 1.1MB)
remorses Dec 12, 2025
8a1c3f5
Keep 3d examples in core, import from @opentui/3d package
remorses Dec 14, 2025
e70bef8
Fix build order: core before 3d
remorses Dec 14, 2025
1c74ff7
fix: remove three types from core tsconfig
remorses Dec 23, 2025
83d0b11
fix: remove unused ts-expect-error from reconciler
remorses Dec 23, 2025
a977166
Merge upstream/main into move-3d-to-separate-package
remorses Mar 8, 2026
afb6a31
Rename package from @opentui/3d to @opentui/three
remorses Mar 8, 2026
6de1778
Move optionalDependencies to dependencies in @opentui/three
remorses Mar 8, 2026
c96c1bf
Align @opentui/three with repo conventions
remorses Mar 8, 2026
4319745
fix(ci): unblock publish preview for three extraction
remorses Mar 8, 2026
cc8e473
ci: include @opentui/three in preview and release pipelines
remorses Mar 8, 2026
933653d
ci: align build-examples bun-webgpu cache checks with 0.1.5
remorses Mar 8, 2026
60bd7f5
Merge upstream/main into move-3d-to-separate-package
remorses Mar 12, 2026
cbbd7c4
fix: restore React and runtime-plugin CI on split 3D branch
remorses Mar 12, 2026
b7db1bb
refactor: drop out-of-scope CI fixes from three split PR
remorses Mar 12, 2026
66a9317
style: format split-package files for CI
remorses Mar 12, 2026
c00336e
Merge branch 'main' into move-3d-to-separate-package
remorses Mar 14, 2026
4dfd1ae
Merge remote-tracking branch 'upstream/main' into move-3d-to-separate…
remorses Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ jobs:
cd packages/core
bun run build:lib

- name: Build 3D package
run: |
cd packages/three
bun run build --ci

- name: Run TypeScript tests
run: |
cd packages/core
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,25 +101,25 @@ jobs:
# Check for platform-specific packages in .bun cache (where bun install --os="*" --cpu="*" puts them)
echo ""
echo "Checking for platform-specific bun-webgpu packages in cache..."
if [ -d node_modules/.bun/bun-webgpu-darwin-arm64@0.1.4 ]; then
if [ -d node_modules/.bun/bun-webgpu-darwin-arm64@0.1.5 ]; then
echo "✅ bun-webgpu-darwin-arm64 found in cache"
else
echo "⚠️ bun-webgpu-darwin-arm64 not found (will be installed during build)"
fi

if [ -d node_modules/.bun/bun-webgpu-darwin-x64@0.1.4 ]; then
if [ -d node_modules/.bun/bun-webgpu-darwin-x64@0.1.5 ]; then
echo "✅ bun-webgpu-darwin-x64 found in cache"
else
echo "⚠️ bun-webgpu-darwin-x64 not found (will be installed during build)"
fi

if [ -d node_modules/.bun/bun-webgpu-linux-x64@0.1.4 ]; then
if [ -d node_modules/.bun/bun-webgpu-linux-x64@0.1.5 ]; then
echo "✅ bun-webgpu-linux-x64 found in cache"
else
echo "⚠️ bun-webgpu-linux-x64 not found (will be installed during build)"
fi

if [ -d node_modules/.bun/bun-webgpu-win32-x64@0.1.4 ]; then
if [ -d node_modules/.bun/bun-webgpu-win32-x64@0.1.5 ]; then
echo "✅ bun-webgpu-win32-x64 found in cache"
else
echo "⚠️ bun-webgpu-win32-x64 not found (will be installed during build)"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
cd packages/core
bun run build:native --all
bun run build:lib
cd ../three
bun run build
cd ../react
bun run build
cd ../solid
Expand Down Expand Up @@ -155,6 +157,13 @@ jobs:

# Copy other package dists (optional - don't fail if missing)
echo "Packaging other packages..."
if [ -d packages/three/dist ]; then
cp -r packages/three/dist artifacts/npm-packages/three-dist
echo "✅ Three dist packaged"
else
echo "⚠️ Three dist not found (skipping)"
fi

if [ -d packages/react/dist ]; then
cp -r packages/react/dist artifacts/npm-packages/react-dist
echo "✅ React dist packaged"
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/npm-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ jobs:
fi

# Copy other package dists
if [ -d "npm-packages/three-dist" ]; then
cp -r npm-packages/three-dist packages/three/dist
echo "Copied three dist"
fi

if [ -d "npm-packages/react-dist" ]; then
cp -r npm-packages/react-dist packages/react/dist
echo "Copied react dist"
Expand Down Expand Up @@ -91,6 +96,10 @@ jobs:
echo "📦 Checking @opentui/core..."
cd packages/core/dist && npm pack --dry-run

echo ""
echo "📦 Checking @opentui/three..."
cd ../../three/dist && npm pack --dry-run

echo ""
echo "📦 Checking @opentui/react..."
cd ../../react/dist && npm pack --dry-run
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
cd packages/core
bun run build:native --all
bun run build:lib
cd ../three && bun run build
cd ../solid && bun run build
cd ../react && bun run build

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
run: bun run build --ci
working-directory: packages/react

- name: Build three
run: bun run build --ci
working-directory: packages/three

- name: Build solid
run: bun run build --ci
working-directory: packages/solid
Expand All @@ -59,5 +63,6 @@ jobs:
npx pkg-pr-new publish --no-template --commentWithSha --bun \
'./packages/core/dist' \
${{ steps.native-packages.outputs.dirs }} \
'./packages/three/dist' \
'./packages/react/dist' \
'./packages/solid/dist'
45 changes: 38 additions & 7 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
"packages/*"
],
"scripts": {
"build": "cd packages/core && bun run build && cd ../solid && bun run build && cd ../react && bun run build",
"build": "cd packages/core && bun run build && cd ../three && bun run build && cd ../solid && bun run build && cd ../react && bun run build",
"pre-publish": "bun scripts/pre-publish.ts",
"publish": "bun run pre-publish && bun run publish:core && bun run publish:react && bun run publish:solid",
"publish": "bun run pre-publish && bun run publish:core && bun run publish:three && bun run publish:react && bun run publish:solid",
"publish:three": "cd packages/three && bun run publish",
"publish:core": "cd packages/core && bun run publish",
"publish:react": "cd packages/react && bun run publish",
"publish:solid": "cd packages/solid && bun run publish",
Expand Down
10 changes: 1 addition & 9 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
},
"license": "MIT",
"devDependencies": {
"@opentui/three": "workspace:^",
"@types/bun": "latest",
"@types/node": "^24.0.0",
"@types/three": "0.177.0",
"commander": "^13.1.0",
"typescript": "^5",
"web-tree-sitter": "0.25.10"
Expand All @@ -46,10 +46,6 @@
"web-tree-sitter": "0.25.10"
},
"optionalDependencies": {
"@dimforge/rapier2d-simd-compat": "^0.17.3",
"bun-webgpu": "0.1.5",
"planck": "^1.4.2",
"three": "0.177.0",
"@opentui/core-darwin-x64": "0.1.88",
"@opentui/core-darwin-arm64": "0.1.88",
"@opentui/core-linux-x64": "0.1.88",
Expand All @@ -62,10 +58,6 @@
"types": "./src/index.ts",
"import": "./src/index.ts"
},
"./3d": {
"types": "./src/3d.ts",
"import": "./src/3d.ts"
},
"./testing": {
"types": "./src/testing.ts",
"import": "./src/testing.ts"
Expand Down
18 changes: 10 additions & 8 deletions packages/core/scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ if (buildLib) {

const entryPoints: string[] = [
packageJson.module,
"src/3d.ts",
"src/testing.ts",
"src/runtime-plugin.ts",
"src/runtime-plugin-support.ts",
Expand Down Expand Up @@ -256,7 +255,6 @@ if (buildLib) {
console.log("Post-processing bundled files to fix duplicate exports...")
const bundledFiles = [
"dist/index.js",
"dist/3d.js",
"dist/testing.js",
"dist/runtime-plugin.js",
"dist/runtime-plugin-support.js",
Expand Down Expand Up @@ -331,11 +329,6 @@ if (buildLib) {
require: "./index.js",
types: "./index.d.ts",
},
"./3d": {
import: "./3d.js",
require: "./3d.js",
types: "./3d.d.ts",
},
"./testing": {
import: "./testing.js",
require: "./testing.js",
Expand All @@ -362,6 +355,15 @@ if (buildLib) {
variants.map(({ platform, arch }) => [`${packageJson.name}-${platform}-${arch}`, packageJson.version]),
)

const processedDevDependencies = Object.fromEntries(
Object.entries(packageJson.devDependencies ?? {}).map(([name, version]) => {
if (version === "workspace:*" || version === "workspace:^") {
return [name, packageJson.version]
}
return [name, version]
}),
)

writeFileSync(
join(distDir, "package.json"),
JSON.stringify(
Expand All @@ -381,7 +383,7 @@ if (buildLib) {
bugs: packageJson.bugs,
exports,
dependencies: packageJson.dependencies,
devDependencies: packageJson.devDependencies,
devDependencies: processedDevDependencies,
peerDependencies: packageJson.peerDependencies,
optionalDependencies: {
...packageJson.optionalDependencies,
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/3d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/src/examples/draggable-three-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
MeshPhongMaterial,
Vector3,
} from "three"
import { ThreeRenderable } from "../3d.js"
import { ThreeRenderable } from "@opentui/three"

let nextZIndex = 200
let keyListener: ((key: KeyEvent) => void) | null = null
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/examples/fractal-shader-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
Fn,
int,
} from "three/tsl"
import { ThreeCliRenderer } from "../3d.js"
import { ThreeCliRenderer } from "@opentui/three"

let engine: ThreeCliRenderer | null = null
let sceneRoot: ThreeScene | null = null
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/examples/golden-star-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
Quaternion,
ConeGeometry,
} from "three"
import { ThreeCliRenderer } from "../3d.js"
import { ThreeCliRenderer } from "@opentui/three"
import { setupCommonDemoKeys } from "./lib/standalone-keys.js"

interface StarParticle {
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/examples/lights-phong-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
type KeyEvent,
} from "../index.js"
import { setupCommonDemoKeys } from "./lib/standalone-keys.js"
import { TextureUtils } from "../3d/TextureUtils.js"
import { TextureUtils, ThreeCliRenderer } from "@opentui/three"
import {
Scene as ThreeScene,
Mesh as ThreeMesh,
Expand All @@ -29,7 +29,6 @@ import { TeapotGeometry } from "three/addons/geometries/TeapotGeometry.js"
import normalTexPath from "./assets/Water_2_M_Normal.jpg" with { type: "image/jpeg" }
// @ts-ignore
import alphaTexPath from "./assets/roughness_map.jpg" with { type: "image/jpeg" }
import { ThreeCliRenderer } from "../3d.js"

interface PhongDemoState {
camera: PerspectiveCamera
Expand Down
17 changes: 8 additions & 9 deletions packages/core/src/examples/physx-planck-2d-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,16 @@ import {
} from "../index.js"
import { setupCommonDemoKeys } from "./lib/standalone-keys.js"
import * as THREE from "three"
import { SpriteAnimator, TiledSprite, type SpriteDefinition, type AnimationDefinition } from "@opentui/three"
import {
SpriteAnimator,
TiledSprite,
type SpriteDefinition,
type AnimationDefinition,
} from "../3d/animation/SpriteAnimator.js"
import { SpriteResourceManager, type ResourceConfig } from "../3d/SpriteResourceManager.js"
import { PhysicsExplosionManager, type PhysicsExplosionHandle } from "../3d/animation/PhysicsExplodingSpriteEffect.js"
import { PlanckPhysicsWorld } from "../3d/physics/PlanckPhysicsAdapter.js"
SpriteResourceManager,
type ResourceConfig,
PhysicsExplosionManager,
type PhysicsExplosionHandle,
PlanckPhysicsWorld,
ThreeCliRenderer,
} from "@opentui/three"
import * as planck from "planck"
import { ThreeCliRenderer } from "../3d.js"

// @ts-ignore
import cratePath from "./assets/crate.png" with { type: "image/png" }
Expand Down
Loading
Loading