Commit 2761c9ae authored by Stoll's avatar Stoll
Browse files

Added ambient light

parent e3227928
......@@ -42,7 +42,7 @@ export const XRRenderer: React.FC = () => {
mountRef.current.appendChild(button);
// --- Lighting ---
const light = new THREE.HemisphereLight(0xffffff, 0xbbbbff, 1);
const light = new THREE.AmbientLight(0xffffff, 0.5);
scene.add(light);
// --- Block manager ---
......
import * as THREE from "three";
import type { IRenderable } from "./IRenderable";
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
import {Texture} from "three";
export class GLTFModel implements IRenderable {
mesh: THREE.Object3D;
......@@ -24,6 +25,11 @@ export class GLTFModel implements IRenderable {
throw new Error(`GLB file not found: ${url}`);
}
const textureLoader = new THREE.TextureLoader();
const texture : Texture = textureLoader.load("/Textures/variation-a.png");
texture.colorSpace = THREE.SRGBColorSpace;
const loader = new GLTFLoader();
loader.load(
url,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment