{"id":271,"date":"2011-11-28T17:16:28","date_gmt":"2011-11-28T17:16:28","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=271"},"modified":"2012-06-27T10:14:10","modified_gmt":"2012-06-27T10:14:10","slug":"pageflip","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=271","title":{"rendered":"PageFlip"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book-1024x524.jpg\" alt=\"\" title=\"book\" width=\"640\" height=\"327\" class=\"aligncenter size-large wp-image-840 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book-1024x524.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book-300x153.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book-680x348.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/book.jpg 1068w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nStart of a page turning system. This one is very much wip in progress, it works but there is room for improvement. This is based on an action script page turn effect and has some limitations so I will be adding a new page flip effect soon which will offer a much nicer turn effect and wont have the side effect of flattening the mesh. To make best use of this script you should a MegaShape page mesh as your base.<br \/>\n<div class=\"message_box info_box\">\n<p class=\"message_box_sign info_box_sign\">Info<\/p>\nBe sure to check the Build a Book section out below for a complete system to build a book, add pages and have it animate with a simple slider. Also look at the Page Mesh section on how to use the MegaShape Page Mesh to create pages with user defined number of vertices to get a nice smooth turn.\n<\/div><br \/>\n<a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megapageflip.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megapageflip.jpg\" alt=\"\" title=\"megapageflip\" width=\"244\" height=\"320\" class=\"alignright size-full wp-image-846 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megapageflip.jpg 244w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/11\/megapageflip-228x300.jpg 228w\" sizes=\"(max-width: 244px) 100vw, 244px\" \/><\/a><\/p>\n<h3>Page Flip Param Description<\/h3>\n<h4><strong>Turn<\/strong><\/h4>\n<p>Amount the page is turned from right to left 0 &#8211; 100.<\/p>\n<h4><strong>Ap1<\/strong><\/h4>\n<p>Amount of curl early on in the turn.<\/p>\n<h4><strong>Ap2<\/strong><\/h4>\n<p>Amount of curl mid way through turn.<\/p>\n<h4><strong>Ap3<\/strong><\/h4>\n<p>Amount of curl at end of the turn.<\/p>\n<h4><strong>Flip X<\/strong><\/h4>\n<p>Use this if page turns from wrong edge.<\/p>\n<h4><strong>Advanced<\/strong><\/h4>\n<p>If you click Advanced a load of extra params open, you can use these to control the whole effect but each param is basically a coefficient in the maths that control the page turn so it is very much a case of trail an error but if you are feeling brave have a play. The new page turn modifier will be much nicer.<\/p>\n<h3>Page Flip Class<\/h3>\n<p>[cc lang=&#8221;c#&#8221;]public class MegaPageFlip : MegaModifier<br \/>\n{<br \/>\n\tpublic bool\t\tanimT;<br \/>\n\tpublic bool\t\tautoMode;<br \/>\n\tpublic bool\t\tlockRho;<br \/>\n\tpublic bool\t\tlockTheta;<br \/>\n\tpublic float\ttimeStep;<br \/>\n\tpublic float\trho;<br \/>\n\tpublic float\ttheta;<br \/>\n\tpublic float\tdeltaT;<br \/>\n\tpublic float\tkT;<br \/>\n\tpublic float\tturn;<br \/>\n\tpublic float\tap1;<br \/>\n\tpublic float\tap2;<br \/>\n\tpublic float\tap3;<br \/>\n\tpublic bool\t\tflipx;[\/cc]<\/p>\n<h3>Build a Book Script<\/h3>\n<p>There is a script include in the extras section that make is easy to build a complete book by allowing you to say how many pages are in the book and a texture for each page, the books can then be controlled with a single value that will open the book and turn each page until it closes the book.<\/p>\n<h3>Video showing the Build Book process<\/h3>\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=IZWCVQ8UKMM&#038;hd=1&#038;fs=1&#038;autoplay=1\" class=\"fancybox-youtube\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/ytbookbuild.jpg\" alt=\"\" title=\"ytbookbuild\" width=\"680\" height=\"372\" class=\"aligncenter size-full wp-image-1427 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/ytbookbuild.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/ytbookbuild-300x164.jpg 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start of a page turning system. This one is very much wip in progress, it works but there is room for improvement. This is based on an action script page [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/271"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=271"}],"version-history":[{"count":14,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/271\/revisions"}],"predecessor-version":[{"id":842,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/271\/revisions\/842"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}