Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 153
Posts: 153   Pages: 16   [ Previous Page | 2 3 4 5 6 7 8 9 10 11 | Next Page ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3461591 times and has 152 replies Next Thread
omrico
Newbie




Joined: Dec 26, 2017
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Thank you very much for this remarkable feature!

I was wondering: After integrating the component in my website I am able to see the house in "Aerial View" but the view is centered to the viewer.
Is there any way to programmatically change the position of the "camera" so it won't be located above the center of the house? confused

For example when using the SH3D software, I can click on an object and it gets the focus. This helps me to better look at the surroundings of this object.

Thank you in advance!
[Dec 26, 2017, 9:04:10 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Selecting an object of the displayed home should have the same effect as in Sweet Home 3D. From the HomePreviewComponent returned by viewHome, you'll be able to access to the displayed Home instance, which lets you access to all its objects and select the ones you want with its setSelectedItems method.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Dec 27, 2017, 11:52:19 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
LBCED
Newbie



Italy
Joined: Jan 3, 2018
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Hello,
I try to use it. With Firefox works fine, otherwise with Chrome I have the following error:
"Failed to load <nome file> cross origin requests view model.min.is:20
are only supported for protocol schemes: http, data, chrome, chrome-extension, https"


What I can do ?
[Jan 3, 2018, 11:19:58 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

You probably tried on a local file, not on a http web server, and Chrome doesn't accept to load local files which depends on the viewed html file. If you host your files on a web server it will work, and if you absolutely want to try your file locally with Chrome, see the solutions proposed here.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Jan 3, 2018, 2:16:28 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
omrico
Newbie




Joined: Dec 26, 2017
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Selecting an object of the displayed home should have the same effect as in Sweet Home 3D. From the HomePreviewComponent returned by viewHome, you'll be able to access to the displayed Home instance, which lets you access to all its objects and select the ones you want with its setSelectedItems method.

I tried what you said but didn't succeed with changing the camera. I fetched all the selected items via
getSelectableViewableItems()
function and randomly chose an object from the array.
Then used
setSelectedItems(selectedItems)
function but the camera didn't change the angle and position. What am I missing here?
Thank you.
[Jan 4, 2018, 7:06:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Sorry, I forgot to mention that you should call setAerialViewCenteredOnSelectionEnabled(true) on user preferences available in HomePreviewComponent. Hope it will work this time...
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Jan 4, 2018, 7:30:58 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
omrico
Newbie




Joined: Dec 26, 2017
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

It worked, thank you!
[Jan 4, 2018, 8:57:47 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Gildaniel
Advanced Member
Member's Avatar

Russia
Joined: Aug 11, 2017
Post Count: 135
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Hello!

Could you please help me: is it possible to insert some code into html in order iframe with 3d-model opens in new browser tab in full screen mode?

My code:
<body>
<script type="text/javascript" src="/3dplan/newlib/big.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/gl-matrix-min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/jszip.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/core.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/geom.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/batik-svgpathparser.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/jsXmlSaxParser.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/triangulator.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/viewmodel.min.js"></script>
<script type="text/javascript" src="/3dplan/newlib/viewhome.min.js"></script>


<style type="text/css">
/* The class of components handled by the viewer */
.viewerComponent {
}
</style>

<div class="logo"style="text-align: center">
<a href="/"><img src="/bitrix/templates/regard/img/regard.svg"></a>
</div>
<br>
<br>



<H1 style="text-align: center; text-decoration:underline; cursor: pointer"
onclick='viewHomeInOverlay("House 23.sh3d",
{roundsPerMinute: 1,
widthByHeightRatio: 4/3,
navigationPanel: "none",
aerialViewButtonText: "Aerial view",
virtualVisitButtonText: "Virtual visit",
level: "2 floor",
selectableLevels: ["1 floor", "2 floor", "Roof"],
activateCameraSwitchKey: true,
viewerControlsAdditionalHTML: "",
readingHomeText: "Loading",
readingModelText: "House",
noWebGLSupportError: "No WebGL support"
})'
>TAP HERE TO OPEN 3D-MODEL IN NEW TAB</H1>



Thank you!
[May 8, 2018, 3:43:17 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

I just released the version 1.4 of Export to HTML5 plug-in to support the new features of Sweet Home 3D 6.0, even if Sweet Home 3D JS Viewer 6.0 should make this plug-in less useful (actually, it's still useful if you want to reduce the SH3D file to render).

New features in the 3D view are shown in the following scene, mainly:
- polylines and blueprint at ground can be displayed in 3D,
- texts can be written on more than one line with alignment,
- transformations can be applied on 3D models like doors, windows and a new mannequin
- textures can be shifted along their width and height, and X offset on sky texture is used to rotate it around the azimuth.

Of course, all these features are still accessible in JavaScript through the updated API to let you read or change the data you want.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[Oct 12, 2018, 12:23:18 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
ReaperSoon
Newbie



France
Joined: Jun 12, 2017
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: Export to HTML5 plug-in

Hi everyone,

For whose want to use the exported house using this plugin in wordpress I developed a plugin for wordpress that is really easy to use : https://fr.wordpress.org/plugins/embed-sweethome3d

I will update it to add for flexibility in future.

Regarde,
Steve
[Jan 7, 2019, 4:34:07 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 153   Pages: 16   [ Previous Page | 2 3 4 5 6 7 8 9 10 11 | Next Page ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved