This website uses cookies.Before continuing to use our website, you agree and accept Privacy policy.Accept

Obj File Viewer made with AI


Rotate with mouse drag, zoom with mouse wheel.

PC - Smartphone



DESCRIPTION

This is a viewer built with three.js that displays an OBJ file from a specified path and allows you to rotate the model by dragging.

If you want to have AI create a 3D game, there will likely be many instances where you want to use your own 3D files. In that case, it would be a good idea to first test having the AI create a program to display 3D files.

Please overwrite the name of the prepared 3D file before using it.

HOW TO MAKE/PROMPT

Created using ChatGPT. It is good to suggest three.js library path. The prompt was as follows:
Make OBJ file viewer html.

#Construction
- html,js,css in 1 file
- show it on 400x400 canvas, max-width:100%
- Use Three.js, libraries are below.
https://unpkg.com/three@0.147.0/build/three.min.js
https://unpkg.com/three@0.147.0/examples/js/controls/OrbitControls.js
https://unpkg.com/three@0.147.0/examples/js/loaders/OBJLoader.js

#Variable
filepath="dat/sample.obj", path to OBJ file

What if there is an error?




<< menu

On-site search