mirror of
https://github.com/EthanPisani/ethanpisani.com.git
synced 2025-07-02 18:15:18 -04:00
18 lines
713 B
JavaScript
18 lines
713 B
JavaScript
import * as THREE from 'https://threejsfundamentals.org/threejs/resources/threejs/r125/build/three.module.js';
|
|
import {OrbitControls} from 'https://threejsfundamentals.org/threejs/resources/threejs/r125/examples/jsm/controls/OrbitControls.js';
|
|
import {GLTFLoader} from 'https://threejsfundamentals.org/threejs/resources/threejs/r125/examples/jsm/loaders/GLTFLoader.js';
|
|
const loader = new GLTFLoader();
|
|
const scene = new THREE.Scene();
|
|
//scene.background = new THREE.Color('black');
|
|
// Load a glTF resource
|
|
|
|
|
|
|
|
|
|
const gltfLoader = new GLTFLoader();
|
|
gltfLoader.load('../models/organic/propan-2-ol.gltf', (gltf) => {
|
|
const root = gltf.scene;
|
|
scene.add(root);
|
|
gltf.asset;
|
|
render();
|
|
}); |