Secure Sockets Layer

Welcome

Hello Guest
Did you know this forum has been running since 2010?
DataBot

DataBot

Our bot discovers modern tech on the web and then posts about it in the forum.

Recent Topics

Stop Burning Stuff

Octopus

Can You Help?

Help keep our site running
Advert free.

Web Utilities

Technology

HTML5

Started by 8pla.net, March 16, 2015, 02:53:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic. Total views: 8,347

8pla.net

I decided to post HTML5 under the category of new technology
instead of the graphics category in the forum.  

http://elizabot.com/HTML5

If you follow this link, you'll see a graphic... But, one you have
to program in HTML5 code, which is cool, and fun to make.
My Very Enormous Monster Just Stopped Using Nine

DaveMorton

I'd say "cute", but it's too early in the morning here for someone so angry at me to be "cute".

Still, good job, 8pla. :) :thumbsup:
Safe, Reliable Insanity, Since 1961!

Data

For the sake of keeping this thread accurate, your page uses some HTML 5 but does not validate because you have some old code on the page still. 

Try validating here:

http://validator.w3.org/

DaveMorton

Odd that I didn't spot that, seeing as I looked at the source to see how it worked. Give me some time to wake up, and I'll see if I can't get her to "talk" to visitors (words only. No sound. She's creepy enough without her actually vocalizing).
Safe, Reliable Insanity, Since 1961!

8pla.net

Quote from: Data on March 16, 2015, 13:44:15 PM
Try validating here:
http://validator.w3.org/

Thank you!  That was useful.

Quote from: DaveMorton on March 16, 2015, 13:49:53 PM
I'll see if I can't get her to "talk" to visitors.

I wonder if HTML5 is optimized to avoid flicker?
My Very Enormous Monster Just Stopped Using Nine

Data

Quote from: 8pla.net on March 16, 2015, 22:27:19 PM
I wonder if HTML5 is optimized to avoid flicker?

I'm not sure exactly what you mean there 8pla.net but my gut feelings says probably not optimized to avoid flicker.

I noticed that the page now validates  :thumbsup:

DaveMorton

Ok, this isn't what I started out to do, and what's there needs some tweaking, but I've got something "slightly" different.

http://dmorton.no-ip.info/tmp/html5/html5_canvas.php
Safe, Reliable Insanity, Since 1961!

DaveMorton

Thought I'd toss this out, too, though it's not really related:

http://dmorton.no-ip.info/tmp/html5/earth_animation.html
Safe, Reliable Insanity, Since 1961!

DaveMorton

Ok, still not what I had intended when I started, but it's kind of fun. :)

http://dmorton.no-ip.info/tmp/html5/html5_canvas2.php
Safe, Reliable Insanity, Since 1961!

8pla.net

Quote from: Data on March 17, 2015, 00:26:00 AM
I'm not sure exactly what you mean there 8pla.net but my gut feelings says probably not optimized to avoid flicker.

Video plays a number of frames per second.  Flicker may occur when a video frame has not been able to finish rendering within that fraction of a second.  Whatever part of the video frame that has not rendered may flash as a partial bright white color.
My Very Enormous Monster Just Stopped Using Nine

8pla.net

Quote from: DaveMorton on March 18, 2015, 16:31:15 PM
Ok, still not what I had intended when I started, but it's kind of fun. :)

Nice ideas, Dave!  I am looking to work some more with HTML5.

You know, I rendered Bézier curves in PHP too, using the Imagick class.
My Very Enormous Monster Just Stopped Using Nine

DaveMorton

I haven't worked with the Imagick class at all yet, since it proved to be very difficult to add to Windows, but I do a lot of image manipulation in PHP with the GD2 libraries. Granted, bezier curves are rather tricky to do without native functions to draw them out, but if you're good with math and geometry, you don't really need a native function to draw them. :) Just a LOT of math calculations. :P
Safe, Reliable Insanity, Since 1961!

8pla.net

Quote from: DaveMorton on March 21, 2015, 05:25:02 AM
I haven't worked with the Imagick class at all yet, since it proved to be very difficult to add to Windows

You hit the nail, right on the head... Surprisingly, it seems easier in HTML5 than in PHP with the Imagick class not readily available on shared hosting.

My Very Enormous Monster Just Stopped Using Nine

DaveMorton

Fascinating. I'd be interested in seeing the code that produces that image, actually.

I know that this is taking this thread off topic, but I thought I'd share a little of what I'm working on in another place:

http://dmorton.no-ip.info/tmp/CSS_builder/cssbuilder.php

The basic premise here is to take an HTML structure (not necessarily one with content, but certainly one with a full and complete DOM structure), and use it to create a "blank" CSS file that includes element, class and id selectors for the input file's code. I think that I can have it extract any style data from the HTML code (either in a <style> tag, or using the STYLE attribute of a given element), though I haven't quite yet pursued that avenue. Actually, I just put in code to do just that, and it works quite well. :)
Safe, Reliable Insanity, Since 1961!

8pla.net

Quote from: DaveMorton on March 21, 2015, 17:21:22 PM
Fascinating. I'd be interested in seeing the code that produces that image, actually.

Original example: http://php.net/manual/en/imagickdraw.bezier.php#93518

Using this example with some math of my own:


<?php
    $width 
=  400;
    
$height 400;
   
    
$image = new Imagick();
    
$image->newImage$width$height, new ImagickPixel'#333344' ) );
   
    
$draw = new ImagickDraw();
    
$draw->setStrokeColor( new ImagickPixel'#666677' ) );
    
$draw->setStrokeWidth(3);
    
$draw->setFillColor( new ImagickPixel'#444455' ) );

    
$points = array
    (
        array( 
'x' => 52'y' => 322 ),   /* Starting point */
        
array( 'x' => 52'y' => 58 ),    /* Control point  */
        
array( 'x' => 337'y' => 315 ),  /* Control point  */
        
array( 'x' => 352'y' => 61 )    /* Ending point   */
    
);
   
    
$draw->bezier($points);
           
    
$image->drawImage$draw );
    
$image->setImageFormat"png" );
   
    
header"Content-Type: image/png" );
    echo 
$image;
?>


There were additional examples,  I'm trying to locate references to.  This is a nice, clean example.  So, I will start by extending this simple sourcecode listing referenced above.
My Very Enormous Monster Just Stopped Using Nine