sketchucation logo sketchucation
    • Login
    1. Home
    2. Fox
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    Fox

    @Fox

    10
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Fox Unfollow Follow
    registered-users

    Latest posts made by Fox

    • RE: Web Exporter advanced controls

      Alright... as I said it's dirty code made at 1:00 AM with the one and only (failed) intent to make it work... so I could show the model with my iPod Touch...
      http://ales.foxleader.net/-REPO-/3D1/AlesFoxJet5XLS_index.html

      Note that "Gauche" is the french for "Left" while "Droite" means "Right" πŸ˜‰ Also, all the code is in that page between the head tags, and my modified code is at the end of the head.

      I added this in the body:

      <a href="javascript&#058;cs(10)">Gauche</a> <a href="javascript&#058;cs(20)">Droite
      
      </a>
      
      

      and this before the end of the <script> tags in the head, modified from the handleRotate(e) function:

      function cs(e)
      {
        // STEP is how many pixels equals an image swap
        var STEP = 10; 
        var width = sketchUpObj.offsetWidth;
        var delta = e
      
        addToPos = Math.floor(delta/STEP);
      
        //handle wrap around
        var wrap = (currentPos + addToPos) % imageCount;
        var newPos = (wrap < 0) ? imageCount + wrap ; Math.abs(wrap);
      
        //hide everyone except the image we are over
        for (var i = 0; i < imageCount; i++) {
          hide(sketchUpImageArray[i]);
        }
      
        show(sketchUpImageArray[newPos]);
      
       // return false;
      }
      
      

      I repeat, that's dirty code. Really dirty. Lol. I also know that it's JS, so not really Ruby but I guessed it was still the best section to post this.

      Thanks for your help!

      posted in Developers' Forum
      F
      Fox
    • RE: Web Exporter advanced controls

      Well, I can post my code but that's really dirty bad code lol... anyway I'll post it later so you understand what I was talking about πŸ˜‰

      Thanks!

      PS thomthom: Sorry, I edited the topic's title πŸ˜‰

      posted in Developers' Forum
      F
      Fox
    • Web Exporter advanced controls

      Hi guys, girls,

      I've come across the wonderful Web exporter and is pretty happy with it, especially considering it's a beta. There is, however, one thing I'd like you help on: using buttons to orbit around the model. Why? Because on touchscreens, the current option doesn't work... And I need to use it on an iPod touch.

      I tried modifying myself the Javascript code, and it somehow worked: it did change the current image, but right after changing it it would show a blank page with only the "false" word. So I commented out the "return false;" line. It solved that problem, but with this I can only change the image one time, that's all.

      Is there anybody able to help me make Sketchup Web Exporter touchscreen/iPhone compatible? With simple buttons as "Left, Right, Reset view".

      Thanks!
      Regards,
      Fox

      posted in Developers' Forum
      F
      Fox