Embed on a web page

Hello @fraguada

I’d like to embed a model on a web page that I use for reporting to my client. (It’s a wordpress blog)
Iris saves as an html - is there a way to embed the file or is that something I need to google for an answer?!

Cheers
David

Hello! I was in the process of cooking up an example for you since I worked on making this easier for the 0.5.0 release. I came upon a pretty major bug that would prevent this from working and am working on a fix. I’ll let you know when it is ready. When it is, you’ll be able to use the following:

<object width="500" height="500" data="index.html"></object>
or
<iframe width="500" height="500" frameborder="0" src="index.html"></iframe>
or
<embed src="index.html" width="500" height="500"></embed>

with index.html being the html page generated by Iris.

Hi again

That sounds great - I’ve been trying iframes and several iframes plugins but nothing was working.

Thanks for creating Iris - perfect for communication with my clients!

cheers

David

fraguada

August 5

Hello! I was in the process of cooking up an example for you since I worked on making this easier for the 0.5.0 release. I came upon a pretty major bug that would prevent this from working and am working on a fix. I'll let you know when it is ready. When it is, you'll be able to use the following:

<object width="500" height="500" data="index.html"></object>

or

<iframe width=“500” height=“500” frameborder=“0” src=“index.html”></iframe>

or

<embed src=“index.html” width=“500” height=“500”></embed>

with index.html being the html page generated by Iris.


Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.

Hello David,
I’ve just pushed an update to Iris on food4rhino that hopefully ameliorates the issues with embedding. I’m also attaching an html file that will create an object tag, and embed the iris scene in there. This html should be placed next to the iris generated html. Otherwise, you will need to change the data="" information to point to the index.html of the Iris scene. You could eventually do this with the embed, iframe, or object html tags. I also write this into the attached file, but they are commented out. I had to zip it cause discourse does not allow html files to be attached. The code is the following:

<!DOCTYPE html>
<html>
<body>

<object width="500" height="500" data="index.html"></object>
<!--<iframe width="500" height="500" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="index.html"></iframe>-->
<!--<embed src="index.html" width="500" height="500"></embed>-->

</body>
</html>

Note, I’ve not tried this on a wordpress post. Curious to know how it goes!

object.html.zip (777 Bytes)

@fraguada

Hi Luis
Perfect! Thank you!

All three options worked fine with Wordpress (Object, iframe and embed)
I just needed to add the code in the ‘text view’ rather than the visual editor.
Very happy with that - now I need to start reading up about lighting etc!

Cheers
David

Good to hear! Lighting is been one of the challenges in this project. There are several self imposed limitations in order to try and get a decent looking scene, for example, one directional light casts shadows. If there are no directional lights in the scene, I add one automatically. Even then, depending on the objects, the shadow might look strange for several reasons. What I’ll do in the future is come up with a sort of config file that you can change certain things, such as if you want shadows or not. These settings will be available in the scene through the menu, but sometimes you might want the scene to open with a certain set of parameters.