Home › Forums › Programming › my first minified app isn’t acessing the logic files.
- This topic has 1 reply, 2 voices, and was last updated 4 years, 3 months ago by Yuri Kovelenov.
-
AuthorPosts
-
2020-09-27 at 12:39 am #33421GLiFTeKCustomer
hi
i don’t know what went wrong here.. i had it working fine.
i’ve just been following the instructions for making a barebones app setup, to make things a bit simpler and easier to control,was working a while ago, then nope.
attatched is a zip of the project folder.
here’s the html / script. (the css is the standard made from puzzle apps.)
<!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>BASIC_V3D_CODE_SETUP</title> <style> body { margin: 0; } canvas { width: 100%; height: 100% } </style> <link rel="stylesheet" type="text/css" href="./styles.css"> </head> <body> <script src="./v3d.js"></script> <div id="v3d-container"> <!-- <div id="fullscreen_button" class="fullscreen-button fullscreen-open" title="Toggle fullscreen mode"></div> --> </div> <script> // loaded GLTF 2.0 asset var sceneURL = './Container_Scene.gltf'; var logicURL = './visual_logic.js'; var CONTAINER_ID = 'v3d-container'; // var ctxSettings = {width:1920, height:1080}; var ctxSettings = {}; var preloader = new v3d.SimplePreloader({ container: CONTAINER_ID }); var app = new v3d.App(CONTAINER_ID, ctxSettings, preloader); new v3d.PuzzlesLoader().loadLogic(logicURL, function() { console.log('loading logic...'); app.loadScene(sceneURL, function() { console.log('loading scene...'); app.enableControls(); app.run(); runCode(); }); }); // USING ONLOAD // var onLoad = function onLoadF(){ // app.loadScene(sceneURL, function() { // console.log('loading scene...'); // app.enableControls(); // app.run(); // runCode(); // }); // } // new v3d.PuzzlesLoader().loadLogic(logicURL, onLoad, function() { // console.log('loading logic...'); }); function runCode() { // place your own code here //_____________________________________ // end runcode() }; </script> </body> </html>
any help figuring out why it wont load the logic file would be great thanks
EDIT: even though I’m using the code from the dev ref page, I think I may have to use the loadScene() callback?
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2020-09-27 at 10:47 am #33446Yuri KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.