25th Jan 2021, 9:41 AM
Nasir Mehmood👑🇵🇰
Nasir Mehmood👑🇵🇰 - avatar
4 ответов
+ 3
I don't know what you are doing, but seems that links to s3dm.css and s3dm.js are invalid. Also, I think you may need to declare <modelViewer> in global area, and wrap the <modelViewer> assignment line inside a window.load event.handler. Otherwise, <modelViewer> will not be referenced correctly, and won't be recoginzed by stop(), run() or wave() function. var modelViewer; window.onload = () => { modelViewer = document.getElementById('model'); } // rest of codes ...
25th Jan 2021, 11:39 AM
Ipang
+ 3
I write this code in vs code Browser run and result is very fine.
25th Jan 2021, 11:42 AM
Nasir Mehmood👑🇵🇰
Nasir Mehmood👑🇵🇰 - avatar
+ 3
Yes, but things are different when a code is saved and run in SoloLearn. I think s3dm.css and s3dm.js is available in your machine (locally), but they are not available in SoloLearn.
25th Jan 2021, 11:44 AM
Ipang
+ 1
I think that attributes: src="RobotExpressive.glb" skybox-image="stadium_01_4k.hdr" must also be corrected with absolute paths ;) however, I guess that 's3dm.js' is the js tab content (and shoud be wrapped in an onload event), and 's3dm.css' is the css tab...
25th Jan 2021, 11:52 AM
visph
visph - avatar