Live data from Hacker News

Particle effects in JavaScript

liveweave.com

71–73 of 73 posts

Re: Particle effects in JavaScript

#71
post #59

Earlier quoted context omitted.

Browser info?

Stable chrome branch. Version 30.0.1599.101 In chrome canary I also get: Invalid CSS property value: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0.33)), color-stop(100%,rgba(0,0,0,0.75))) and the same error as found in in standard chrome.

Seems like the js is going off before the DOM has finished loading. If I add an onload function that should fix it.

Re: Particle effects in JavaScript

#72

Earlier quoted context omitted.

I've got the same problem: Version 30.0.1599.101 Chrome on Mac OS X Mavericks. I believe the problem is your time() method on line 189 of script.js; there's no element with id "time".

Time is a self-referencing function. That shouldn't be breaking it.

Yeah, it's self-referencing, but it's called just before being passed into setInterval. Here's a screenshot: http://i.imgur.com/oh84ZLV.png

Re: Particle effects in JavaScript

#73
post #59

Earlier quoted context omitted.

Stable chrome branch. Version 30.0.1599.101 In chrome canary I also get: Invalid CSS property value: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0.33)), color-stop(100%,rgba(0,0,0,0.75))) and the same error as found in in standard chrome.

Seems like the js is going off before the DOM has finished loading. If I add an onload function that should fix it.

You deal with the DOM before waiting for the document to load?
Post reply on HN