Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Why there is no output in display? #185

Open
USMANHEART opened this issue Dec 26, 2020 · 0 comments
Open

Why there is no output in display? #185

USMANHEART opened this issue Dec 26, 2020 · 0 comments

Comments

@USMANHEART
Copy link

I have followed all your steps by using NPM. But there is no output, blank screen. But when I try normal renderer, there is output.

`const renderer = new RayTracingRenderer();
// const renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer.setSize( window.innerWidth, window.innerHeight );
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 100);
camera.position.z = 10;
scene.add( camera );

    const amLight = new THREE.AmbientLight("#ffffff");
    scene.add( amLight );

    const material = new THREE.MeshStandardMaterial();
    material.map = new THREE.TextureLoader().load('https://m.media-amazon.com/images/I/8162wgFO8rL._AC_SS350_.jpg');
    material.shadowCatcher = true;

    const geometry = new THREE.BoxBufferGeometry();
    const mesh = new THREE.Mesh(geometry, material);
    scene.add( mesh );

    // renderer.toneMapping = THREE.Uncharted2ToneMapping; // a low contrast operator
    // renderer.toneMappingExposure = 2; // the higher the number, the brighter the scene
    // renderer.toneMappingWhitePoint = 8;

    this.renderer = renderer;
    this.camera = camera;
    this.scene = scene;

    document.body.appendChild( renderer.domElement );

    THREE.DefaultLoadingManager.onLoad = this.tick.bind(this);`

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant