Search Results

Search found 726 results on 30 pages for 'motion blur'.

Page 5/30 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Unity has jerky motion when using Vector2.Lerp

    - by Sting Hà
    I made a 2D game with some sprite move to random position. I used Vector2.Lerp and Time.deltaTime to smooth transfer of sprite. When I build this game in iOS ( I used iPhone 4s and iPhone 5 for test ) all sprite made jerky motion and cause my game lagging. But in Android game run very smoothy. I used only 9 sprite and move all in same time. Can someone have any solution to fix this? Thanks. P/s: Sorry about my bad English.

    Read the article

  • Android NDK Gaussian Blur radius stuck at 60

    - by rennoDeniro
    I implemented this NDK imeplementation of a Gaussian Blur, But I am having problems. I cannot increase the radius above 60, otherwise the activity just closes returning to a previous activity. No error message, nothing? Does anyone know why this could be? Note: This blur is based on the quasimondo implementation, here #include <jni.h> #include <string.h> #include <math.h> #include <stdio.h> #include <android/log.h> #include <android/bitmap.h> #define LOG_TAG "libbitmaputils" #define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__) #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,LOG_TAG,__VA_ARGS__) typedef struct { uint8_t red; uint8_t green; uint8_t blue; uint8_t alpha; } rgba; JNIEXPORT void JNICALL Java_com_insert_your_package_ClassName_functionToBlur(JNIEnv* env, jobject obj, jobject bitmapIn, jobject bitmapOut, jint radius) { LOGI("Blurring bitmap..."); // Properties AndroidBitmapInfo infoIn; void* pixelsIn; AndroidBitmapInfo infoOut; void* pixelsOut; int ret; // Get image info if ((ret = AndroidBitmap_getInfo(env, bitmapIn, &infoIn)) < 0 || (ret = AndroidBitmap_getInfo(env, bitmapOut, &infoOut)) < 0) { LOGE("AndroidBitmap_getInfo() failed ! error=%d", ret); return; } // Check image if (infoIn.format != ANDROID_BITMAP_FORMAT_RGBA_8888 || infoOut.format != ANDROID_BITMAP_FORMAT_RGBA_8888) { LOGE("Bitmap format is not RGBA_8888!"); LOGE("==> %d %d", infoIn.format, infoOut.format); return; } // Lock all images if ((ret = AndroidBitmap_lockPixels(env, bitmapIn, &pixelsIn)) < 0 || (ret = AndroidBitmap_lockPixels(env, bitmapOut, &pixelsOut)) < 0) { LOGE("AndroidBitmap_lockPixels() failed ! error=%d", ret); } int h = infoIn.height; int w = infoIn.width; LOGI("Image size is: %i %i", w, h); rgba* input = (rgba*) pixelsIn; rgba* output = (rgba*) pixelsOut; int wm = w - 1; int hm = h - 1; int wh = w * h; int whMax = max(w, h); int div = radius + radius + 1; int r[wh]; int g[wh]; int b[wh]; int rsum, gsum, bsum, x, y, i, yp, yi, yw; rgba p; int vmin[whMax]; int divsum = (div + 1) >> 1; divsum *= divsum; int dv[256 * divsum]; for (i = 0; i < 256 * divsum; i++) { dv[i] = (i / divsum); } yw = yi = 0; int stack[div][3]; int stackpointer; int stackstart; int rbs; int ir; int ip; int r1 = radius + 1; int routsum, goutsum, boutsum; int rinsum, ginsum, binsum; for (y = 0; y < h; y++) { rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; for (i = -radius; i <= radius; i++) { p = input[yi + min(wm, max(i, 0))]; ir = i + radius; // same as sir stack[ir][0] = p.red; stack[ir][1] = p.green; stack[ir][2] = p.blue; rbs = r1 - abs(i); rsum += stack[ir][0] * rbs; gsum += stack[ir][1] * rbs; bsum += stack[ir][2] * rbs; if (i > 0) { rinsum += stack[ir][0]; ginsum += stack[ir][1]; binsum += stack[ir][2]; } else { routsum += stack[ir][0]; goutsum += stack[ir][1]; boutsum += stack[ir][2]; } } stackpointer = radius; for (x = 0; x < w; x++) { r[yi] = dv[rsum]; g[yi] = dv[gsum]; b[yi] = dv[bsum]; rsum -= routsum; gsum -= goutsum; bsum -= boutsum; stackstart = stackpointer - radius + div; ir = stackstart % div; // same as sir routsum -= stack[ir][0]; goutsum -= stack[ir][1]; boutsum -= stack[ir][2]; if (y == 0) { vmin[x] = min(x + radius + 1, wm); } p = input[yw + vmin[x]]; stack[ir][0] = p.red; stack[ir][1] = p.green; stack[ir][2] = p.blue; rinsum += stack[ir][0]; ginsum += stack[ir][1]; binsum += stack[ir][2]; rsum += rinsum; gsum += ginsum; bsum += binsum; stackpointer = (stackpointer + 1) % div; ir = (stackpointer) % div; // same as sir routsum += stack[ir][0]; goutsum += stack[ir][1]; boutsum += stack[ir][2]; rinsum -= stack[ir][0]; ginsum -= stack[ir][1]; binsum -= stack[ir][2]; yi++; } yw += w; } for (x = 0; x < w; x++) { rinsum = ginsum = binsum = routsum = goutsum = boutsum = rsum = gsum = bsum = 0; yp = -radius * w; for (i = -radius; i <= radius; i++) { yi = max(0, yp) + x; ir = i + radius; // same as sir stack[ir][0] = r[yi]; stack[ir][1] = g[yi]; stack[ir][2] = b[yi]; rbs = r1 - abs(i); rsum += r[yi] * rbs; gsum += g[yi] * rbs; bsum += b[yi] * rbs; if (i > 0) { rinsum += stack[ir][0]; ginsum += stack[ir][1]; binsum += stack[ir][2]; } else { routsum += stack[ir][0]; goutsum += stack[ir][1]; boutsum += stack[ir][2]; } if (i < hm) { yp += w; } } yi = x; stackpointer = radius; for (y = 0; y < h; y++) { output[yi].red = dv[rsum]; output[yi].green = dv[gsum]; output[yi].blue = dv[bsum]; rsum -= routsum; gsum -= goutsum; bsum -= boutsum; stackstart = stackpointer - radius + div; ir = stackstart % div; // same as sir routsum -= stack[ir][0]; goutsum -= stack[ir][1]; boutsum -= stack[ir][2]; if (x == 0) vmin[y] = min(y + r1, hm) * w; ip = x + vmin[y]; stack[ir][0] = r[ip]; stack[ir][1] = g[ip]; stack[ir][2] = b[ip]; rinsum += stack[ir][0]; ginsum += stack[ir][1]; binsum += stack[ir][2]; rsum += rinsum; gsum += ginsum; bsum += binsum; stackpointer = (stackpointer + 1) % div; ir = stackpointer; // same as sir routsum += stack[ir][0]; goutsum += stack[ir][1]; boutsum += stack[ir][2]; rinsum -= stack[ir][0]; ginsum -= stack[ir][1]; binsum -= stack[ir][2]; yi += w; } } // Unlocks everything AndroidBitmap_unlockPixels(env, bitmapIn); AndroidBitmap_unlockPixels(env, bitmapOut); LOGI ("Bitmap blurred."); } int min(int a, int b) { return a > b ? b : a; } int max(int a, int b) { return a > b ? a : b; }

    Read the article

  • jquery .blur for entire block of HTML

    - by Stacey
    I have an HTML item for a 'drop down menu', structured like this... <li class="ui-dropdown-list" > <a href="#">Right Drop Down Menu</a> <ul> <li><a href="#">Item</a></li> <li><a href="#">Item</a></li> <li><a href="#">Item</a></li> </ul> </li> Using jQuery to make this a dropdown list, with the following code. jQuery.fn.dropdown = function () { var defaults = { button: null, menu: null, visible: false }; var options = $.extend(defaults, options); return this.each(function () { options.button = $(this); options.menu = $(this).find("ul"); // when the parent is clicked, determine whether dropdown needs to occur options.button.click(function () { options.visible ? lift(options.menu) : drop(options.menu); options.visible = !options.visible; }); // drop the menu down so that it can be seen. function drop(e) { options.button.addClass("open"); options.menu.show(); } // lift the menu up, hiding it from view. function lift(e) { options.menu.hide(); options.button.removeClass('open'); } }); }; I am trying to wire it up so that if the user clicks anywhere outside of the menu, it will collapse it. This is proving much more difficult than I anticipated; even trying to use page level events. Any suggestions? The menu itself never really 'receives' focus, so using .blur doesn't seem to be suiting the purpose.

    Read the article

  • hide keyboard in iphone safari webapp

    - by munchybunch
    I'm creating a webapp for the iPhone, based in HTML/CSS/JS. I'm using forms to receive input and pass data to the script, but a problem I'm encountering is that the keyboard won't disappear. The user will enter the information, hit submit, and since it's JavaScript the page doesn't reload. The keyboard remains in place, which is a nuisance and adds another step for users (having to close it). Is there any way to force the keyboard in Safari to go away? Essentially, I have a feeling this question is equivalent to asking how I can force an input box to lose focus or to blur. Looking online, I find plenty of examples to detect the blur event, but none to force this event to occur.

    Read the article

  • Fast, very lightweight algorithm for camera motion detection?

    - by Ertebolle
    I'm working on an augmented reality app for iPhone that involves a very processor-intensive object recognition algorithm (pushing the CPU at 100% it can get through maybe 5 frames per second), and in an effort to both save battery power and make the whole thing less "jittery" I'm trying to come up with a way to only run that object recognizer when the user is actually moving the camera around. My first thought was to simply use the iPhone's accelerometers / gyroscope, but in testing I found that very often people would move the iPhone at a consistent enough attitude and velocity that there wouldn't be any way to tell that it was still in motion. So that left the option of analyzing the actual video feed and detecting movement in that. I got OpenCV working and tried running their pyramidal Lucas-Kanade optical flow algorithm, which works well but seems to be almost as processor-intensive as my object recognizer - I can get it to an acceptable framerate if I lower the depth levels / downsample the image / track fewer points, but then accuracy suffers and it starts to miss some large movements and trigger on small hand-shaking-y ones. So my question is, is there another optical flow algorithm that's faster than Lucas-Kanade if I just want to detect the overall magnitude of camera movement? I don't need to track individual objects, I don't even need to know which direction the camera is moving, all I really need is a way to feed something two frames of video and have it tell me how far apart they are.

    Read the article

  • How to keep submit button visible and executable upon textarea onblur

    - by ninumedia
    I have a <div id="comment_posting_holder"> tag that holds a form with two elements: a textarea box and a submit button. I want to have the div tag (containing the textarea and submit button) disappear if I click somewhere "OTHER" than the submit button. I have a start for the code below. So upon leaving focus from the textarea, I can make the div tag disappear. I tried placing in a mouseclick event inside the blur function for the submit button but that did not work. Any suggestions? Thank you! **Facebook does this with it's comments. If you click on a "Post your comment..." field the textarea appears and then it will disappear upon losing focus other than if you pressed the submit button. $('textarea').blur(function() { $('#comment_posting_holder).hide(); });

    Read the article

  • how do I match movement of an object from 2d video into a 3d package ?

    - by George Profenza
    I'm trying to add objects in a 3d package(Blender) using recorded footage. I've played with Icarus and it's great to capture the camera movement. Also the Blender 2.41 importer script works in Blender 2.49 as well. The problem is I can't seem to get 3d coordinates for objects. I have tried Autodesk(RealVIZ) MatchMover 2011 and gone through the tutorials. Tutorial 3 shows how to link a vertex from a 3d mesh to a 2d trackpoint, but the setup is for camera movement. Tutorial 4 goes into Motion capture, but it uses 2 videos of the same motion taken with 2 cameras from different viewpoints. I've tried to bypass that using the same footage twice, but that failed, as the 3d coordinate system ends up messed up. What software do you recommend for this (mapping 3d coordinates to 2d tracked points and importing them into a 3d package) ? What is the recommended technique ? Any good examples out there ? Thanks, George

    Read the article

  • How do I line up subsequent slides with Powerpoint's Motion Paths?

    - by ladenedge
    I'm using Powerpoint's Motion Paths to move images around in my slides. The problem is, on subsequent slides I need the previously-moved images to appear in their Motion Path destinations and I can't seem to get them to line up perfectly. The resulting effect is a smoothly moving image that suddenly "jumps" a few pixels on a slide transition. How can I get images to appear exactly at the end of their Motion Paths in subsequent slides?

    Read the article

  • Inline-editing: onBlur prevents onClick from being triggered (jQuery)

    - by codethief
    Hello StackOverflow community! I'm currently working on my own jQuery plugin for inline-editing as those that already exist don't fit my needs. Anyway, I'd like to give the user the following (boolean) options concerning the way editing is supposed to work: submit_button reset_on_blur Let's say the user would like to have a submit button (submit_button = true) and wants the inline input element to be removed as soon as it loses focus (reset_on_blur = true). This leads to an onClick handler being registered for the button and an onBlur handler being registered for the input element. Every time the user clicks the button, however, the onBlur handler is also triggered and results in the edit mode being left, i.e. before the onClick event occurs. This makes submitting impossible. FYI, the HTML in edit mode looks like this: <td><input type="text" class="ie-input" value="Current value" /><div class="ie-content-backup" style="display: none;">Backup Value</div><input type="submit" class="ie-button-submit" value="Save" /></td> So, is there any way I could check in the onBlur handler if the focus was lost while activating the submit button, so that edit mode isn't left before the submit button's onClick event is triggered? I've also tried to register a $('body').click() handler to simulate blur and to be able to trace back which element has been clicked, but that didn't work either and resulted in rather strange bugs: $('html').click(function(e) { // body doesn't span over full page height, use html instead // Don't reset if the submit button, the input element itself or the element to be edited inline was clicked. if(!$(e.target).hasClass('ie-button-submit') && !$(e.target).hasClass('ie-input') && $(e.target).get(0) != element.get(0)) { cancel(element); } }); jEditable uses the following piece of code. I don't like this approach, though, because of the delay. Let alone I don't even understand why this works. ;) input.blur(function(e) { /* prevent canceling if submit was clicked */ t = setTimeout(function() { reset.apply(form, [settings, self]); }, 500); }); Thanks in advance!

    Read the article

  • modal popup extender as progress bar

    - by Anish Mohan
    Hi, I have a modal popup extender in which i have a progress bar. When i click a button ...this popup should be displayed to the user. I have done this though button.attributes.add().[ this is without postback] But ...popup extender can blur the base page only after the postback. Issue is currently i am able to see the progress bar...but base page is not blurred. :( Any help

    Read the article

  • Is it possible to smooth a scaled TBitmap in Delphi?

    - by Brian Frost
    I am using Stretched=True on a TBitmap with a 256x256 image. This gets scaled down by 1,2,4 or 8. As expected, text on the bitmap gets more horrible the more I depart from '1'. I notice though that Windows 7 explorer renders a scaled down version of the bitmap 'softer' and more pleasing. Is it possible to 'blur' a TBitmap in this way?

    Read the article

  • Implementing Projectile Motion

    - by DMan
    I've scored the internet for sources and have found a lot of useful information, but they are math sites trying to tell me how to solve what angle an object has to be at to reach y location. However, I'm trying to run a simulation, and haven't found any solid equations that can be implemented to code to simulate a parabolic curve. Can those with some knowledge of physics help me on this?

    Read the article

  • IPhone Accelerometer Determine Motion

    - by Kelly
    Using the accelerometer output, how do I determine if the user (iphone mounted on waist) is walking? Looking for a good algorithm to determine if the user is walking to determine activity transitions- standing-to-walking or walking-to-standing. please help. Thank you for your time.

    Read the article

  • How to capture a motion in iphone camera.

    - by Kishore
    Hi, In My application as the user opens the camera, camera should capture a image as soon as there is a difference in image when compared to previous image and camera should always be in capturing mode. This should be done automatically without any user interaction.Please Help me out as i couldn't find the solution asap. Thanks, ravi

    Read the article

  • Vertical circular motion : time(x/y) versus velocity equation

    - by adeeti
    Hi, I wanted to simulate the following through animation : A ball starts with a certain velocity at the bottom most point of a vertical circular loop and keeps rolling in it until its velocity permits. For this, I wanted to find velocity/x/y vs. time equation. For e.g. if the ball had mass : 5Kg, radius of the circular loop = 10m, and initial velocity of the ball is 200 m/s, what will its velocity and (x,y) position be after 5 seconds? thanks.

    Read the article

  • Easiest Way To Implement "Slow Motion" and variable game speed in XNA?

    - by TerryB
    I have an XNA 4.0 game that I want to be able to switch into slow motion and back again to full speed every now and then. So if you kill an enemy the game switches into slow motion as they explode and then goes back to normal. What is the easiest way to do this in XNA 4.0 without having to alter all my existing code that relies on GameTime? I have some code that relies on the TotalGameTime, which will be wrong unless I get XNA to slow down. Is there anyway to avoid refactoring that code? Thanks!

    Read the article

  • Why is android:FLAG_BLUR_BEHIND creating a gradient background in my new activity instead of bluring

    - by nderraugh
    Hi, I've got two activities. One is supposed to be a blur in front of the other. The background activity has several ImageViews which are set up as thin gradients extending across most of the screen and 10dip high. When I start the second activity it sets the background as a gradient occupying the entire window space, that is it appears to be fill_parent'd for both height and width. If I comment out the ImageViews then it blurs and looks as expected. Any thoughts? Here's the code doing the blur. import android.app.Activity; import android.os.Bundle; import android.view.View; import android.view.WindowManager; import android.view.View.OnClickListener; public class TransluscentBlurSummaryB extends Activity { @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND, WindowManager.LayoutParams.FLAG_BLUR_BEHIND); getWindow().getAttributes().dimAmount = 0.5f; getWindow().setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND, WindowManager.LayoutParams.FLAG_DIM_BEHIND); setContentView(R.layout.sheetbdetails); OnClickListener clickListener = new OnClickListener() { public void onClick(View v) { TransluscentBlurSummaryB.this.finish(); } }; findViewById(R.id.sheetbdetailstable).setOnClickListener(clickListener); } } And here's the layout with the ImageView gradients. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/summarysparent" > <!-- view1 goes on top --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/view2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true"> <Button android:layout_height="wrap_content" android:id="@+id/ButtonBack" android:layout_width="wrap_content" android:text="Back" android:width="100dp"></Button> <Button android:layout_height="wrap_content" android:id="@+id/ButtonNext" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:text="Start Over" android:width="100dp"></Button> </RelativeLayout> <TextView android:id="@+id/view1" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_width="wrap_content" android:layout_centerHorizontal="true" android:textSize="10pt" android:text="Summary"/> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/summaryscrollview" android:layout_below="@+id/view1" android:layout_above="@+id/view2"> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/summarydetails" > <!-- view2 goes on the bottom --> <TextView android:id="@+id/textview2" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@+id/view1" android:layout_centerHorizontal="true" android:text="Recommended Child Support Order" android:layout_marginTop="10dip" /> <ImageView android:id="@+id/horizontalLine1" android:layout_width="fill_parent" android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:layout_height="10dip" android:src="@drawable/black_white_gradient" android:layout_below="@+id/textview2" android:layout_marginTop="10dip" /> <TextView android:id="@+id/textview3" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@+id/horizontalLine1" android:layout_centerHorizontal="true" android:text="You" android:layout_marginTop="10dip" /> <TextView android:id="@+id/textview10" android:layout_height="wrap_content" android:layout_width="150dp" android:layout_below="@+id/textview3" android:layout_centerHorizontal="true" android:layout_marginTop="10dip" android:gravity="center_horizontal" /> <ImageView android:id="@+id/horizontalLine2" android:layout_width="fill_parent" android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:layout_height="10dip" android:src="@drawable/black_white_gradient" android:layout_below="@+id/textview10" android:layout_marginTop="10dip" /> <TextView android:id="@+id/textview4" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@+id/horizontalLine2" android:layout_centerHorizontal="true" android:text="Other Parent" android:layout_marginTop="10dip" /> <TextView android:id="@+id/textview11" android:layout_height="wrap_content" android:layout_width="150dp" android:layout_below="@+id/textview4" android:layout_centerHorizontal="true" android:layout_marginTop="10dip" android:text="$536.18" android:gravity="center_horizontal" /> <ImageView android:id="@+id/horizontalLine3" android:layout_width="fill_parent" android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:layout_height="10dip" android:src="@drawable/black_white_gradient" android:layout_below="@+id/textview11" android:layout_marginTop="10dip" /> <TextView android:id="@+id/textview5" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@+id/horizontalLine3" android:layout_centerHorizontal="true" android:text="Calculation Details" android:layout_marginTop="15dip" /> <ImageView android:id="@+id/infoButton" android:src="@drawable/ic_menu_info_details" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@+id/horizontalLine3" android:layout_toRightOf="@+id/textview5" android:clickable="true" /> <ImageView android:id="@+id/horizontalLine4" android:layout_width="fill_parent" android:layout_marginLeft="5dip" android:layout_marginRight="5dip" android:layout_height="10dip" android:src="@drawable/black_white_gradient" android:layout_below="@+id/textview5" android:layout_marginTop="18dip" /> </RelativeLayout> </ScrollView> </RelativeLayout> The gradient drawable is this. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#FFFFFF" android:centerColor="#000000" android:endColor="#FFFFFF" android:angle="270"/> <padding android:left="7dp" android:top="7dp" android:right="7dp" android:bottom="7dp" /> <corners android:radius="8dp" /> </shape> And here's the layout from the activity doing the blurring on top. <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/sheetbdetails" android:layout_width="fill_parent" android:layout_height="fill_parent" android:clickable="true" > <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" android:shrinkColumns="0" android:id="@+id/sheetbdetailstable" > <TableRow> <TextView android:padding="3dip" /> <TextView android:text="You" android:padding="3dip" /> <TextView android:text="@string/otherparent" android:padding="3dip" /> <TextView android:text="Combined" android:padding="3dip" /> </TableRow> </TableLayout> </ScrollView> The transparent windows are themed from styles.xml in the apidemos using @style/Theme.Transparent.

    Read the article

  • Text rendering blurred in Firefox and Internet Explorer using jQuery

    - by Sixfoot Studio
    Not sure what causes this? If I user slideDown in Firefox the text rendering cuts off the top of the letters before the animation is complete. This is ok in IE. If I then change the animation to use fadeIn instead, the blur does not happen in Firefox but the text is very jagged in IE. From another question I have asked in the past pertaining to animation, the guy told me that I should wrap that which I want to animate in another DIV and animate that instead. This sorted out the jerkiness caused by the padding on the content inside the .animateDiv. Is there a trick to the text rendering as well in jQuery

    Read the article

  • How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)

    - by Twodordan
    I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things simple. Now I'm trying to tackle collisions. The way I wrote things, my game only has rectangular sprites (axis aligned, never rotated) of various/variable sizes. So I need to figure out what I hit and which side of the target sprite I hit (and I'm probably going to use these intersection tests). The old fashioned method seems to be to use tile based grids, to target only a few tiles at a time, but that sounds silly and impractical for my game. (Splitting the whole level into blocks, having each sprite's bounding box fit multiple blocks I might abide. But if the sprites change size and move around, you have to keep changing which tiles they belong to, every frame, it doesn't sound right.) In Flash you can test collision under one point, but it's not efficient to iterate through all the elements on stage each frame. (hence why people use the tile method). Bottom line is, I'm trying to figure out how to test only the elements within the player's range of motion. (I know how to get the range of motion, I have a good idea of how to write a collisionCheck(playerSprite, targetSprite) function. But how do I know which sprites are currently in the player's vicinity to fetch only them?) Please discuss. Cheers!

    Read the article

  • Which Kinect package for PC takes care of motion tracking too?

    - by Extrakun
    I am aware that there are opensource drivers for interfacing Kinect with the PC. My question is - the drivers at OpenKinect seems to provide only the images and depth data (from the reading of their wiki and API). It seems that you need to provide your own imaging solution. My question is - is there any all-in-one package, with samples/sources that not only grab images from Kinect, but also do the imaging/motion detection for you?

    Read the article

  • Creating a semi-transparent blurred background WPF

    - by Dave Colwell
    Hi guys, I have a border, i want the background of this border to be partially transparent (opacity 0.8) but i do not want the image behind it to be well defined. The effect i am after is similar to the Windows Vista window border effect, where you can see that something is behind it but you cant tell what it is. A few clarifications: I am working on Windows XP, so i cant use Vista Glass I need this solution to be portable across any windows platform Any help would be appreciated :)

    Read the article

  • jquery onblur text

    - by Isis
    Hello <div id="servisesmenu"> <span class="services" title="???????">???????</span> </div> <div id="services_menu" class="hiddenmenu"> <div class="framemenu"> <div class="itemmenu"><a href="/flights_booking/" class="u" title="??????? ??????????? ??????">??????? ??????????? ??????</a></div> <div class="itemmenu"><a href="/hotels/" class="u" title="???????????? ???????? ??????">???????????? ???????? ??????</a></div> <div class="itemmenu"><a href="/sea_cruises_search/" class="u" title="????? ???????">????? ???????</a></div> <div class="itemmenu"><a href="/flights_panel/" class="u" title="????? ??????????">????? ??????????</a></div> </div> </div> $('.services').click(function() { $('#services_menu').attr('class') == 'hiddenmenu' ? $('#services_menu').attr('class', 'visiblemenu') : $('#services_menu').attr('class', 'hiddenmenu'); }); It's okay. But...How can I make by clicking on any place on the page, this field disappeared (class a hiddenmenu) Sorry for bad english. Thank you!

    Read the article

  • Why is my UIImageView blurred?

    - by Denis M
    I have a really weird problem with UIImageView. I have an image (an RGB png) 45x45 pixels which I add to the view. I can see that image is blurred after added to the view. Here is the same image in the simulator (left) and in Xcode (right): I have custom UIImageView class with this initWithImage code: - (id) initWithImage:(UIImage*) image { self = [super initWithImage:image]; self.frame = CGRectMake(0, 0, 45, 45); self.contentMode = UIViewContentModeScaleAspectFit; self.quantity = 1; if (self) { self.label = [[UITextField alloc]initWithFrame:CGRectMake(0,40,45,25)]; self.label.font = [UIFont systemFontOfSize:16]; self.label.borderStyle = UITextBorderStyleNone; self.label.enabled = TRUE; self.label.userInteractionEnabled = TRUE; self.label.delegate = self; self.label.keyboardType = UIKeyboardTypeNumbersAndPunctuation; self.label.textAlignment = UITextAlignmentCenter; } self.userInteractionEnabled = TRUE; // Prepare 3 buttons: count up, count down, and delete self.deleteButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; self.deleteButton.hidden = NO; self.deleteButton.userInteractionEnabled = YES; self.deleteButton.titleLabel.font = [UIFont systemFontOfSize:20]; self.deleteButton.titleLabel.textColor = [UIColor redColor]; [self.deleteButton setTitle:@"X" forState:UIControlStateNormal]; [self.deleteButton addTarget:self action:@selector(deleteIcon:) forControlEvents:UIControlEventTouchUpInside]; self.upCountButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; self.upCountButton.hidden = NO; self.upCountButton.userInteractionEnabled = YES; [self.upCountButton setTitle:@"+" forState:UIControlStateNormal]; [self.upCountButton addTarget:self action:@selector(addQuantity:) forControlEvents:UIControlEventTouchUpInside]; self.downCountButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; self.downCountButton.hidden = YES; self.downCountButton.userInteractionEnabled = YES; [self.downCountButton setTitle:@"-" forState:UIControlStateNormal]; [self.downCountButton addTarget:self action:@selector(removeQuantity:) forControlEvents:UIControlEventTouchUpInside]; return self; } I create it like this: UIImage *desertIcon = [UIImage imageNamed:@"desert.png"]; IconObj *desertIconView = [[IconObj alloc] initWithImage:desertIcon]; desertIconView.center = CGPointMake(265,VERTICAL_POINT_ICON); desertIconView.type = [IconObj TYPE_DESERT]; [self.view addSubview:desertIconView]; [desertIconView release]; Why would the displayed image be so than the one stored in a file?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >