chore: add triplex config
This commit is contained in:
3 files changed
+52
No files matched your search
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://triplex.dev/config.schema.json",
|
||||
"components": ["../src/components/**/*.(j|t)sx"],
|
||||
"files": ["../src/components/**/*.(j|t)sx"],
|
||||
"provider": "./provider.tsx",
|
||||
"assetsDir": "models",
|
||||
"rendererAttributes": {
|
||||
"gl": {
|
||||
"antialias": false,
|
||||
"stencil": false,
|
||||
"depth": false,
|
||||
"powerPreference": "high-performance"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user