Integrating shapeways 3D view into my own webpage?

Discussion in 'Shapeways Shops' started by TOM_TOM_TOM, Dec 10, 2011.

  1. TOM_TOM_TOM
    TOM_TOM_TOM Well-Known Member
    I want to port the entire shapeways 3D viewer code into my own page. Is this possible or allowed? Which section of the page code would I need?

    I want to use specifically the one which appears to be several screenshots compiled together, and not the actual 3D model because I'm a bit worried that it's possible for someone to save the 3D model file.
     
  2. MichaelMueller
    MichaelMueller Well-Known Member
  3. woody64
    woody64 Well-Known Member
    Last edited: Dec 25, 2011
  4. woody64
    woody64 Well-Known Member
    It seems also to be possible to access the frames inside this precalculated picture and to generate an animated gif.

    aa1.gif

    I was using the Linux convert tool to do this:
    Some commands like that do the job
    (for sure I've used some bash scripts to do that.)
    The filename below is the jpg downloaded from the rotating shapeway's frame.
    It's used as background image and a Javascript exchanges the view window thus generating the rotating effect.

    convert -extract 482x357+0+0 394291.v0.sprite.4x5-482x357-4.jpg a1.jpg
    ....
    convert -delay 10 a*.jpg a.gif

    The only pitty so far is that I don't know where the frames in the precompiles images (which have a size of 4x5 frames) exactly are.

    Maybe somebody from shapeways could point that out - or somebody is willing to dive in.
     
    Last edited: Dec 25, 2011
  5. TOM_TOM_TOM
    TOM_TOM_TOM Well-Known Member
    Thanks for the info.
    I was able to integrate with a fancybox iframe, but it looks like "version" changes numbers depending on how many updates you've done to your model, starting from version=0. one of my model was at version=3, and another was at version=1. iframe width and height is 482x357.

    example here:
    https://www.thomashuang.net/products/nps75/nps75.html

    <a class="3diframe" href=" https://www.shapeways.com/sw/static_html/3dnp.html?total=0180 &levels=5&startlevel=3&model=387585&version= 3" title="3D view of Nomad Panohead +5"><img src="../../images/3d-button.jpg" alt="3D view of Nomad Panohead +5"/></a>

    $(document).ready(function() {
    $(".3diframe").fancybox({
    'padding' : 0,
    'width' : 482,
    'height' : 357,
    'autoDimensions' : true,
    'autoScale' : true,
    'scrolling' : 'auto',
    'enableKeyboardNav' : false,
    'mouseWheelNavigation' : false,
    'margin' : 10,
    'speedIn' : 150,
    'speedOut' : 150,
    'changeSpeed' : 150,
    'type' : 'iframe',
    'overlayColor' :'#000',
    'overlayOpacity' : .8,
    'cyclic' : true,
    'titleShow' : false,
    'showCloseButton' : false,
    'titleFromAlt' : true,
    });
    });


    <script src="../../Scripts/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/fancybox/jquery.fancybox-1.3.4mod1.js"></script >
    <link rel="stylesheet" href="../../Scripts/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
     
  6. woody64
    woody64 Well-Known Member
    Thanks, that could be helpful.

    Would also be an advantage if we could address the main photo and the 3d view directly via shapeways so that a simple onliner can be used to integrate it in any page.

    Woody64