Skip to content
Snippets Groups Projects
Commit eabb0fae authored by jonschi's avatar jonschi
Browse files

add first tire mesh

parent 88cae164
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ import './style.css'
import * as THREE from 'three'
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
import * as dat from 'dat.gui'
import { RGBA_ASTC_10x10_Format } from 'three'
import { Material, RGBA_ASTC_10x10_Format } from 'three'
// Loading
const textureLoader = new THREE.TextureLoader()
......@@ -18,14 +18,20 @@ const canvas = document.querySelector('canvas.webgl')
const scene = new THREE.Scene()
// Objects
// TODO: add some objects
const tireGeometry = new THREE.TorusGeometry(.7, .2, 16, 100)
// Materials
// TODO: add some materials
const tireMaterial = new THREE.MeshStandardMaterial()
tireMaterial.metalness = 0.7
tireMaterial.roughness = 0.2
tireMaterial.color = new THREE.Color(0x888888)
// Mesh
// TODO: add meshes to the scene
const tireMesh = new THREE.Mesh(tireGeometry, tireMaterial)
scene.add(tireMesh)
// Lights
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment