0

Here is my scene and apply light.

scene = new THREE.Scene();
defaultCamera = new THREE.PerspectiveCamera( 45, container.offsetWidth / container.offsetHeight, 0.01, 100 );

// defaultCamera.up = new THREE.Vector3( 0, 1, 0 );
scene.add( defaultCamera );
camera = defaultCamera;

var sceneInfo = sceneList[index];
var spot1 = null;
var light = new THREE.DirectionalLight( 0xffffff, 1 );
light.position.set( 10, 10, 10 );
scene.add( light );

After this i am loading the .gltf model using gltf2loader. My model is black in Android. Does anyone have a solution? Please help

Quango
  • 12,338
  • 6
  • 48
  • 83
user3587692
  • 183
  • 1
  • 10
  • Does it only happen on Android? Maybe your problem is related to the following issue: https://github.com/mrdoob/three.js/issues/14137. Does it work if you create your `WebGLRenderer` like this: `var renderer = new THREE.WebGLRenderer( { precision: 'mediump' } );` – Mugen87 Aug 17 '18 at 10:56
  • Is the model also black on https://gltf-viewer.donmccurdy.com/? If so, are you able to share the model? – Don McCurdy Aug 18 '18 at 01:33
  • @Mugen87 ..Thxxx. its working after creating the WebGLRenderer using { precision: 'mediump' }.. – user3587692 Aug 20 '18 at 06:39

0 Answers0