Skip to content

Commit

Permalink
Merge pull request #4 from sensebox/chore/split
Browse files Browse the repository at this point in the history
Chore/split
  • Loading branch information
felixerdy authored Nov 12, 2024
2 parents 360d95d + 3e082a7 commit 2c16c3d
Show file tree
Hide file tree
Showing 28 changed files with 62,429 additions and 7,301 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: 3d.sensebox.de
cname: 3d.sensebox.de
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ npm run dev

## License

This project is licensed under the [MIT License](./LICENSE.md).
This project is licensed under the [MIT License](./LICENSE.md).
24 changes: 12 additions & 12 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import js from "@eslint/js";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";

export default tseslint.config(
{ ignores: ['dist'] },
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
)
);
45 changes: 45 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"dependencies": {
"@react-three/drei": "^9.114.6",
"@react-three/fiber": "^8.17.10",
"@react-three/postprocessing": "^2.16.3",
"lamina": "^1.1.23",
"postprocessing": "^6.36.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.28.0",
Expand Down
54,572 changes: 54,571 additions & 1 deletion public/gltf/bike/senseBox_bike.gltf

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import BikeScene from './scenes/bike/bike-scene';
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import BikeScene from "./scenes/bike";

const router = createBrowserRouter([
{
Expand All @@ -15,13 +15,15 @@ const router = createBrowserRouter([
},
{
path: "/",
element: <div>
<h1>senseBox 3D models</h1>
<a href="/bike">Bike</a>
</div>,
element: (
<div>
<h1>senseBox 3D models</h1>
<a href="/bike">Bike</a>
</div>
),
},
]);

createRoot(document.getElementById('root')!).render(
<RouterProvider router={router} />
)
createRoot(document.getElementById("root")!).render(
<RouterProvider router={router} />,
);
25 changes: 0 additions & 25 deletions src/scenes/bike/bike-scene.tsx

This file was deleted.

37 changes: 37 additions & 0 deletions src/scenes/bike/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { OrbitControls, Stage } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";
import { Suspense, useRef } from "react";
import { Model } from "./model";

export default function BikeScene() {
const controlsRef = useRef(null);

return (
<Canvas
shadows
dpr={[1, 2]}
camera={{
fov: 50,
position: [1, 1.9, -2],
near: 200,
far: 2000,
focus: 500,
zoom: 0.5, // das ist für das verkleinert des bildes wichtig
}}
>
<Suspense fallback={null}>
<Stage preset="portrait" intensity={0} environment="city">
<Model />
</Stage>
</Suspense>
<OrbitControls
ref={controlsRef}
autoRotate={false}
minDistance={0.1}
maxDistance={9}
enableDamping={true}
dampingFactor={0.1}
/>
</Canvas>
);
}
Loading

0 comments on commit 2c16c3d

Please sign in to comment.