react-three-game 0.0.53 → 0.0.54

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.
@@ -153,7 +153,7 @@ export default function EditorTree({ prefabData, setPrefabData, selectedId, setS
153
153
  .tree-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
154
154
  .tree-scroll::-webkit-scrollbar-track { background: transparent; }
155
155
  .tree-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 8px; }
156
- ` }), _jsxs("div", { style: Object.assign(Object.assign({}, tree.panel), { width: collapsed ? 'auto' : 224 }), onClick: () => { setContextMenu(null); setFileMenuOpen(false); }, children: [_jsxs("div", { style: base.header, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, cursor: 'pointer' }, onClick: () => setCollapsed(!collapsed), children: [_jsx("span", { children: collapsed ? '▶' : '▼' }), _jsx("span", { children: "Scene" })] }), !collapsed && (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4 }, children: [_jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10, opacity: canUndo ? 1 : 0.4 }), onClick: (e) => { e.stopPropagation(); onUndo === null || onUndo === void 0 ? void 0 : onUndo(); }, disabled: !canUndo, title: "Undo", children: "\u21B6" }), _jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10, opacity: canRedo ? 1 : 0.4 }), onClick: (e) => { e.stopPropagation(); onRedo === null || onRedo === void 0 ? void 0 : onRedo(); }, disabled: !canRedo, title: "Redo", children: "\u21B7" }), _jsxs("div", { style: { position: 'relative' }, children: [_jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10 }), onClick: (e) => { e.stopPropagation(); setFileMenuOpen(!fileMenuOpen); }, title: "File", children: "\u22EE" }), fileMenuOpen && (_jsx(FileMenu, { prefabData: prefabData, setPrefabData: setPrefabData, onClose: () => setFileMenuOpen(false) }))] })] }))] }), !collapsed && (_jsxs(_Fragment, { children: [_jsx("div", { style: { padding: '4px 6px', borderBottom: '1px solid rgba(255,255,255,0.1)' }, children: _jsx("input", { type: "text", placeholder: "Search nodes...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), onClick: (e) => e.stopPropagation(), style: {
156
+ ` }), _jsxs("div", { style: Object.assign(Object.assign({}, tree.panel), { width: collapsed ? 'auto' : 224 }), onClick: () => { setContextMenu(null); setFileMenuOpen(false); }, children: [_jsxs("div", { style: base.header, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6, cursor: 'pointer' }, onClick: () => setCollapsed(!collapsed), children: [_jsx("span", { children: collapsed ? '▶' : '▼' }), _jsx("span", { children: "Scene" })] }), !collapsed && (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 4 }, children: [_jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10, opacity: canUndo ? 1 : 0.4 }), onClick: (e) => { e.stopPropagation(); onUndo === null || onUndo === void 0 ? void 0 : onUndo(); }, disabled: !canUndo, title: "Undo", children: "\u21B6" }), _jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10, opacity: canRedo ? 1 : 0.4 }), onClick: (e) => { e.stopPropagation(); onRedo === null || onRedo === void 0 ? void 0 : onRedo(); }, disabled: !canRedo, title: "Redo", children: "\u21B7" }), _jsxs("div", { style: { position: 'relative' }, children: [_jsx("button", { style: Object.assign(Object.assign({}, base.btn), { padding: '2px 6px', fontSize: 10 }), onClick: (e) => { e.stopPropagation(); setFileMenuOpen(!fileMenuOpen); }, title: "File", children: "\u22EE" }), fileMenuOpen && (_jsx(FileMenu, { prefabData: prefabData, setPrefabData: setPrefabData, onClose: () => setFileMenuOpen(false) }))] })] }))] }), !collapsed && (_jsxs(_Fragment, { children: [_jsx("div", { style: { padding: '4px 4px', borderBottom: '1px solid rgba(255,255,255,0.1)' }, children: _jsx("input", { type: "text", placeholder: "Search nodes...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), onClick: (e) => e.stopPropagation(), style: {
157
157
  width: '100%',
158
158
  padding: '4px 8px',
159
159
  background: 'rgba(255,255,255,0.05)',
@@ -19,8 +19,7 @@ function TexturePicker({ value, onChange, basePath }) {
19
19
  const [textureFiles, setTextureFiles] = useState([]);
20
20
  const [showPicker, setShowPicker] = useState(false);
21
21
  useEffect(() => {
22
- const base = basePath ? `${basePath}/` : '';
23
- fetch(`/${base}textures/manifest.json`)
22
+ fetch(`${basePath}/textures/manifest.json`)
24
23
  .then(r => r.json())
25
24
  .then(data => setTextureFiles(Array.isArray(data) ? data : data.files || []))
26
25
  .catch(console.error);
@@ -6,8 +6,7 @@ function ModelPicker({ value, onChange, basePath, nodeId }) {
6
6
  const [modelFiles, setModelFiles] = useState([]);
7
7
  const [showPicker, setShowPicker] = useState(false);
8
8
  useEffect(() => {
9
- const base = basePath ? `${basePath}/` : '';
10
- fetch(`/${base}models/manifest.json`)
9
+ fetch(`${basePath}/models/manifest.json`)
11
10
  .then(r => r.json())
12
11
  .then(data => setModelFiles(Array.isArray(data) ? data : data.files || []))
13
12
  .catch(console.error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-three-game",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "description": "Batteries included React Three Fiber game engine",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -273,7 +273,7 @@ export default function EditorTree({
273
273
  </div>
274
274
  {!collapsed && (
275
275
  <>
276
- <div style={{ padding: '4px 6px', borderBottom: '1px solid rgba(255,255,255,0.1)' }}>
276
+ <div style={{ padding: '4px 4px', borderBottom: '1px solid rgba(255,255,255,0.1)' }}>
277
277
  <input
278
278
  type="text"
279
279
  placeholder="Search nodes..."
@@ -41,8 +41,7 @@ function TexturePicker({
41
41
  const [showPicker, setShowPicker] = useState(false);
42
42
 
43
43
  useEffect(() => {
44
- const base = basePath ? `${basePath}/` : '';
45
- fetch(`/${base}textures/manifest.json`)
44
+ fetch(`${basePath}/textures/manifest.json`)
46
45
  .then(r => r.json())
47
46
  .then(data => setTextureFiles(Array.isArray(data) ? data : data.files || []))
48
47
  .catch(console.error);
@@ -19,8 +19,7 @@ function ModelPicker({
19
19
  const [showPicker, setShowPicker] = useState(false);
20
20
 
21
21
  useEffect(() => {
22
- const base = basePath ? `${basePath}/` : '';
23
- fetch(`/${base}models/manifest.json`)
22
+ fetch(`${basePath}/models/manifest.json`)
24
23
  .then(r => r.json())
25
24
  .then(data => setModelFiles(Array.isArray(data) ? data : data.files || []))
26
25
  .catch(console.error);