Skip to content

Commit

Permalink
feat: move Floor component to @react-three/jolt-addons
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Apr 14, 2024
1 parent 94033f4 commit 1d25c60
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apps/examples/src/examples/CubeHeap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import {
useJolt,
useSetInterval,
} from '@react-three/jolt';
import { Floor } from '@react-three/jolt-addons';
import { useControls } from 'leva';
import { useEffect, useRef } from 'react';
import * as THREE from 'three';
import { Floor } from '../components/Floor';

// this is going to be the instancedMesh version
export function CubeHeap() {
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/src/examples/JustBoxes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RigidBody } from '@react-three/jolt';
import { Floor } from '../components/Floor';
import { Floor } from '@react-three/jolt-addons';

export function JustBoxes() {
//const { physicsSystem } = useJolt();
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/src/examples/RaycastSimpleDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
useSetTimeout,
useUnmount,
} from '@react-three/jolt';
import { Floor } from '@react-three/jolt-addons';
import { useEffect, useRef } from 'react';
import * as THREE from 'three';
import { Floor } from '../components/Floor';

export function RaycastSimpleDemo() {
const raycaster: Raycaster = useRaycaster();
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src", "public/jolt"],
"include": ["src", "public/jolt", "../../packages/react-three-jolt-addons/src/components/Floor.tsx"],
"references": [{ "path": "./tsconfig.node.json" }]
}
1 change: 1 addition & 0 deletions packages/react-three-jolt-addons/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from 'path';
import filesize from 'rollup-plugin-filesize';

const external = [
'@react-three/jolt',
'jolt-physics',
'@react-three/fiber',
'@react-three/drei',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { RigidBody } from '@react-three/jolt';
import React from 'react';
import * as THREE from 'three';

export const Floor = (props: any) => {
Expand Down
1 change: 1 addition & 0 deletions packages/react-three-jolt-addons/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Floor';
2 changes: 1 addition & 1 deletion packages/react-three-jolt-addons/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as _fiber from '@react-three/fiber';

export const placeholder = 0;
export * from './components';
1 change: 1 addition & 0 deletions packages/react-three-jolt-controllers/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import path from 'path';
import filesize from 'rollup-plugin-filesize';

const external = [
'@react-three/jolt',
'jolt-physics',
'@react-three/fiber',
'@react-three/drei',
Expand Down

0 comments on commit 1d25c60

Please sign in to comment.