Merge pull request #42 from itsdouges/add-triplex-config

Set up Triplex, the visual IDE for React Three Fiber
main
Lunakepio 2024-03-06 09:21:53 +01:00 committed by GitHub
commit 8d9623cac8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 56 additions and 1 deletions

7
.triplex/config.json Normal file
View File

@ -0,0 +1,7 @@
{
"$schema": "https://triplex.dev/config.schema.json",
"components": ["../src/components/**/*.(j|t)sx"],
"files": ["../src/components/**/*.(j|t)sx"],
"provider": "./provider.tsx",
"assetsDir": "models"
}

16
.triplex/provider.tsx Normal file
View File

@ -0,0 +1,16 @@
import React from "react";
import { Physics } from "@react-three/rapier";
export default function Provider({
children,
physicsDisabled = true,
}: {
children: React.ReactNode;
physicsDisabled?: boolean;
}) {
return (
<Physics gravity={[0, -90, 0]} timeStep="vary" paused={physicsDisabled}>
{children}
</Physics>
);
}

View File

@ -1,4 +1,5 @@
# Mario Kart 3.js - JavaScript/WebGL Mario Kart
[Link](https://mario-kart-3-js.vercel.app/)
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/Lunakepio/Mario-Kart-3.js)
@ -43,6 +44,16 @@ Start the dev server
- Feel free to bring your ideas to the project even if you can't code them.
## How to use (Editor)
- [Download Triplex](https://triplex.dev/download)
- Open this project in Triplex from the projects root directory
- Iterate on individual components, set props, have some fun
- [Learn more about Triplex](https://triplex.dev/docs/get-started/user-interface)
## TO - DO
- [ ] Design Landing page

21
tsconfig.json Normal file
View File

@ -0,0 +1,21 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": ".",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"incremental": true,
"isolatedModules": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "es2022"],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"types": ["@react-three/fiber"]
},
"exclude": ["node_modules"],
"include": ["."]
}