@crapthings/run3d 0.2.16 → 0.2.18
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/README.md +1 -1
- package/package.json +2 -1
- package/template/AGENTS.md +3 -2
- package/template/docs/headless-ui.md +3 -1
- package/template/index.html +1 -0
- package/template/package.json +14 -15
- package/template/pnpm-lock.yaml +472 -704
- package/template/pnpm-workspace.yaml +50 -0
- package/template/src/app.jsx +8 -4
- package/template/src/scenes/index.jsx +4 -3
- package/template/src/ui/index.jsx +11 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Allow only the explicitly upgraded versions through pnpm's release-age policy.
|
|
2
|
+
minimumReleaseAgeExclude:
|
|
3
|
+
- "@tailwindcss/node@4.3.4"
|
|
4
|
+
- "@tailwindcss/oxide-android-arm64@4.3.4"
|
|
5
|
+
- "@tailwindcss/oxide-darwin-arm64@4.3.4"
|
|
6
|
+
- "@tailwindcss/oxide-darwin-x64@4.3.4"
|
|
7
|
+
- "@tailwindcss/oxide-freebsd-x64@4.3.4"
|
|
8
|
+
- "@tailwindcss/oxide-linux-arm-gnueabihf@4.3.4"
|
|
9
|
+
- "@tailwindcss/oxide-linux-arm64-gnu@4.3.4"
|
|
10
|
+
- "@tailwindcss/oxide-linux-arm64-musl@4.3.4"
|
|
11
|
+
- "@tailwindcss/oxide-linux-x64-gnu@4.3.4"
|
|
12
|
+
- "@tailwindcss/oxide-linux-x64-musl@4.3.4"
|
|
13
|
+
- "@tailwindcss/oxide-wasm32-wasi@4.3.4"
|
|
14
|
+
- "@tailwindcss/oxide-win32-arm64-msvc@4.3.4"
|
|
15
|
+
- "@tailwindcss/oxide-win32-x64-msvc@4.3.4"
|
|
16
|
+
- "@tailwindcss/oxide@4.3.4"
|
|
17
|
+
- "@tailwindcss/vite@4.3.4"
|
|
18
|
+
- "d3-array@3.2.5"
|
|
19
|
+
- "d3-axis@3.0.1"
|
|
20
|
+
- "d3-brush@3.0.1"
|
|
21
|
+
- "d3-chord@3.0.2"
|
|
22
|
+
- "d3-color@3.1.1"
|
|
23
|
+
- "d3-contour@4.0.3"
|
|
24
|
+
- "d3-delaunay@6.0.5"
|
|
25
|
+
- "d3-dispatch@3.0.2"
|
|
26
|
+
- "d3-drag@3.0.1"
|
|
27
|
+
- "d3-dsv@3.0.2"
|
|
28
|
+
- "d3-ease@3.0.2"
|
|
29
|
+
- "d3-fetch@3.0.2"
|
|
30
|
+
- "d3-force@3.0.1"
|
|
31
|
+
- "d3-format@3.1.3"
|
|
32
|
+
- "d3-geo@3.1.2"
|
|
33
|
+
- "d3-hierarchy@3.1.3"
|
|
34
|
+
- "d3-interpolate@3.0.2"
|
|
35
|
+
- "d3-path@3.1.1"
|
|
36
|
+
- "d3-polygon@3.0.2"
|
|
37
|
+
- "d3-quadtree@3.0.2"
|
|
38
|
+
- "d3-random@3.0.2"
|
|
39
|
+
- "d3-scale-chromatic@3.1.1"
|
|
40
|
+
- "d3-scale@4.0.3"
|
|
41
|
+
- "d3-selection@3.0.1"
|
|
42
|
+
- "d3-shape@3.2.1"
|
|
43
|
+
- "d3-time-format@4.1.1"
|
|
44
|
+
- "d3-time@3.1.1"
|
|
45
|
+
- "d3-timer@3.0.2"
|
|
46
|
+
- "d3-transition@3.0.2"
|
|
47
|
+
- "d3-zoom@3.0.1"
|
|
48
|
+
- "d3@7.9.1"
|
|
49
|
+
- "mediabunny@1.65.1"
|
|
50
|
+
- "tailwindcss@4.3.4"
|
package/template/src/app.jsx
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { Scene } from '@/scenes'
|
|
2
|
+
import { Ui } from '@/ui'
|
|
2
3
|
import { useTranslation } from 'react-i18next'
|
|
3
4
|
|
|
4
|
-
//
|
|
5
|
+
// Keep the full-screen scene and portal-based HTML interface in the same React tree.
|
|
5
6
|
export function App () {
|
|
6
7
|
const { t } = useTranslation()
|
|
7
8
|
|
|
8
9
|
return (
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
10
|
+
<>
|
|
11
|
+
<main className='fixed inset-0 bg-slate-900' aria-label={t('scene.label')}>
|
|
12
|
+
<Scene />
|
|
13
|
+
</main>
|
|
14
|
+
<Ui />
|
|
15
|
+
</>
|
|
12
16
|
)
|
|
13
17
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Canvas } from '@react-three/fiber'
|
|
2
|
-
import { OrbitControls } from '@react-three/drei'
|
|
3
|
-
import { Perf } from 'r3f-perf'
|
|
2
|
+
import { OrbitControls, StatsGl } from '@react-three/drei'
|
|
4
3
|
|
|
5
4
|
// Face colors preserve the favicon's lime top, bright right side, and shaded left side.
|
|
6
5
|
const cubeColors = ['#bef264', '#65a30d', '#a3e635', '#65a30d', '#65a30d', '#bef264']
|
|
@@ -24,7 +23,9 @@ export function Scene () {
|
|
|
24
23
|
return (
|
|
25
24
|
<Canvas orthographic camera={{ position: [4, 3.4, 6], zoom: 100, near: 0.1, far: 100 }} dpr={[1, 2]}>
|
|
26
25
|
<color attach='background' args={['#0f172a']} />
|
|
27
|
-
{import.meta.env.DEV &&
|
|
26
|
+
{import.meta.env.DEV && (
|
|
27
|
+
<StatsGl trackGPU className='fixed top-0 right-0 z-20 flex [&>canvas:first-child]:hidden' />
|
|
28
|
+
)}
|
|
28
29
|
<mesh>
|
|
29
30
|
<boxGeometry args={[1.8, 1.8, 1.8]} />
|
|
30
31
|
{cubeColors.map((color, index) => (
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createPortal } from 'react-dom'
|
|
2
|
+
|
|
3
|
+
// Render HTML overlays above the scene while allowing pointer events through empty areas.
|
|
4
|
+
export function Ui ({ children }) {
|
|
5
|
+
return createPortal(
|
|
6
|
+
<div className='pointer-events-none fixed inset-0 z-10'>
|
|
7
|
+
{children}
|
|
8
|
+
</div>,
|
|
9
|
+
document.getElementById('ui-root')
|
|
10
|
+
)
|
|
11
|
+
}
|