Comments (7)
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.
If you have further questions, please post on Answers.
from minko-picking.
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.
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.
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.
yes,use 1*1 bitmap.can do that enterframe,like mouseover ,mouseout
from minko-picking.
fixed in a9b0275
from minko-picking.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minko-picking.