AIでGLTFビューワを生成
ドラッグで回転、ホイールでズーム。
PC - Smartphone
DESCRIPTION
AIでGLTFビューワを生成してもらったものです。ゲームなどで3Dファイルをロードしたい場合は、まずこのプロンプトを使ってテストしてみましょう。
用意した3Dファイルの名前に上書きしてからご利用ください。
HOW TO MAKE/PROMPT
ChatGPTを使って作成。そのままだとThree.jsのパスを間違うので、指定した方がよい。プロンプトは以下。GLTFビューワHTMLを作って
#仕様
- html,js,css in 1 file
- 400x400 canvas上で表示, max-width:100%
- Three.jsを使用以下ライブラリ
script src="https://unpkg.com/three@0.126.1/build/three.min.js
script src="https://unpkg.com/three@0.126.1/examples/js/controls/OrbitControls.js
import script src="https://unpkg.com/three@0.126.1/examples/jsm/loaders/GLTFLoader.js
#変数
filepath="../ai/dat/sample.glb", path to GLTF file
ゲームが生成できない?
<< menu
On-site search