1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

JavaScript Snowfall

Discussion in 'JavaScript' started by scu8a, Dec 14, 2019.

  1. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #21
    Actually the font version -- at least on windows -- is a REALLY bad idea! Open up task manager and watch SVCHost, it'll chew a three-quarters of a gig of RAM or more (IE sucks it hard) and an entire CPU core just trying to keep up.

    Because it's the "windows font cache service" that's chewing on things. Eventually the whole system will start stuttering if load it in Edge or IE where things go really bad.
     
    deathshadow, Dec 16, 2019 IP
  2. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #22
    I forgot the <tt> tag even existed! lmao. I think the last time I ever saw or used it was.... I can't even recall...

    It crossed my mind that it would be far more efficient to create a custom object in terms of the snowflake, and then simply replicate each flake. After creating the copy of the elem, simply change up its properties to make it distinct from the default snowflake.

    You can do it in a way where you can bypass the issue altogether. There are enough snowflakes falling to the point where if one fades away and disappears, it won't be noticed by the end-user. I would suggest using the proximity of the snowflake in relation to a form element to trigger a function that fades the snowflake's opacity to 0, then sets the display property to none. Time it so that the snowflake fades and disappears before reaching the form element. There's always a way.

    With that said, only an idiot would include such a script in a page with a form. That level of stupid is on par with halfwits who thought the <blink> tag was a good idea. It goes without saying that this type of thing is designed for some kid's personal web page and certainly nothing more. Remember way back when EVERYONE (but myself of course) had to have a 3D spinning logo on their page? It was horrific. Those were dark days. Those were the days when the kid who lived down the street was responsible for developing and maintaining a major corporation's website. Back then, if you had a 28.8 phone modem and an AOL account, plus a geocities page containing a spinning logo, then you were considered a professional web designer.

    In many places, doing something like that would get you fired on the spot.

    I wouldn't say so. While creating a user interface and putting snowflakes on top is like driving your car down the road and throwing your coffee all over the windshield, the animation itself is what matters in this case. Just because there's an interface layer beneath the snowflakes doesn't mean that the animation is unconditionally deemed as trash. Consider the script without the presence of context and evaluate the animation itself for what it is.

    Data types have always been screwy in JavaScript. It's ridiculous. That's Javascript for you, though. This is a scripting language that recognizes the value of null to be an object. Compared to every other language I use, JavaScript is by far the most convoluted and bizaar.

    LOL, in Windows? Nah, something that dysfunctional could never occur with something conjured up by Microsoft. You're obviously mistaken.
     
    scu8a, Dec 16, 2019 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #23
    Actually, that and your "driving down the road" comment had me thinking... Make them murophobic? Afraid of the mouse. Doesn't help on touch interfaces, but would solve things somewhat on desktop. Have it so they 'blow out of the way" of wherever the mouse is.

    Of course a really good answer would be to just give the user a way to toggle it on and off.
     
    deathshadow, Dec 16, 2019 IP
  4. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #24
    That's a clever idea. I had to laugh. Using the term murophobic to describe the idea is very fitting and humorous at the same time. Alternatively, we could always make the form elements suffer from chionophobia instead. The form elements would move around the screen like it was a game of tetris. Something like that would easily win an award for excellence in user interface design. I wonder if there is such thing as a fear of cursors? Given the billions of people on earth, I'll bet there's at least one person who for whatever reason is terrified of cursors and carets. I can't help but laugh thinking about it.
     
    scu8a, Dec 16, 2019 IP
  5. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #25
    I'll be damned... Steve Jobs "has a pathological fear and loathing of buttons"

    https://www.cbsnews.com/news/apples-steve-jobs-hates-buttons/
     
    scu8a, Dec 16, 2019 IP
  6. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #26
    When I said I was going to go all out, I forgot that JavaScript is too limited in its functionality to accomplish what I want to do. Since I said I was going to revise my script, I'll do so, but to go all out would be a great way to freeze up a browser. An infinite loop would be much more simple, and it would accomplish the same thing. I thought about using the canvas object, but given the way it has vulnerabilities, I'm avoiding it until the bugs and exploits have been resolved. So, what I'm going to do is program a snowfall screensaver using C++ and OpenGL, or maybe DirectX which I thought had been discontinued and replaced with Direct3D as the industry standard. I think I'll choose 3D Studio by Autocad to create much of the functionality. I've written maybe 3 lines of MaxScript in my entire life. It's astounding to see what can be done in 3D Studio if you know how to code this MaxScript to create algorithms that perfectly emulate nature.
     
    scu8a, Dec 17, 2019 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #27
    He and I actually share a medical condition... one that sounds like you made it up. "Misophonia" -- literally pronounced "me so phony uh...". It's a hypersensitivity to certain low noises. Imagine if AMSR gave you psychotic rage, and you'd have the general idea. For me it's chewing noises or the crinkling of plastics.

    In Jobbo the Clown's case, it was fan noise. That's why even in the age where systems SHOULD have had proper cooling Apple went out of their way to omit fans, and a likely contributor -- even now that he's left this world -- to why crApple wouldn't know proper cooling if it stripped naked, painted itself Noctua tan, and hopped up on a table to sing "oh look at what a giant fan I am".

    The what now?!? You sure you're not mixing up canvas with something else?

    Direct3d is PART of DirectX, so I'm not sure where you got that idea. DirectX is a collection of API's for multimedia, with D3D just being part alongside DirectInput, DirectAudio, and so-forth. It's just that when working with DirectX -- much like OpenGL -- you can pick and choose your API so you can go EAX, or OpenAL, or whatever.

    If going with what doesn't tie you down to "windows only" as the target (which DX/D3D would) I would suggest you learn Vulkan instead of openGL. OpenGL is aging like fine milk, and has ALWAYS lagged behind Direct3d on a number of capabilities. Vulkan isn't just the new hotness, it's faster as it gets you closer to the hardware without making it harder to code for. I've only played with it a bit in FPC, but was able to get it running atop an existing SDL program giving me a "best of both" option. (Just as I used to use OpenGL for the same thing)

    I really like SimpleDirectLayer for handling video mode setting and input, sometimes leveraging it for basic stereo audio as well. (I put on the big boy pants and use OpenAL when I need "real" audio). Or at least, that's my stack of choice when working in FPC/Delphi. Yes, Pascal. C is not my favorite language).

    I even have an Ada stack in place with Vulkan ready to go... I just need to find the spare time to do something with it. (Probably a giant robot game, that's kind of my thing.)

    I've only ever used 3DS Max back when I was doing mods for the game freelancer. though I played around a good deal with it. Was fun to branch out from my usual 2d work and various model compositing.

    Not done anything like that in 12 to 15 years though. I have this problem: Once I prove to myself I can do something, I lose interest in doing it.
     
    deathshadow, Dec 17, 2019 IP
  8. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #28
    I'm plagued by that, too. It's like you've read my mind. I struggle with that all the time when it comes to technology, and it's what happened to me several years back. It was long before html5 was even introduced, and I was developing web applications for a university at the time. Last night I was studying up on the years of CSS and JS developments that I completely missed, and I'm astounded too see how much things have changed so quickly.

    It's not all bad, though. I learned JavaScript way back when it was utilized strictly for validating form data. It was so limited and quirky, but that wasn't a bad thing. It forced you to dig around and conjure up creative solutions. It wasn't so much programming, as it was more like a hack job. Those limitations made me a much better programmer in terms of creative ways to address problems.

    When programmers demonstrate a passion for exploring and discovery, that's a powerful thing. That's when they get my attention. A person could be the most spectacular developer in the world, but if you find that curiosity diminish, it's awful. It comes and goes, and I've been branching out into AI and cybersecurity which are fascinating subjects to me.

    On some of my computers, I don't install any security software, and I set up honey pots. A blackhat hacker takes the bait and I study what they do and how their malware/virus system works. I modify their malware and make it do things that ruin their day. In college, hacking wars between my friends were non-stop. That's some of the best experience you can get when it comes to leaving other experts in the dust.


    CPU cooling fan noise? That's pretty far out there. I can't understand why you'd want your CPU to run slower because the noise of the fan is bothersome. To each their own, I suppose, but in terms of running a computer company, that's a bit strange.

    In terms of fan noise, I love it. It reminds me of working in a chilly server room. It's kind of relaxing to me in a way.

    That's really interesting about Misophonia. I didn't even know it was a condition. It's quite common, as I have had friends who would cringe at such noises. Do you get the same feeling when you hear styrofoam being handled? That gets to me a little bit, but whenever I touch velvet I get shivers down my spine and it makes me want to jump out of my own skin. Just thinking about it is cringeworthy. I don't know why some people are more predisposed to it than others, and I gather it must be more neurological than it is psychological. When I was in 2nd grade, I would be in class with about 20 other kids. When any other students crossed me for silly things, they came to know what they were in for. I'd walk up to the chalkboard and scrape my nails all the way down and watch everyone squirm. Yes, it drove me crazy as well, but knowing that I could drive the whole class nuts on a whim was powerful.

    In highschool, I failed my first programming class with a 15%, lmao! All throughout school, I had so much trouble doing my work. I had no idea why because I would try so hard! ...Well, fast-forward 15 years and I was diagnosed with ADHD. When the doc told me that, I tilted my head as if to say.... what the f___? Since then, I have come to learn that it's such a broad spectrum disorder that I do in fact have ADHD without a doubt. I tend to daydream and hyperfocus for periods of time, and when someone breaks my focus, especially if I'm programming something, I feel like I want to throw a fit. A study out of Stanford used programmers to conduct an experiment on focus and attention. It's stunning to know that if the programmers were distracted from their task for anywhere over 30 seconds, it would take a half hour for that programmer to get back into that state of focus where they could do their best work. It's very much like that for me. Considering what clients pay for the work I do, interruptions cost money. It can even put people's lives at risk if I can't do my work. Anyway, I've got family visiting for the Holidays. Three teenagers, my older sister, my bro-in-law, and my mother. Oh, and my neighbor's dog are all here. Things are so chaotic and noisy that I can't go without being interrupted every few minutes. Then, it gets to the point where I throw my hands up in the air, begin cursing under my breath, and abscond. Working from home isn't possible with my family here. Even coding for fun is something that becomes a hassle. With that said, you come to realize that every once in a while you absolutely need to take a screen-time vacation. I go to physical therapy twice a week to get my neck and back into shape. That's the price I pay for ignoring my need for periodic rest. Based on your extensive experience on a computer, do you get any neck or back issues? Nearly every experienced programmer I know who's really dedicated or passionate about their work usually responds with a yes. It's all fun and games until someone gets an eye poked out.
     
    Last edited: Dec 18, 2019
    scu8a, Dec 18, 2019 IP
  9. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #29
    You know about the canvas tag, I'm positive. I'm sure it was the canvas tag I was referring to. I remember reading it in an HTML5 game development book.

    Upon initially reading about the canvas object I dismissed it for the time being as I saw it to be impractical, unnecessary, easily exploited, and unless you're making a video game and want access to high-performance graphics processing, completely unneeded. Last I heard, which was a long time ago when canvas was newly implemented w/ HTML5, you could only implement one instance of a canvas on a web page. I know there's a reason for it, but I also know they have the ability to change that.
     
    scu8a, Dec 18, 2019 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #30
    How would you then draw scaleable shapes? The even more convoluted and ugly to work with SVG?

    REALLY not sure what you mean by "easily exploited" as if there's some sort of attack vector... unless you mean client-side meddling -- but that's true for ALL JavaScript, not just CANVAS. It's why HTML games are cute toys so long as you don't care about people cheating since EVERYTHING run in a browser is vulnerable to that. Just load up tampermonkey or a similar browser extension and "have at it".

    As far as I know that was NEVER a "thing'. From day one some decade and some change ago I was able to make multiple canvas, give each of them their own 2d context, and even layer them one atop the other.

    Sounds like that book was full of manure and whoever you were talking to at the time even more full of it.
     
    deathshadow, Dec 19, 2019 IP
  11. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #31
    Flash covered the need to facilitate the use of SVG for years, and now that Flash is extinct we have HTML5 and the canvas to what we want to do without the need for Flash. When I say it's easily exploited, it most certainly is. I have an HTML5 game design book that I believe stated only one canvas object is allowed to exist more than once within a document. Maybe it was that way at one point, or perhaps the author got it wrong. I'll try and track down the book to confirm either way. When I hear about the exploits just waiting to be uncovered as with any new technology, I hear things from reputable sources. I cross reference and verify. Don't go near the canvas until you've thoroughly reviewed what cybersecurity experts have been saying time-and-time again. I'll see if I can find my book.

    I programmed my own web browser back in the early 2000s, along with a search engine. Granted, it wasn't Google, but it made an incredibly useful tool. How would I not know that there is no such thing as client-side security after building something like that? You jumped to conclusions based upon an assumption that I don't understand HTTP protocol and everything that goes on with the client-side. I don't understand the thought process that would lead you to ambiguously assume I'm clueless in that area. That doesn't make sense.

    I don't believe so, it didn't seem dirty or smell bad when I got it from the book store. I didn't see any loitering bovine in the area. I encountered no farm animals in the bookstore that day. I'm guessing that by default you were specifying manure to mean cow manure, correct? It's important to specify the type of manure that something or someone may or may not be filled with, because someone who is full of bull**** isn't necessarily made of chicken****. Can a dumb**** be a smartass? If so, how? If someone were to tell me that I were full of cat****, I wouldn't understand what that means. I wouldn't feel angry, just entirely confused. What kind of **** is that? You gotta know your **** to be the ****, because if **** happens and you haven't got your **** together, you're be **** outta luck. I **** you not. Well, since I'm wasting time going on about bull****, I guess I should go find my HTML5 book. Until then, I don't know ****, but I do give a **** about whether I have the right knowledge, so I'm going to go get this **** straightened out so I can get around to addressing the important ****. Well, that was a productive use of time.
     
    scu8a, Dec 19, 2019 IP
  12. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #32
    Which is utter and complete nonsense so far as <canvas> is concerned, hence my asking just where you got that nonsense from. Lemme guess, it was a Sitepoint book wasn't it? Probably by Yank. He's more full of it than Biff Tannen's '48 Ford Super De Luxe.

    WHAT security experts have thrown up warnings about CANVAS? Seriously, if this is a thing -- which I'm pretty sure it isn't -- I'd like to know. I mean sure, there's fingerprinting and the toDataURL method could be exploited to deliver an executable instead of an image, but that's nothing I can't do with just plain JavaScript via href of base64, or probing other information like window properties.

    Which is why any security experts singling out CANVAS for that instead of JS itself is pretty much flapping their arse-cheeks in the wind, possibly out of their own inability to grasp what CANVAS is and how to use it.
     
    deathshadow, Dec 20, 2019 IP
  13. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #33
    lol, Hey McFly! How about you make like a tree and get out of here. ...Great movie. I haven't looked for the book yet. I've been doing artwork the entire day. It's almost as bad as my programming habit. I get my fix, and then it's off to something else. I'm taking one of my original pieces of work and making some high quality prints. The human eye can distinguish between over 16 billion colors. Don't quote me on that, it's what I remember hearing, and that's about the gist of it. Besides, taking the effort of pulling up Google and typing all those words, then having to look at page-after-page. Everything takes so much effort these days.

    I didn't go to any canvas seminar or anything, but what I do know for sure is that I was so disappointed that I never could make use of it. I don't know what the current glitches are, but it has something to do with the fact that the canvas object relies on... I don't entirely remember, but it may have been OpenGL that that was associated with the problems. For someone like me to be so averse to such a powerful tool, well all I can say with certainty is that there was enough reliable information from trusted sources to write-off the whole canvas idea for at least for the time being. It could also be a false memory planted into my brain by aliens who periodically abduct and molest me. I've been abducted by aliens 3 times this week alone.

    It wasn't the JavaScript, I know that for sure. It had something to do with using the graphics processing systems to do all this weird ****. When I track down that book and I can verify either way, then we'll know. Once we know, we'll become bored and we'll have to find another ridiculous subject to overanalyze. It's never going to stop unless you learn to understand that I'm always correct.
     
    scu8a, Dec 20, 2019 IP
  14. Private Loader

    Private Loader Active Member

    Messages:
    103
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #34
    Thanks, good for the season...
     
    Private Loader, Dec 20, 2019 IP
    scu8a likes this.
  15. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #35
    Thank you Private Loader. I'm glad you're not a grich like someone else I know on these forums... ;)
     
    scu8a, Dec 20, 2019 IP
    Spoiltdiva likes this.
  16. Spoiltdiva

    Spoiltdiva Acclaimed Member

    Messages:
    7,738
    Likes Received:
    2,895
    Best Answers:
    53
    Trophy Points:
    520
    #36
    First off he is not a "grich" he is a "grinch". But he is a very smart grinch and more than worth his weight in coding grouchiness.:rolleyes:
     
    Spoiltdiva, Dec 20, 2019 IP
  17. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #37
    Three decker sauerkraut and toadstool sandwich with arsenic sauce, coming right up.
     
    deathshadow, Dec 20, 2019 IP
  18. scu8a

    scu8a Greenhorn

    Messages:
    81
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    15
    #38
    He's always like this? ...Dear God. :D
     
    scu8a, Dec 20, 2019 IP
  19. Spoiltdiva

    Spoiltdiva Acclaimed Member

    Messages:
    7,738
    Likes Received:
    2,895
    Best Answers:
    53
    Trophy Points:
    520
    #39
    God has nothing to do with it. We believe though that it may have something to do with his odd diet of sauerkraut, along with toadstool sandwiches topped with arsenic sauce that might be to blame.;)
     
    Spoiltdiva, Dec 21, 2019 IP
  20. Saputnik

    Saputnik Active Member

    Messages:
    74
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    80
    #40
    @scu8a chromosphere.com is inaccessible, as well as/snow subdirectorium. Did you break it with this script?...

    [​IMG]

    [​IMG]
     
    Saputnik, Dec 21, 2019 IP
    scu8a likes this.