Code Monkey home page Code Monkey logo

Comments (17)

mrdoob avatar mrdoob commented on May 5, 2024

I tried with Chrome 9.0.587.0 dev, Firefox 4.0 Beta 7 and Opera 11.0 Beta and it works fine with all of them. However, in Firefox 3.6.12 some weird artifacts appear. I guess that's a Firefox 3.6 bug now fixed in Firefox 4.0.

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

I tried with Firefox 4 b7 and Chrome. Always the same problem.
If i use this code below i get this image: http://yfrog.com/3mscreenshottxj

var SEPARATION = 200,
AMOUNTX = 10,
AMOUNTY = 10,

        camera, scene, renderer, angle = 270;

        init();

        function init() 
    {           
            var container = document.createElement('div');
            document.body.appendChild(container);

            camera = new THREE.Camera( 75, window.innerWidth / window.innerHeight, 1, 10000 );
            camera.position.z = 600;
            camera.position.x = 250;
    camera.position.y = 170;
    camera.target.position.x = 250; 
    camera.target.position.y = 150;
    camera.target.position.z = 300;       

            scene = new THREE.Scene();

            renderer = new THREE.CanvasRenderer();
            renderer.setSize( window.innerWidth, window.innerHeight );
            container.appendChild( renderer.domElement );



            var geometry = new THREE.Geometry();   
      geometry.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,0,0) ) );
      geometry.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,0,0) ) ); 
      geometry.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,0,900) ) );  
      geometry.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,0,900) ) );  
      geometry.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,0,0) ) );         

    var geometry2 = new THREE.Geometry();   
      geometry2.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,290,0) ) );
      geometry2.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,290,0) ) ); 
      geometry2.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,290,900) ) );  
      geometry2.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,290,900) ) );  
      geometry2.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,290,0) ) );  

    var geometry3 = new THREE.Geometry();   
      geometry3.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,0,0) ) );
      geometry3.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,290,0) ) ); 

    var geometry4 = new THREE.Geometry();   
      geometry4.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,0,900) ) );
      geometry4.vertices.push( new THREE.Vertex( new THREE.Vector3 (0,290,900) ) ); 

    var geometry5 = new THREE.Geometry();   
      geometry5.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,0,0) ) );
      geometry5.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,290,0) ) ); 

    var geometry6 = new THREE.Geometry();   
      geometry6.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,0,900) ) );
      geometry6.vertices.push( new THREE.Vertex( new THREE.Vector3 (500,290,900) ) ); 


            var line1 = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line1); 
    var line2 = new THREE.Line( geometry2, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line2); 
            var line3 = new THREE.Line( geometry3, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line3); 
            var line4 = new THREE.Line( geometry4, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line4); 
            var line5 = new THREE.Line( geometry5, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line5); 
            var line6 = new THREE.Line( geometry6, new THREE.LineBasicMaterial( { color: 0x000000 } ) );
            scene.addObject(line6); 


            renderer.render(scene, camera);
        }

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Is this with the latest version of Three.js?

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

if r29 is the latest version, then it is.

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Mmmm... Windows? MacOS? Linux?

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

Windows 7

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

I'm afraid I can't reproduce this. I've tested your code with the current Three.js in the repo. Tried in IE9 and Chrome on Windows 7 and I don't see any line jumping.

from three.js.

alteredq avatar alteredq commented on May 5, 2024

Just to confirm mrdoob's observations - using these snippets I also can't reproduce the bug on native Windows 7 with Firefox 4 / Chrome 9.

Could you please double-check that you run it with the latest version of Three (fetch from GitHub and just to be sure run a build script).

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

It is the latest version.

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

If we can't reproduce the issue there isn't much else we can do... :/

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Btw, make sure you clear your cache and everything. I wonder if you have a version with lines not being clipped in memory.

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

I tried it on my other computer and I have the same problems. Also after i cleared my cache.

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Could you put your example live somewhere?

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

http://www.youtube.com/watch?v=BDyEo4l4xc8&feature=youtube_gdata

sorry for the bad quality, but i think you can see whats important

from three.js.

alteredq avatar alteredq commented on May 5, 2024

Thanks. Though I guess mrdoob meant more something like this:

http://alteredqualia.com/tmp/bugtest/examples/lines_test_room.html

This is just copy-paste of your code running with my latest build of Three.

This seems to work ok for me (I ran around like you did and flipping didn't occur).

Does this version work for you?

Now if you put somewhere the exact code you ran to produce the video, we could isolate whether problem is in the code (if my version works for you), or in your system (if both versions don't work for you).

from three.js.

Johannesb avatar Johannesb commented on May 5, 2024

I have good news. Your lines_test_room.html works fine. I saw that it was a other three.js file. I had the r29 version and you the r30. but yesterday there wasnt the r30 already to download.

Thank you very much

from three.js.

mrdoob avatar mrdoob commented on May 5, 2024

Maybe line line clipping was added after r29 was tagged and he was downloading the tag version instead of the current version? Mysteries of life...

Thanks for the help alteredq!

from three.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.