inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 8, 2016 18:11:19 GMT -8
In an attempt to figure out why the other snow plugin is slow on mobile Chrome I'm playing around with making another snow plug in using a bit of code I found out there. I'm having problems getting it to go down the entire page, but it has a controllable z index. I don't know how to add option boxes in a user interface, so you will just have to modify the build javascript. Preview (During December)Attachments:Background Snow.pbp (1.22 KB)
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Dec 8, 2016 19:11:15 GMT -8
What options are you looking to add? Also, I believe you've got the Scavenger Hunt plugin - which is editable. You can look in that to see how options are set up to work in the JS. The nice thing about editable plugins, is that they can also be used as learning tools (I use them like that myself).
|
|
inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 8, 2016 19:36:38 GMT -8
Funny you say that, as that was exactly what I was just doing. The maximum particle count, speed and z axis options were a few I was thinking people may want. Really, it's kinda perfect the way it is, but I like to give people options.
The most odd thing about the current set up is the height of the canvas. It should be the same size as the inner window element, and my research on javascript canvas' reinforce the idea that innerWindow is the proper thing to use for making the canvas full window size. It just doesn't seem to want to do it. Even more odd is that it does go full height on my phone's mobile Chrome...
Where my mobile Chrome browser has terrible lag with the other snow plug in, this one seems to work just fine. I'm actually quite pleased with myself for finding that code and actually getting it to work on the forums.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Dec 8, 2016 22:05:31 GMT -8
|
|
inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 9, 2016 5:39:29 GMT -8
Thanks, I think I can link varables now! The default didn't stick for the z index so it was blocking some links. Maybe that shouldn't be an option? If you can figure out how to fix the snow from stopping part way down, I'll publish this plugin to the library and credit you. MSG = Makes Stuff Good
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Dec 9, 2016 10:26:40 GMT -8
mikemcd, Weird - I didn't have issues with it on my test forum, but, yeah, maybe the Z-Index option should be taken out. You'll need to fix the line at the top: canvas.style.zIndex = (pb.plugin.get('bgSnow').settings.zindex == undefined ? "-1" : pb.plugin.get('bgSnow').settings.zindex);
and put it back as: canvas.style.zIndex = -1;
then just delete the UI entries that pertain to the Z-Index (I think there's 4: a Title Bar, Bold Text, Plain Text and Field). All 4 should be the bottom-most 4 in the Settings tab. With the snow stopping part way down - I'm not getting that issue (my test forum is in my sig if you want to look). On my test forum and on the forum you linked, it went all the way down on my screen. Maybe see if anyone else using this is having it stop part way down - it might just boil down to some browser issue and not the code itself.
|
|
inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 9, 2016 11:25:48 GMT -8
Have you scrolled down? It would make sense the canvas is only the initial window size. I'd like to size the height with window.scrollHeight instead of window.innerHeight , but it's not working .
Ah, figured it out. I used document.body.scrollHeight
I'll publish this tonight . Thanks!
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Dec 9, 2016 12:13:57 GMT -8
Ah, yeah - that would be why ... I never scrolled down.
|
|
inherit
223366
0
Jun 20, 2024 5:38:45 GMT -8
mikemcd
176
July 2015
mikemcd
|
Post by mikemcd on Dec 9, 2016 14:31:39 GMT -8
Ah, yeah - that would be why ... I never scrolled down. I'm going to have to figure our some if statement for the height variable that says "use the scroll height unless it's over 5000px,then use 5000px". I made that number up, but a canvas that is as long as the Recent Posts section is so big that it slows the animation. If you know how to write that, it would save me learning stuff so I can get to play some Witcher 3.I've figured it out.
|
|
inherit
261400
0
Dec 5, 2020 14:25:48 GMT -8
soulflames
3
June 2020
soulflames
|
Post by soulflames on Jul 22, 2020 17:56:00 GMT -8
I just tried out this plugin, and it's not working at all. Does the theme color have anything to do with it?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,846
January 2015
msg
|
Post by Lynx on Jul 22, 2020 18:15:31 GMT -8
I just tried out this plugin, and it's not working at all. Does the theme color have anything to do with it? Forum URL where this plugin is installed? What theme you have shouldn't be an issue - unless your theme is all white.
|
|
inherit
261400
0
Dec 5, 2020 14:25:48 GMT -8
soulflames
3
June 2020
soulflames
|
Post by soulflames on Dec 1, 2020 19:40:09 GMT -8
I just tried out this plugin, and it's not working at all. Does the theme color have anything to do with it? Forum URL where this plugin is installed? What theme you have shouldn't be an issue - unless your theme is all white. I'm still working on creating the forum. I found another plugin to use instead. Thank you for your help though.
|
|