KeyShot VR on a website
php pngTo make Keyshot VR work in a website add the below:
B=”; – Line 240 in my case once the code is “beautified”
IF Not search for:
1 |
0 <= ga && (B = fa.substr(0, ga + 1)); |
replace with:
1 |
0 <= ga && (B = fa.substr(0, ga + 1)); B=''; |
Additionally to this once has to change the URLs “keyshot.html javascript” snippet:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<script type="text/javascript" src="http://www.example.com/keyshot/BREWER_VR.661/files/KeyShotVR.js"></script> <script type="text/javascript"> var keyshotVR; function initKeyShotVR() { var nameOfDiv = "KeyShotVR"; var folderName = "http://www.example.com/keyshot/BREWER_VR.661"; var imageWidth = 800; var imageHeight = 800; var backgroundColor = "#FFFFFF"; var uCount = 18; var vCount = 5; var uWrap = true; var vWrap = false; var uMouseSensitivity = -0.050000; var vMouseSensitivity = 0.062500; var uStartIndex = 9; var vStartIndex = 0; var minZoom = 1.000000; var maxZoom = 6.000000; var rotationDamping = 0.960000; var windowResizable = false; var addResizableGUIButton = false; var addPlayGUIButton = false; var imageExtension = "png"; var showLoading = true; var loadingIcon = "ks_logo.png"; // Set to empty string for default icon. var allowFullscreen = true; // Double-click in desktop browsers for fullscreen. keyshotVR = new keyshotVR(nameOfDiv,folderName,imageWidth,imageHeight,backgroundColor,uCount,vCount,uWrap,vWrap,uMouseSensitivity,vMouseSensitivity,uStartIndex,vStartIndex,minZoom,maxZoom,rotationDamping,windowResizable,addResizableGUIButton,addPlayGUIButton,imageExtension,showLoading,loadingIcon,allowFullscreen); } window.onload = initKeyShotVR; </script> <div class="uk-width-medium-2-4" id="KeyShotVR"> <!-- <iframe src="keyshot/BREWER_VR.661.html" width="100%" height="800px" scrolling="no"></iframe> --> </div> |
IT IS VERY IMPORTANT TO REMEMBER THE ID of the DIV javac 다운로드! IN THE BELOW IT IS KEYSHOTVR!
1 |
<div class="uk-width-medium-2-4" id="KeyShotVR"> |
The CSS of the Keyshot element also needs to be edited.
Lines 706-707-708
1 2 3 |
b = "max-width: " + S + "px;"; b += "max-height: " + T + "px;"; b += "min-width: 100%;"; |
CHANGE TO
1 2 3 4 |
b = "max-width: " + S + "px;"; b += "max-height: " + T + "px;"; b = "min-width: " + S/4 + "px;"; b += "min-height: " + T/4 + "px;"; |
And Line 717 to 723
1 2 3 4 5 6 7 |
r = document.createElement("div"); r.setAttribute("id", "turntable"); b = "top: 0px;"; b += "left: 0px;"; b += "overflow: hidden;"; b += "position:absolute;"; b += z + "user-select: none;"; |
CHANGE TO
1 2 3 4 5 6 |
r = document.createElement("div"); r.setAttribute("id", "turntable"); b = "top: 0px;"; b += "left: 0px;"; b += "overflow: hidden;"; b += z + "user-select: none;"; |
quiet fill
Trackback from your site.