Search Results

Search found 5464 results on 219 pages for 'effect'.

Page 24/219 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • XNA 3D coordinates seem off

    - by Peteyslatts
    I'm going through a book, and the example it gave me seems like is should work, but when I try and implement it, it falls short. My Camera class takes three vectors in to generate View and Projection matrices. I'm giving it a position vector of (0,0,5), a target vector of Vector.Zero and a top vector (which way is up) of Vector.Up. My Three vertices are placed at (0,1,0), (-1,-1,0), (1,-1,0). It seems like it should work because the vertices are centered around the origin, and thats where I'm telling the camera to look but when I run the game, the only way to get the camera to see the vertices is to set its position to (0,0,-5) and even then the triangle is skewed. Not sure what's wrong here. Any suggestions would be helpful. Just to make sure I've given you guys everything (I don't think these are important as the problem seems to be related to the coordinates, not the ability of the game to draw them): I'm using a VertexBuffer and a BasicEffect. My render code is as follows: effect.World = Matrix.Identity; effect.View = camera.view; effect.Projection = camera.projection; effect.VertexColorEnabled = true; foreach (EffectPass pass in effect.CurrentTechnique.Passes) { pass.Apply(); GraphicsDevice.DrawUserPrimitives<VertexPositionColor> (PrimitiveType.TriangleStrip, verts, 0, 1); }

    Read the article

  • Given n report thumbnails, how do I create a Flex Effect that zooms into the selected report?

    - by Luis B
    I am worried about performance issues. If I just render all n reports zoomed out, then that will cost me in performance. Even animating a zoomed out report to zoom in, will also cost me in performance because it has to recalculate all the UIComponent's of my report as it transitions from zoomed out to zoomed in-to view. Any solutions/suggestions welcome. Let me know if you need clarification.

    Read the article

  • How to use jquery ui slider to create a pagination effect and load the content in a <DIV>?

    - by jsust
    I want to create a pagination script using jquery UI's slider widget. So far I have got the slider working but I dont know how to send request to the server to fetch new content. So far I have a working slider <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>jQuery UI Slider - Range slider</title> <link type="text/css" href="themes/base/jquery.ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.ui.core.js"></script> <script type="text/javascript" src="jquery.ui.widget.js"></script> <script type="text/javascript" src="jquery.ui.mouse.js"></script> <script type="text/javascript" src="jquery.ui.slider.js"></script> <style type="text/css"> body { padding:5em; } </style> <script type="text/javascript"> $(function() { $("#slider-range").slider({ min: 1, max: 14, values: [1], slide: function(event, ui) { $(".values").html(ui.values[0];); } }); }); </script> </head> <body> <div class="values" style="padding:2em;"></div> <div id="slider-range"></div> <div class="info" style="margin-top:2em; background:#CCC;padding:2em;"> Here is where the content will be displayed. </div> </body> Thanks in Advance

    Read the article

  • XNA- Transforming children

    - by user1806687
    So, I have a Model stored in MyModel, that is made from three meshes. If you loop thrue MyModel.Meshes the first two are children of the third one. And was just wondering, if anyone could tell me where is the problem with my code. This method is called whenever I want to programmaticly change the position of a whole model: public void ChangePosition(Vector3 newPos) { Position = newPos; MyModel.Root.Transform = Matrix.CreateScale(VectorMathHelper.VectorMath(CurrentSize, DefaultSize, '/')) * Matrix.CreateFromAxisAngle(MyModel.Root.Transform.Up, MathHelper.ToRadians(Rotation.Y)) * Matrix.CreateFromAxisAngle(MyModel.Root.Transform.Right, MathHelper.ToRadians(Rotation.X)) * Matrix.CreateFromAxisAngle(MyModel.Root.Transform.Forward, MathHelper.ToRadians(Rotation.Z)) * Matrix.CreateTranslation(Position); Matrix[] transforms = new Matrix[MyModel.Bones.Count]; MyModel.CopyAbsoluteBoneTransformsTo(transforms); int count = transforms.Length - 1; foreach (ModelMesh mesh in MyModel.Meshes) { mesh.ParentBone.Transform = transforms[count]; count--; } } This is the draw method: foreach (ModelMesh mesh in MyModel.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.View = camera.view; effect.Projection = camera.projection; effect.World = mesh.ParentBone.Transform; effect.EnableDefaultLighting(); } mesh.Draw(); } The thing is when I call ChangePosition() the first time everything works perfectlly, but as soon as I call it again and again. The first two meshes(children meshes) start to move away from the parent mesh. Another thing I wanted to ask, if I change the scale/rotation/position of a children mesh, and then do CopyAbsoluteBoneTransforms() will children meshes be positioned properlly(at the proper distance) or would achieving that require more math/methods? Thanks in advance

    Read the article

  • Is there anything on a local network or desktop environment that could effect JScript execution?

    - by uku
    I know this sounds odd. The JS on my project functions perfectly, except when the web site is accessed using computers at one specific company. To make things even more difficult, the JS fails only about 50% of the time when run from that company. The JS failure occurs with FireFox, Chrome, and IE. I have tested this myself using FF and Chrome on a thumb drive. The browsers on my thumb always display my project site perfectly, except when run from a computer on said company's network where they fail at the same rate as the installed browsers. My JS is using jQuery and making some Ajax calls. The Ajax calls are where the failure is occurring. To diagnose the problem I created a logging function for my Ajax calls and recorded success and failure. Over a one month period, there were only a handful of failures (about 1%) from all access points other than this company. Oddly enough, the Ajax calls in the logging function are not failing. There is nothing exotic there - Just Win XP SP3. I have never noticed any other unusual behavior from their network. The company is a division of a mega ISP and is on their corporate network. Any other suggestions for troubleshooting would be welcome.

    Read the article

  • What is the effect on record size of reordering columns in PostgreSQL?

    - by Summer
    Since Postgres can only add columns at the end of tables, I end up re-ordering by adding new columns at the end of the table, setting them equal to existing columns, and then dropping the original columns. So, what does PostgreSQL do with the memory that's freed by dropped columns? Does it automatically re-use the memory, so a single record consumes the same amount of space as it did before? But that would require a re-write of the whole table, so to avoid that, does it just keep a bunch of blank space around in each record? Thanks! ~S

    Read the article

  • What is the effect of final variable declaration in methods?

    - by Finbarr
    Classic example of a simple server: class ThreadPerTaskSocketServer { public static void main(String[] args) throws IOException { ServerSocket socket = new ServerSocket(80); while (true) { final Socket connection = socket.accept(); Runnable task = new Runnable() { public void run() { handleRequest(connection); } }; new Thread(task).start(); } } } Why should the Socket be declared as final? Is it because the new Thread that handles the request could refer back to the socket variable in the method and cause some sort of ConcurrentModificationException?

    Read the article

  • How can I achive this effect jQuery? or can it be done with CSS?

    - by Charles Marsh
    Hello All, Is it possible to switch HTML on click? I have an index page with a large image on the front. Under the image there is four links. When the cursor rolls over the link I would like a small tool tip to appear. Then when the clicks the link I want the large Image to change and some extra HTML to appear over it. (just a small content box) The tooltip I think I have sorted using Jquery but I'm not sure how I can change the image [b]AND[/b] add a small content box over the image. Thanks in advanced everyone.

    Read the article

  • Movement on the X an Z axis are combined?

    - by Magicaxis
    This is probably a stupid question, but I'm trying to simply move a 3D object up, down, left, and right (Not forward or backward). The Y axis works fine, but when I increment the object's X position, the object moves BOTH right and backwards! when I decrement X, left and forwards! setPosition(getPosition().X + 2/*times deltatime*/, getPosition().Y, getPosition().Z); I was astonished that XNA doesnt have its own setPosition function, so I made a parent class for all objects with a setPosition and Draw function. Setposition simply edits a variable "mPosition" and passes it to the common draw function: // Copy any parent transforms. Matrix[] transforms = new Matrix[block.Bones.Count]; block.CopyAbsoluteBoneTransformsTo(transforms); // Draw the model. A model can have multiple meshes, so loop. foreach (ModelMesh mesh in block.Meshes) { // This is where the mesh orientation is set, as well // as our camera and projection. foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateRotationY(MathHelper.ToRadians(mOrientation.Y)) * Matrix.CreateTranslation(mPosition); effect.View = game1.getView(); effect.Projection = game1.getProjection(); } // Draw the mesh, using the effects set above. mesh.Draw(); } I tried to work it out by attempting to increment and decrement the Z axis, but nothing happens?! So using the X axis changes the objects x and z axis', but changing the Z does nothing. Great. So how do I seperate the X and Z axis movement?

    Read the article

  • When does code bloat start having a noticeable effect on performance?

    - by Kyle
    I am looking to make a hefty shift towards templates in one of my OpenGL projects, mainly for fun and the learning experience. I plan on watching the size of the executable carefully as I do this, to see just how much of the notorious bloat happens. Currently, the size of my Release build is around 580 KB when I favor speed and 440 KB when I favor size. Yes, it's a tiny project, and in fact even if my executable bloats 10 x its size, it's still going to be 5 MB or so, which hardly seems large by today's standards... or is it? This brings me to my question. Is speed proportional to size, or are there leaps and plateaus at certain thresholds, thresholds which I should be aiming to stay below? (And if so, what are the thresholds specifically?)

    Read the article

  • Why Camera.setParameters(Camera.Parameters) has no effect on Sony-Ericsson X10 and Droid?

    - by mobilekid
    Has anyone come across a strange behaviour with the Camera API when used on Sony-Ericsson X10 or Droid? For example the following code doesn't work on those devices. As a result I'm getting a lot of negative feedback on the Market translating into many cancelled orders... mParameters.set("rotation", orientation); mParameters.set("jpeg-quality", img_quality); mParameters.set("picture-size", "1024x768"); mCamera.setParameters(mParameters); Could you suggest an alternative way of achieving the same? Thanks.

    Read the article

  • jquery bind an event to a class, or something to the same effect?

    - by mna
    hi, I'd like to bind an event to a class, or any alternative to the redundant code I posted below. Any ideas? thanks, mna (function(){ $( "button", "body" ).button(); var submenu=false; $( "#about" ).click(function() { $( "#content" ).fadeOut(1000); $( "#content" ).load('about.html'); $( "#content" ).fadeIn(1000); }); $( "#community" ).click(function() { $( "#content" ).fadeOut(1000); $( "#content" ).load('community.html'); $( "#content" ).fadeIn(1000); }); $( "#store" ).click(function() { $( "#content" ).fadeOut(1000); $( "#content" ).load('store.html'); $( "#content" ).fadeIn(1000); }); $( "#projects" ).click(function() { $( "#content" ).fadeOut(1000); $( "#content" ).load('projects.html'); $( "#content" ).fadeIn(1000); }); });

    Read the article

  • With Google's #! mess, what effect would a redirect on the converted URL have?

    - by Ne0nx3r0
    So Google takes: http://www.mysite.com/mypage/#!pageState and converts it to: http://www.mysite.com/mypage/?_escaped_fragment_=pageState ...So... Would be it fair game to redirect that with a 301 status to something like: http://www.mysite.com/mypage/pagestate/ and then return an HTML snapshot? My thought is if you have an existing html structure, and you just want to add ajax as a progressive enhancement, this would be a fair way to do it, if Google just skipped over _escaped_fragment_ and indexed the redirected URL. Then your ajax links are configured by javascript, and underneath them are the regular links that go to your regular site structure. So then when a user comes in on a static url (ie http://www.mysite.com/mypage/pagestate/ ), the first link he clicks takes him to the ajax interface if he has javascript, then it's all ajax. On a side note does anyone know if Yahoo/MSN onboard with this 'spec' (loosely used)? I can't seem to find anything that says for sure.

    Read the article

  • How do I hook into Tar with BASH?

    - by orb
    Long Story Short I am working with Tar archives that contain PNG images in base64 encoding. I would like to use BASH (or whatever else works) to hook into the extraction function of Tar to decode PNG images from base64 encoding to standard PNG encoding after the files are unpacked. A simple cat $input-file | base64 -d >$output-file will successfully decode the images. Is there a way I can hook into tar -xf so that users do not have to do any (or minimal) extra work to decode the images? In the GNU Tar documentation (http://www.gnu.org/software/tar/manual/html_chapter/Backups.html#SEC97) I found that there are in fact variables reserved to hold the names of functions I desire to be hooked into various moments in Tar program execution. However, the documentation explains that these variables, along with other variables that can be set to configure Tar, are located in a file named backup-specs. Unfortunately, the path to this file is not given. Further, running sudo find / -name backup-specs tells me that this file is not present on my Ubuntu version 13.04 system. Background Information not included in the Long Story Short I have been working on a browser-based (WebGL) particle effect creation application (http://www.particleeffect.org), (https://github.com/cgrabowski/webgl-particle-effect-editor), (https://github.com/cgrabowski/webgl-particle-effect). I have began to write a client-side-only solution for saving and loading effect data as a tar archive. However, since client-side JavaScript has limited capability to process binary data, the images used as textures in the effect are saved with base64 encoding. I have been able to implement saving effect data as a Tar archive (haven't pushed that to Github yet). However, the images present in said Tar archive cannot be manipulated unless they are decoded from base64 encoding.

    Read the article

  • No sound out of headphone port on laptop

    - by Thanatos
    I cannot get sound out of the headphone port on a laptop. Headphones are plugged in, and sound comes out of the internal speakers. Windows behaves normally (sound switches to headphones when headphones are inserted). It did work in Linux at one point, but something changed, we're just not sure what. Rebooting doesn't fix. This appears to occur whether or not PulseAudio is running. Things I've tried: Rebooting. No effect. Booting into Windows. It works properly, so probably not a hardware issue. All of alsamixer. My only controls are this: "Master" Volume bar & mutable, unmuted. Controls volume. "PCM" Volume bar only. 100%. "S/PDIF" Mutable only, currently muted, has no effect. "S/PDIF" Default PCM", Mutable only, currently unmuted, has no effect. Killing PulseAudio. No effect. (It also won't stay dead! Something appears to be restarting it, and I can't tell what, but it is annoying as fuck.) alsactl init 0, no effect. sudo rm -f /var/lib/alsa/asound.state, no effect. General system info: Ubuntu 10.04 LTS Toshiba Satellite T135D-S1324 lspci says I have: 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) 01:05.1 Audio device: ATI Technologies Inc RS780 Azalia controller Some edits: Yes, the headphones are in all the way. This works in Windows: You plug headphones in, the internal speakers stop making noise, and noise comes out the head phones. Windows says I only have two sound cards: the HDMI port (which I don't care about) and the "sound card", which it claims is a "Conexant Pebble High Definition SmartAudio" In Windows, both the internal speakers and the headphone jack show up as one soundcard, which in my experience, is typical. (This is a laptop)

    Read the article

  • No sound out of headphone port

    - by Thanatos
    I cannot get sound out of the headphone port. Headphones are plugged in, and sound comes out of the internal speakers. Windows behaves normally (sound switches to headphones when headphones are inserted). It did work in Linux at one point, but something changed, we're just not sure what. Rebooting doesn't fix. This appears to occur whether or not PulseAudio is running. Things I've tried: Rebooting. No effect. Booting into Windows. It works properly, so probably not a hardware issue. All of alsamixer. My only controls are this: "Master" Volume bar & mutable, unmuted. Controls volume. "PCM" Volume bar only. 100%. "S/PDIF" Mutable only, currently muted, has no effect. "S/PDIF" Default PCM", Mutable only, currently unmuted, has no effect. Killing PulseAudio. No effect. (It also won't stay dead! Something appears to be restarting it, and I can't tell what, but it is annoying as fuck.) alsactl init 0, no effect. sudo rm -f /var/lib/alsa/asound.state, no effect. General system info: Ubuntu 10.04 LTS Toshiba Satellite T135D-S1324 lspci says I have: 00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) 01:05.1 Audio device: ATI Technologies Inc RS780 Azalia controller

    Read the article

  • THE FASTEST Smarty Cache Handler

    - by rob.effect
    Does anyone know if there is an overview of the performance of different cache handlers for smarty? I compared smarty file cache with a memcache handler, but it seemed memcache has a negative impact on performance. I figured there would be a faster way to cache than through the filesystem... am I wrong?

    Read the article

  • Fade portfolio image on hover to reveal a magnifying glass or plus sign etc?

    - by ade123
    Hi, I've seen an interesting image hover effect being used a lot lately and was wondering whether anyone has any tips or advice on how best to create this effect? What I'd like to create is a hover effect, so that when you hover over an image, the image fades and a magnifying glass or similar icon fades in. Highlighting the fact that if you click the image, it will enlarge etc. Here is a nice example of the effect: http://themes.mysitemyway.com/infocus/gallery/portfolio/ Any advice or pointers would be greatly appreciated.

    Read the article

  • How to draw textures on a model

    - by marc wellman
    The following code is a complete XNA 3.1 program almost unaltered to that code skeleton Visual Studio is creating when creating a new project. The only things I have changed are imported a .x model to the content folder of the VS solution. (the model is a simple square with a texture spanning over it - made in Google Sketchup and exported with several .x exporters) in the Load() method I am loading the .x model into the game. The Draw() method uses a BasicEffect to render the model. Except these three things I haven't added any code. Why does the model does not show the texture ? What can I do to make the texture visible ? This is the texture file (a standard SketchUp texture from the palette): And this is what my program looks like - as you can see: No texture! Find below the complete source code of the program AND the complete .x file: namespace WindowsGame1 { /// <summary> /// This is the main type for your game /// </summary> public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } /// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here base.Initialize(); } Model newModel; /// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: usse this.Content to load your game content here newModel = Content.Load<Model>(@"aau3d"); foreach (ModelMesh mesh in newModel.Meshes) { foreach (ModelMeshPart meshPart in mesh.MeshParts) { meshPart.Effect = new BasicEffect(this.GraphicsDevice, null); } } } /// <summary> /// UnloadContent will be called once per game and is the place to unload /// all content. /// </summary> protected override void UnloadContent() { // TODO: Unload any non ContentManager content here } /// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); // TODO: Add your update logic here base.Update(gameTime); } /// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { if (newModel != null) { GraphicsDevice.Clear(Color.CornflowerBlue); Matrix[] transforms = new Matrix[newModel.Bones.Count]; newModel.CopyAbsoluteBoneTransformsTo(transforms); foreach (ModelMesh mesh in newModel.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.TextureEnabled = true; effect.World = transforms[mesh.ParentBone.Index] * Matrix.CreateRotationY(0) * Matrix.CreateTranslation(new Vector3(0, 0, 0)); effect.View = Matrix.CreateLookAt(new Vector3(200, 1000, 200), Vector3.Zero, Vector3.Up); effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f), 0.75f, 1.0f, 10000.0f); } mesh.Draw(); } } base.Draw(gameTime); } } } This is the model I am using (.x): xof 0303txt 0032 // SketchUp 6 -> DirectX (c)2008 edecadoudal, supports: faces, normals and textures Material Default_Material{ 1.0;1.0;1.0;1.0;; 3.2; 0.000000;0.000000;0.000000;; 0.000000;0.000000;0.000000;; } Material _Groundcover_RiverRock_4inch_{ 0.568627450980392;0.494117647058824;0.427450980392157;1.0;; 3.2; 0.000000;0.000000;0.000000;; 0.000000;0.000000;0.000000;; TextureFilename { "aau3d.xGroundcover_RiverRock_4inch.jpg"; } } Mesh mesh_0{ 4; -81.6535;0.0000;74.8031;, -0.0000;0.0000;0.0000;, -81.6535;0.0000;0.0000;, -0.0000;0.0000;74.8031;; 2; 3;0,1,2, 3;1,0,3;; MeshMaterialList { 2; 2; 1, 1; { Default_Material } { _Groundcover_RiverRock_4inch_ } } MeshTextureCoords { 4; -2.1168,-3.4022; 1.0000,-0.0000; 1.0000,-3.4022; -2.1168,-0.0000;; } MeshNormals { 4; 0.0000;1.0000;-0.0000; 0.0000;1.0000;-0.0000; 0.0000;1.0000;-0.0000; 0.0000;1.0000;-0.0000;; 2; 3;0,1,2; 3;1,0,3;; } }

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >