This commit is contained in:
parent
f06f9517cc
commit
36042bcc28
1 changed files with 4 additions and 20 deletions
|
|
@ -94,22 +94,7 @@
|
||||||
renderer.setPixelRatio(window.devicePixelRatio);
|
renderer.setPixelRatio(window.devicePixelRatio);
|
||||||
container.appendChild(renderer.domElement);
|
container.appendChild(renderer.domElement);
|
||||||
|
|
||||||
// Lighting
|
// No lighting needed - using MeshBasicMaterial for uniform appearance
|
||||||
const ambientLight = new THREE.AmbientLight(0x404040, 0.5);
|
|
||||||
scene.add(ambientLight);
|
|
||||||
|
|
||||||
const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
|
|
||||||
directionalLight.position.set(1, 1, 1);
|
|
||||||
scene.add(directionalLight);
|
|
||||||
|
|
||||||
const directionalLight2 = new THREE.DirectionalLight(0xffffff, 0.5);
|
|
||||||
directionalLight2.position.set(-1, 0.5, -1);
|
|
||||||
scene.add(directionalLight2);
|
|
||||||
|
|
||||||
// Grid helper for reference
|
|
||||||
const gridHelper = new THREE.GridHelper(400, 20, 0x222222, 0x111111);
|
|
||||||
gridHelper.position.y = -1;
|
|
||||||
scene.add(gridHelper);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDataTexture(faceData) {
|
function createDataTexture(faceData) {
|
||||||
|
|
@ -181,7 +166,7 @@
|
||||||
const baseTexture = createDataTexture(null);
|
const baseTexture = createDataTexture(null);
|
||||||
faceTextures[0] = baseTexture;
|
faceTextures[0] = baseTexture;
|
||||||
|
|
||||||
const baseMaterial = new THREE.MeshStandardMaterial({
|
const baseMaterial = new THREE.MeshBasicMaterial({
|
||||||
map: baseTexture,
|
map: baseTexture,
|
||||||
side: THREE.DoubleSide
|
side: THREE.DoubleSide
|
||||||
});
|
});
|
||||||
|
|
@ -240,7 +225,7 @@
|
||||||
const texture = createDataTexture(null);
|
const texture = createDataTexture(null);
|
||||||
faceTextures[i + 1] = texture;
|
faceTextures[i + 1] = texture;
|
||||||
|
|
||||||
const material = new THREE.MeshStandardMaterial({
|
const material = new THREE.MeshBasicMaterial({
|
||||||
map: texture,
|
map: texture,
|
||||||
side: THREE.DoubleSide
|
side: THREE.DoubleSide
|
||||||
});
|
});
|
||||||
|
|
@ -256,8 +241,7 @@
|
||||||
|
|
||||||
function setupControls() {
|
function setupControls() {
|
||||||
controls = new OrbitControls(camera, renderer.domElement);
|
controls = new OrbitControls(camera, renderer.domElement);
|
||||||
controls.enableDamping = true;
|
controls.enableDamping = false;
|
||||||
controls.dampingFactor = 0.05;
|
|
||||||
controls.screenSpacePanning = false;
|
controls.screenSpacePanning = false;
|
||||||
controls.minDistance = 100;
|
controls.minDistance = 100;
|
||||||
controls.maxDistance = 500;
|
controls.maxDistance = 500;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue