Skip to content
Snippets Groups Projects
Commit a18f5e3e authored by Xavier Gibert's avatar Xavier Gibert
Browse files

trying to solve BUG 1910 white flashing background

parent 0fc55db5
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel=stylesheet href="css/base.css"/>
</head>
<body bgcolor=black>
<body>
<script src="js/three.js"></script>
<script src="js/three.ext.js"></script>
......@@ -60,7 +60,6 @@ This three.js demo is part of a collection at
</script>
<!--<input type="button" value="Say hello" onClick="showAndroidToast('Hello Android!')" />-->
<div id="ThreeJS" style="position: absolute; left:0px; top:0px; background-color:black"></div>
<script>
// MAIN
......
......@@ -10,7 +10,10 @@ function initScene(){
camera.lookAt(scene.position);
// RENDERER
if ( Detector.webgl ){
renderer = new THREE.WebGLRenderer( {antialias:true, clearColor: 0x000000, clearAlpha: 1 } );
renderer = new THREE.WebGLRenderer( { antialias:true } );
//renderer.autoClear = true;
//renderer.autoClearColor = true;
//renderer.setClearColor(0xff0000, 1);
}else{
renderer = new THREE.CanvasRenderer();
alert('WebGL not supported in this device');
......@@ -19,6 +22,7 @@ function initScene(){
renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
container = document.getElementById( 'ThreeJS' );
container.appendChild( renderer.domElement );
// EVENTS
//THREEx.WindowResize(renderer, camera);
//THREEx.FullScreen.bindKey({ charCode : 'm'.charCodeAt(0) });
......
......@@ -82,7 +82,8 @@ public final class HudFragment extends Fragment {
//Initialize WebView
if(mXwalkView==null){
mXwalkView = new XWalkView(this.getActivity().getApplicationContext(), this.getActivity());
mXwalkView.setBackgroundResource(R.color.black);
//mXwalkView.setBackgroundResource(R.color.black);
mXwalkView.setBackgroundColor(0x00000000);
mXwalkView.setResourceClient(new MyResourceClient(mXwalkView));
mXwalkView.setUIClient(new MyUIClient(mXwalkView));
}
......@@ -142,7 +143,6 @@ public final class HudFragment extends Fragment {
mXwalkView.setLayoutParams(browser_params);
browserLayout.addView(mXwalkView);
//browser.load(Parameters.Web.STARTING_PAGE,null);
views_menu = (Button) rootView.findViewById(R.id.buttonMissionNew);
......
......@@ -63,6 +63,7 @@ public final class TestFragment extends Fragment {
//Initialize WebView
if(mXwalkView==null){
mXwalkView = new XWalkView(this.getActivity().getApplicationContext(), this.getActivity());
mXwalkView.setBackgroundColor(0);
mXwalkView.setResourceClient(new MyResourceClient(mXwalkView));
mXwalkView.setUIClient(new MyUIClient(mXwalkView));
}
......@@ -93,7 +94,7 @@ public final class TestFragment extends Fragment {
}
});
mXwalkView = new XWalkView(this.getActivity().getApplicationContext(), this.getActivity());
//mXwalkView = new XWalkView(this.getActivity().getApplicationContext(), this.getActivity());
XWalkSettings browserSettings = mXwalkView.getSettings();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment