@@ -18,7 +18,7 @@ THREE.DefaultLoadingManager.setURLModifier((url) => {
1818const canvas = document . getElementById ( "renderCanvas" ) as HTMLCanvasElement ;
1919
2020// Renderer setup
21- const renderer = new THREE . WebGLRenderer ( { canvas, antialias : true } ) ;
21+ const renderer = new THREE . WebGLRenderer ( { canvas, antialias : false } ) ;
2222renderer . setPixelRatio ( window . devicePixelRatio ) ;
2323renderer . setSize ( window . innerWidth , window . innerHeight ) ;
2424renderer . outputColorSpace = THREE . SRGBColorSpace ;
@@ -29,9 +29,9 @@ renderer.shadowMap.enabled = true;
2929// Scene + Background
3030const scene = new THREE . Scene ( ) ;
3131
32- const backgroundMap = await new THREE . TextureLoader ( ) . loadAsync ( '/hdri/rich_multi_nebulae_2k.png' ) ;
33- backgroundMap . colorSpace = THREE . SRGBColorSpace ;
34- scene . background = ( await buildPrefilteredRadianceMap ( backgroundMap , renderer ) ) . texture ;
32+ // const backgroundMap = await new THREE.TextureLoader().loadAsync('/hdri/rich_multi_nebulae_2k.png');
33+ // backgroundMap.colorSpace = THREE.SRGBColorSpace;
34+ // scene.background = (await buildPrefilteredRadianceMap(backgroundMap, renderer)).texture;
3535
3636// Camera + controls
3737const camera = new THREE . PerspectiveCamera (
@@ -51,9 +51,9 @@ controls.mouseButtons = {
5151 RIGHT : THREE . MOUSE . ROTATE
5252} ;
5353
54- // Lights
55- const radianceMap = await new HDRLoader ( ) . loadAsync ( '/hdri/kloppenheim_02_puresky_1k.hdr' ) ;
56- scene . environment = ( await buildPrefilteredRadianceMap ( radianceMap , renderer ) ) . texture ;
54+ // // Lights
55+ // const radianceMap = await new HDRLoader().loadAsync('/hdri/kloppenheim_02_puresky_1k.hdr');
56+ // scene.environment = (await buildPrefilteredRadianceMap(radianceMap, renderer)).texture;
5757
5858const dirLight = new THREE . DirectionalLight ( 0xffffff , 0.8 ) ;
5959dirLight . position . set ( - 5 , 10 , - 5 ) ;
@@ -152,27 +152,27 @@ async function init() {
152152
153153 scar . material = orange_mat ;
154154
155- // Card
156- const tex = await new THREE . TextureLoader ( ) . loadAsync ( "/models/Scar_Lion_King.png" ) ;
157- tex . colorSpace = THREE . SRGBColorSpace ;
158-
159- const card = new THREE . Mesh (
160- new THREE . PlaneGeometry ( 3.34 , 2.98 ) ,
161- new THREE . MeshBasicMaterial ( {
162- map : tex ,
163- transparent : true ,
164- alphaTest : 0.05 ,
165- side : THREE . DoubleSide ,
166- depthWrite : false , // avoid sorting artifacts
167- } )
168- ) ;
169-
170- card . scale . multiplyScalar ( 0.4 ) ;
171- card . position . z -= 0.75 ;
172- card . position . y -= 0.25 ;
173- card . rotation . set ( - Math . PI * 0.5 , - Math . PI * 0.5 , 0 ) ;
174-
175- scar . add ( card ) ;
155+ // // Card
156+ // const tex = await new THREE.TextureLoader().loadAsync("/models/Scar_Lion_King.png");
157+ // tex.colorSpace = THREE.SRGBColorSpace;
158+
159+ // const card = new THREE.Mesh(
160+ // new THREE.PlaneGeometry(3.34, 2.98),
161+ // new THREE.MeshBasicMaterial({
162+ // map: tex,
163+ // transparent: true,
164+ // alphaTest: 0.05,
165+ // side: THREE.DoubleSide,
166+ // depthWrite: false, // avoid sorting artifacts
167+ // })
168+ // );
169+
170+ // card.scale.multiplyScalar(0.4);
171+ // card.position.z -= 0.75;
172+ // card.position.y -= 0.25;
173+ // card.rotation.set(-Math.PI * 0.5, -Math.PI * 0.5, 0);
174+
175+ // scar.add(card);
176176
177177 // === Interaction ===
178178 let currentPick : THREE . Mesh | null = null ;
0 commit comments