Giter Site home page Giter Site logo

Comments (7)

JMLX42 avatar JMLX42 commented on July 20, 2024

If we use a 1x1 bitmap then we will only get the upper left pixel.
And if that's not where the mouse is then it's not really useful is it? :)

from minko-picking.

JMLX42 avatar JMLX42 commented on July 20, 2024

If you have further questions, please post on Answers.

from minko-picking.

lizhi525 avatar lizhi525 commented on July 20, 2024

you can change the camera.so you can use 1*1 bitmap.

the are2d have do that.http://animation-render-engine.googlecode.com/svn/trunk/swfs/pick.html

from minko-picking.

lizhi525 avatar lizhi525 commented on July 20, 2024
view.camera.projectMatrix.copyRawDataTo(rawdata);
            rawdata[8] = -view.mouseX / view.width3d * 2 ;
            rawdata[9] =view.mouseY / view.height3d * 2 ;
            cameraM.copyRawDataFrom(rawdata);
            
            camera.worldToScreen.copyFrom(view.camera._matrix3D);
            camera.worldToScreen.invert();
            camera.worldToScreen.append(cameraM);

from minko-picking.

JMLX42 avatar JMLX42 commented on July 20, 2024

Nice finding :) We've been looking for this kind of trick!
I re-opened the issue and I'll try to implement this properly: changing the camera projection is not the best way to go I think.

I'd rather define a special data provider for this kind of stuff and add it to the scene data bindings. The picking shader will then be able to fetch this custom projection.

Anyway I got some debug to do on the picking today so I'll try to push this as well.

Does it give any performance boost? I guess it does but the biggest overhead is the VRAM -> RAM copy of the entire framebuffer that happens anyway...

from minko-picking.

lizhi525 avatar lizhi525 commented on July 20, 2024

yes,use 1*1 bitmap.can do that enterframe,like mouseover ,mouseout

from minko-picking.

JMLX42 avatar JMLX42 commented on July 20, 2024

fixed in a9b0275

from minko-picking.

Related Issues (2)

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.