-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adeira-source-id: a0868c7a6fdc712a89384f1815fd349c4d5a48d3
- Loading branch information
1 parent
30bde7f
commit 07736aa
Showing
12 changed files
with
127 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"$schema": "https://triplex.dev/config.schema.json", | ||
"components": ["../src/geometry/**/*.tsx"], | ||
"files": ["../src/**/*.tsx"] | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@example/test-runner", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "echo \"Not implemented\"", | ||
"typedef": "echo \"Not implemented\"" | ||
}, | ||
"dependencies": { | ||
"@react-three/drei": "^9.56.27", | ||
"@react-three/fiber": "^8.14.5", | ||
"@react-three/rapier": "^1.1.1", | ||
"@types/react": "^18.0.0", | ||
"@types/three": "^0.157.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"three": "^0.157.0" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Copyright (c) Michael Dougall. All rights reserved. | ||
* | ||
* This source code is licensed under the GPL-3.0 license found in the LICENSE | ||
* file in the root directory of this source tree. | ||
*/ | ||
import { Vector3Tuple } from "three"; | ||
|
||
function Box({ | ||
color, | ||
position, | ||
rotation, | ||
scale, | ||
size = 1, | ||
}: { | ||
color?: "red" | "green" | "blue"; | ||
position?: Vector3Tuple | number; | ||
rotation?: Vector3Tuple; | ||
scale?: Vector3Tuple | number; | ||
/** | ||
* @min 1 | ||
* @max 2 | ||
*/ | ||
size?: number; | ||
}) { | ||
const ok = {}; | ||
return ( | ||
<group scale={scale} visible={true}> | ||
<mesh | ||
{...ok} | ||
name="hello-world" | ||
onClick={() => {}} | ||
position={position} | ||
rotation={rotation} | ||
userData={{ hello: true }} | ||
visible={true} | ||
> | ||
<boxGeometry args={[size, size, size]} /> | ||
<meshStandardMaterial color={color} key={color} /> | ||
</mesh> | ||
</group> | ||
); | ||
} | ||
|
||
export default Box; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* Copyright (c) Michael Dougall. All rights reserved. | ||
* | ||
* This source code is licensed under the GPL-3.0 license found in the LICENSE | ||
* file in the root directory of this source tree. | ||
*/ | ||
import Box from "./geometry/box"; | ||
|
||
export default function Scene() { | ||
return ( | ||
<> | ||
<Box /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"esModuleInterop": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"incremental": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"lib": ["dom", "dom.iterable", "es2022"], | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"noEmit": true, | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
}, | ||
"resolveJsonModule": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"types": ["@react-three/fiber"] | ||
}, | ||
"include": ["."], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters