1
0
This commit is contained in:
syui 2025-04-13 10:17:06 +09:00
parent f0e5d695ba
commit ef595cb5ac
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56

View File

@ -6,24 +6,7 @@
<title>Sketchfab Viewer API example</title> <title>Sketchfab Viewer API example</title>
<script type="text/javascript" src="https://static.sketchfab.com/api/sketchfab-viewer-1.12.1.js"></script> <script type="text/javascript" src="https://static.sketchfab.com/api/sketchfab-viewer-1.12.1.js"></script>
</head> </head>
<body> <body>
<div class="sketchfab-embed-wrapper"> <iframe title="Need some space?" width="100%" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%;" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/d6521362b37b48e3a82bce4911409303/embed?autostart=1&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_hint=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_theme=dark"> </iframe> </div> <div class="sketchfab-embed-wrapper"> <iframe width="100%" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%;" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/d6521362b37b48e3a82bce4911409303/embed?autostart=1&ui_animations=0&ui_infos=0&ui_stop=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_hint=0&ui_ar=0&ui_help=0&ui_settings=0&ui_vr=0&ui_fullscreen=0&ui_annotations=0&ui_theme=dark"> </iframe> </div>
<script type="text/javascript">
var iframe = document.getElementById( 'api-frame' );
var uid = '7w7pAfrCfjovwykkEeRFLGw5SXS';
var client = new Sketchfab( iframe );
client.init( uid, {
success: function onSuccess( api ){
api.start();
api.addEventListener( 'viewerready', function() {
console.log( 'Viewer is ready' );
} );
},
error: function onError() {
console.log( 'Viewer error' );
}
} );
</script>
</body> </body>
</html> </html>