GEP-199 Create a new example project only for the new 3D canvas#591
GEP-199 Create a new example project only for the new 3D canvas#591aranega merged 4 commits intofeature/new-3Dcanvas-fiberfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
Creates a new standalone example project vite-3DCanvas-react-app to showcase the 3D Canvas functionality in isolation from other components.
- Adds new Vite-based React project structure with TypeScript configuration
- Implements Canvas3D example with rotating box demonstration
- Sets up development tooling including ESLint, build scripts, and Geppetto.js integration
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/vite-3DCanvas-react-app/package.json | Project configuration with dependencies for 3D canvas functionality |
| examples/vite-3DCanvas-react-app/src/App.tsx | Main application component with MUI theming setup |
| examples/vite-3DCanvas-react-app/src/components/viewers/Canvas3DExample.tsx | 3D canvas component with animated rotating box example |
| examples/vite-3DCanvas-react-app/vite.config.ts | Vite configuration with custom plugins and optimization settings |
| examples/vite-3DCanvas-react-app/tsconfig*.json | TypeScript configuration files for app and build tooling |
| examples/vite-3DCanvas-react-app/eslint.config.js | ESLint configuration with React and TypeScript rules |
| examples/vite-3DCanvas-react-app/*.sh | Setup and development scripts for Geppetto.js integration |
| examples/vite-3DCanvas-react-app/src/index.css | Styling for flexlayout components |
| examples/vite-3DCanvas-react-app/index.html | HTML entry point |
| examples/vite-3DCanvas-react-app/.gitignore | Git ignore patterns |
| examples/vite-3DCanvas-react-app/README.md | Documentation for the example project |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| useFrame(({ clock }) => { | ||
| const a = clock.getElapsedTime(); | ||
| myMesh.current.rotation.x = a; |
There was a problem hiding this comment.
Potential null reference error. The ref myMesh.current could be null before the mesh is mounted. Add a null check: myMesh.current?.rotation.x = a;
| myMesh.current.rotation.x = a; | |
| myMesh.current?.rotation.x = a; |
| import { Mesh } from "three"; | ||
| import * as THREE from "three"; | ||
|
|
||
| console.log("three.js for 3D view", THREE.REVISION); |
There was a problem hiding this comment.
Console.log statement should be removed from production code or replaced with a proper logging mechanism.
| console.log("three.js for 3D view", THREE.REVISION); |
|
|
||
| const Canvas3DExample: React.FC = () => { | ||
| return ( | ||
| <Box className={classes.container} style={classes.container}> |
There was a problem hiding this comment.
Using both className and style props with the same object is redundant. Since classes.container is a style object, only use the style prop: <Box style={classes.container}>
| <Box className={classes.container} style={classes.container}> | |
| <Box style={classes.container}> |
Issue #GEP-199
Problem: Create a new example project only for the new 3D canvas
Solution:
vite-3DCanvas-react-appusing vite and reactvite-redux-toolkit-react-appinto new projectResult:
Recording.2025-09-24.173643.mp4