Skip to content

GEP-199 Create a new example project only for the new 3D canvas#591

Merged
aranega merged 4 commits intofeature/new-3Dcanvas-fiberfrom
feature/GEP-119
Sep 24, 2025
Merged

GEP-199 Create a new example project only for the new 3D canvas#591
aranega merged 4 commits intofeature/new-3Dcanvas-fiberfrom
feature/GEP-119

Conversation

@Aiga115
Copy link
Contributor

@Aiga115 Aiga115 commented Sep 24, 2025

Issue #GEP-199

Problem: Create a new example project only for the new 3D canvas

Solution:

  1. Add new project called vite-3DCanvas-react-app using vite and react
  2. Copy insides of vite-redux-toolkit-react-app into new project
  3. Delete unnecessary files and update code to show only 3D Canvas layout

Result:

Recording.2025-09-24.173643.mp4

@Aiga115 Aiga115 requested review from aranega and Copilot September 24, 2025 15:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Suggested change
myMesh.current.rotation.x = a;
myMesh.current?.rotation.x = a;

Copilot uses AI. Check for mistakes.
import { Mesh } from "three";
import * as THREE from "three";

console.log("three.js for 3D view", THREE.REVISION);
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console.log statement should be removed from production code or replaced with a proper logging mechanism.

Suggested change
console.log("three.js for 3D view", THREE.REVISION);

Copilot uses AI. Check for mistakes.

const Canvas3DExample: React.FC = () => {
return (
<Box className={classes.container} style={classes.container}>
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}>

Suggested change
<Box className={classes.container} style={classes.container}>
<Box style={classes.container}>

Copilot uses AI. Check for mistakes.
@Aiga115 Aiga115 changed the title GEP-199 GEP-199 Create a new example project only for the new 3D canvas Sep 24, 2025
@aranega aranega merged commit de03d0a into feature/new-3Dcanvas-fiber Sep 24, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants