background preloader

Cloth Simulation

Cloth Simulation
A little more detail: What makes this simulation special is the speed at which everything is computed. Javascript (the language this is written in) is not exactly the most efficient language for this type of computation. This being said, much time was spent squeezing out every little detail that slows things down. The most computationally expensive part is trying to satisfy the constraints. "Boring!" No. Maybe a little more detail: Another pretty neat thing about this simulation is how all the constraints are satisfied. As it turns out there is a really simple solution to this problem. Knowledge is power: If you're interested here are some links: Advanced Character Physics This article (or paper...) is my inspiration for doing this simulation.

Styling Checkboxes and Radio Buttons With CSS and JavaScript This JavaScript and CSS will allow you to use custom images to style checkboxes, radio buttons and drop down menu select lists. Have you ever wanted to use your own images for checkboxes, radio buttons or select lists? This script will let you do that. Easily. The example This script is stand-alone and does not require jQuery or other library to work. View a more comprehensive example How does it work? In a nutshell, the JavaScript looks for every form element with class="styled" on it; hides the real form element; sticks a span tag with a CSS class on it next to the element; and, finally, mouse events are added to the span that handles the visual stages form inputs go through when they are clicked. Download the full script Download the CSS file To get the checkboxes, radio buttons and select boxes to work properly, you'll need to change three variables in the script: checkboxHeight, radioHeight and selectWidth on lines 21-23. The CSS The HTML Checkbox Radio button Select list Usage

Étude - Twitter est bon pour la santé Selon Paul J. Zak, un spécialiste en « neuroéconomie », fréquenter les réseaux sociaux déclenche la production d'une hormone très particulière pour notre organisme : l'ocytocine. Une substance fort intéressante pour l'être humain puisqu'elle augmente la confiance en l'homme. Lorsqu'elle est injectée dans le cerveau d'un mammifère, elle entraîne même des changements significatifs dans son comportement : diminution de l'agressivité, augmentation de la sociabilité, plus grande résistance à la douleur et baisse de la tension artérielle, notamment. Pour mener à bien son étude, rapporte le blog Begeek.fr, Paul J.

JavaScript Object-Oriented Programming Part 1 This article was written in 2001 and still remains one of our most popular posts. If you’re keen to learn more about JavaScript, you may find this recent article on TypeScript of great interest. It may be shocking news, but JavaScript is a very powerful object-based (or prototype-based, whatever you wish to call it) language. Yes, JavaScript is a powerful language, not just something that’s handy for image rollovers and other corny, flashy effects. However, very few people who have used JavaScript realize its capabilities. If you’re one of these people, this tutorial is aimed at you. First of all, JavaScript is not a full-blown OOP (Object-Oriented Programming) language, such as Java or PHP, but it is an object-based language. I hope that this article will turn an intermediate JavaScripter who’s itching to learn objects, into an expert, keen on the exciting object-oriented JavaScript world! In this tutorial, you’ll learn: JavaScript’s Primitive Data Types var BooleanValue = true; Typeof

Héberger ses images Twitter sur son Wordpress grâce à Twittelator et TweetPress | News de Geek, iPhone, iPod & co Avez-vous déjà publié une photo depuis votre client Twitter sur votre iPhone ? Vous avez sûrement du remarquer que les photos atterrissent sur une des nombreuses plates-formes d’hébergement d’images telles que MobyPicture, TinyPic ou encore TwitPic. Avec une telle solution, concrètement, vous perdez vos images. Elles finissent sur cette plate-forme, et c’est cette même plate-forme qui récupère tout le trafic, généré à partir de vos photos. Une solution existe. Elle vient juste de sortir. TweetPress s’installe comme un banal plugin, dans WordPress. Rien à faire de plus côté WordPress. Le reste se déroule du côté de de Twittelator Pro. Il vous suffit de renseigner l’url de votre galerie (ie: l’url du blog + la page nouvellement créée), votre login et mot de passe WordPress. Voilà, le tour est joué J’ai choisi, pour ce blog, l’url original non ?

JavaScript Object-Oriented Programming Part 2 In Part 1 of this series, we covered objects, object methods, and object categories. Now, let’s move on. Arguments In every function, a private variable — argument — is automatically created, holding an array of the arguments passed to the function. For example: function testArg(){ for(i=0;i<arguments.length;i++){ alert("Argument "+i+" is "+arguments[i]); } } As demonstrated in the example above, we can access the set of arguments passed when calling a function with the arguments variable that exists in the function’s scope. Therefore, we can use: testArg("PageResource","SitePoint","JavaScriptCity", "WebSite Abstraction"); …to get an alert of some of my favorite Web development sites. Complex Example Now that we have a foundation in object-based programming in JavaScript, let’s build an intricate object-based example, a library. function Person(lastName, firstName){ this.lastName = lastName; this.firstName = firstName; } And now, let’s create some instances of our Person object:

Tous en grève le 07 septembre ! 13h : A Marseille, alors que les premiers manifestants, partis à 11h, sont à 200 mètres de l’arrivée place Castellane, les derniers n’ont toujours pas quitté le départ du cortège sur le Vieux-Port ! A ce rythme, la dispersion n’est pas prévue avant 15h minimum. La police a compté 27.000 personnes, chiffre en hausse par rapport à la mobilisation du 24 juin (120.000 personnes selon les syndicats, 14.500 selon la police). A Avignon, c’est 5000 selon la police, 25 000 selon les manifestants. A Paris, la CGT annonce que 270.000 personnes ont manifesté, contre 80.000 pour la préfecture de police de Paris. En France selon le ministère de l’intérieur : 450 000 manifestants à la mi-journée Les premiers taux de grévistes communiqués par les directions et les syndicats des principaux services publics sont plus élevés que lors de la précédente journée d’action. État des lieux des taux de grévistes : Transports : la direction de la SNCF a recensé 42,9% de grévistes et la CGT 51,8%. Mardi 29 juin 2010

Advanced Web Applications With Object-Oriented JavaScript Recently I interviewed a software developer with five years experience in developing Web applications. She’d been doing JavaScript for four and a half years, she rated her JavaScript skill as very good, and—as I found out soon after—she actually knew very little about JavaScript. I didn’t really blame her for that, though. JavaScript is funny that way. It’s the language a lot of people (including myself, until recently!) In a way, that assumption is not entirely groundless. Indeed, until recently, I’d always been able to get by with whatever little JavaScript I knew, armed only with the MSDN® DHTML reference and my C++/C# experience. Object-oriented programming (OOP) is one popular approach that’s used in many JavaScript libraries to make a codebase more manageable and maintainable. JavaScript Objects Are Dictionaries In C++ or C#, when we’re talking about objects, we’re referring to instances of classes or structs. does exactly the same thing as this: OK, so what’s happening here?

Un chien défenestré sauvé par un passant Retrouvé à l’agonie, un chien est recueilli par des badauds avant d’être adopté par une jeune femme gendarme, sensible au sort de l’animal. Son ancien maître devra s’expliquer des soupçons de maltraitance qui pèsent sur lui devant le TGI de Pau (64) en septembre 2010. Au procès, la Fondation 30 Millions d’Amis sera partie civile. C’est à une bien triste scène à laquelle assistent des habitants de Mauléon (64), dans le Pays basque (21/04/10). Un croisé labrador et patou à bout de forces, affamé, se traîne sur une centaine de mètres. A gauche, Victor aujourd'hui. Un grand élan de mobilisation Tandis que les gendarmes se saisissent de l’enquête, une chaîne de solidarité s’organise pour que l’animal ne soit pas de nouveau abandonné. C’est à présent un chien transformé qui gambade dans la campagne basque : « Il pèse aujourd’hui 32 kg, précise Marianne. Un procès en septembre Photo : © DR

Related: