Giter Site home page Giter Site logo

Comments (8)

cx20 avatar cx20 commented on May 20, 2024

It seems that it was merged into engines.json, but the viewer doesn't seem to display properly.
PlayCanvas Viewer doesn't seem to work properly with iframe.

https://bghgary.github.io/glTF-Assets-Viewer/?manifest=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Manifest.json&folder=19&model=0

<iframe src="https://playcanvas.com/viewer/?assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Node_Attribute/Node_Attribute_00.gltf&cameraPosition=0,20,-20">
</iframe>

Mixed Content: The page at 'https://bghgary.github.io/glTF-Assets-Viewer/?manifest=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Manifest.json&folder=19&model=0' was loaded over HTTPS, but requested an insecure frame 'http://playcanvas.com/viewer?assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Node_Attribute/Node_Attribute_00.gltf&cameraPosition=0,20,-20'. This request has been blocked; the content must be served over HTTPS.

from model-viewer.

willeastcott avatar willeastcott commented on May 20, 2024

I'm not sure where the http protocol is being used (instead of https). In the engines.json, I used https.

from model-viewer.

cx20 avatar cx20 commented on May 20, 2024

I tried the iframe in jsfiddle and the Babylon.js and three.js viewers seemed to be able to display in the iframe as well.
I think it's a problem with some settings on the PlayCanvas Viewer side, but I didn't understand the cause.

https://jsfiddle.net/cx20/jszda6fu/9/

<!-- Babylon.js -->
<!--
<iframe src="https://sandbox.babylonjs.com/index.html?assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Node_Attribute/Node_Attribute_00.gltf&cameraPosition=0,20,-20&kiosk=true"></iframe>
-->
<!-- PlayCanvas.js -->
<iframe src="https://playcanvas.com/viewer/?assetUrl=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Node_Attribute/Node_Attribute_00.gltf&cameraPosition=0,20,-20"></iframe>
<!-- three.js -->
<!--
<iframe src="https://gltf-viewer.donmccurdy.com/#model=https://raw.githubusercontent.com/KhronosGroup/glTF-Asset-Generator/master/Output/Positive/Node_Attribute/Node_Attribute_00.gltf&cameraPosition=0,20,-20&kiosk=true&preset=assetgenerator"></iframe>
-->

from model-viewer.

willeastcott avatar willeastcott commented on May 20, 2024

Yeah, this is probably something configured on playcanvas.com to prevent other sites iframing pages. @yak32 @slimbuck @vkalpias Would it be possible to relax this just for the viewer?

from model-viewer.

slimbuck avatar slimbuck commented on May 20, 2024

Removing the params from the fiddle URL gives this slightly more useful error:
Refused to display 'https://playcanvas.com/viewer' in a frame because it set 'X-Frame-Options' to 'deny'.

from model-viewer.

yak32 avatar yak32 commented on May 20, 2024

yes, we set X-Frame-Options to deny explicitly, to avoid click-jacking attacks, but we can whitelist certain websites.

from model-viewer.

yak32 avatar yak32 commented on May 20, 2024

we are going to whitelist the site soon.

from model-viewer.

cx20 avatar cx20 commented on May 20, 2024

Thank you for your cooperation. I have confirmed that the viewer is displayed.
image

from model-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.