Mekaboo Posted May 26, 2018 Share Posted May 26, 2018 Hello folks! Been using BabylonJS for a few days and even though it is a major challenge Im enjoying the process!! My issue is with Action Manager..I want to add an "About" header under Tinico header then link in to another page..how do I do this? Also I used a zip file that only had one box mesh that was linkable and I couldnt link the other one. I want to have freedom to create and link more boxes in the future. Do you have the code that can place in my code for both text and meshes? Also I realized that my index2.html is loading after I placed files in my FTP so I cant see my page on the web even though I can see it very well from my localhost:(. Can someone please help me! (PS. I pasted and copied just in case the file dont open) index2.html Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 26, 2018 Share Posted May 26, 2018 Hiya Mekaboo. To get started... I created a BabylonJS Playground demo... from your code. http://playground.babylonjs.com/#41IFI5#1 I made SOME temporary modifications... nothing too serious. Now you can edit your previous forum message and delete all that code, if you wish. We can now see all the code... by looking at the playground demo. ----------- SO, to clarify, you want to put actionManagers on both of these boxes... with click-triggers and actions... that load different web pages when clicked, right? And you want to easily add MORE boxes, that link-to MORE web pages... later, yes? https://www.babylonjs-playground.com/#11XV5X#4 THAT is another playground where we installed an actionManager on each cylinder (lines 50-54 area)... providing click-to-open various web pages (lines 31-36 area). The forum topic is here... http://www.html5gamedevs.com/topic/35566-solved-click-on-3d-object-to-go-to-web-page Anyway, now we can easily talk and test things... for your project. We'll play/test until we get things working like you want. No problems. Feel free to make many edits to that playground, hit RUN often, hit SAVE sometimes, have fun. You can't hurt anything in the playground.. Every time you SAVE, a new URL (fragment) will be given. Paste that new URL into thread comments here ... to show/tell/ask things to us/others. Perhaps you wish to add actionManagers to your boxes, now. Notice line 34 in the cylinders playground. Each cylinder has ONLY a number... for its .name (see line 41 - index is used as each cyl name - which is a number). Using numbers for the names... gives line 34 easy abilities to 'look-up' the correct URL in the url list (lines 18-27). You might wish to use numbers-only for the names of your boxes, too, and use the same method of "url look-up". ActionManagers do pick/click easily, but can ALSO do things like onPointerEnter and onPointerOut. We can set onPointerEnterTrigger... to create/show a pop-up GUI textBlock... which tells the user WHERE the link is going... if clicked/picked (just like HTML links do). We're here to help with the actionManagers, if you need assistance. BTW, I really like your fonts-from-lines... that is coooool! Ok, be well, let's talk more, and do some fun tests. Mekaboo and GameMonetize 1 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 26, 2018 Share Posted May 26, 2018 Hi again. http://playground.babylonjs.com/#41IFI5#2 Updated... cuzzzz... I was mis-indented. I had a run-away brace in line 183. :) Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 26, 2018 Author Share Posted May 26, 2018 Dear Sir Wingnut, First that is sooo freaking dope making a demo out of my code especially since I started with a demo that was sent to me from Sir DeltaKosh https://www.babylonjs-playground.com/#PKY876 If you look in this demo only one mesh had a trigger and it was hard to copy and paste code to create another link without my localhost view going blank. Tinico is a holding firm so when new businesses join on I can create a new mesh and link with a simple change up. Im definitely going to use the demo you sent and see if it works! After that is done however will it be able to load and view from my webhost..Im using 1and1. As far as font from lines I took away from the demo shown on this forum page..unfortuanly I cant make my other font just like it. (I wanted to add the word "About" underneath in the same font but it wasnt working. Thank you so much for your help in this it means alot ? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 26, 2018 Share Posted May 26, 2018 okay, maybe one more. actionManagers working, currently set to open things in NEW window. http://playground.babylonjs.com/#41IFI5#3 Fun! GUI onPointerEnterTrigger mesh-labels, next? (I'm avoiding mowing lawn, so... hiding behind computer.) :D Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 26, 2018 Share Posted May 26, 2018 Ooops, I forgot to rename Box1 to "1" http://playground.babylonjs.com/#41IFI5#4 :) Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 26, 2018 Author Share Posted May 26, 2018 THIS RIGHT HERE IS WHAT I WANTED AND THANK YOU NOT MOWING THE LAWN TO HELP OUT ? I was trying to copy and paste the cylinder demo and it broke my code and wouldnt load up. Ill take this demo and switch over my background and textures! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 26, 2018 Share Posted May 26, 2018 Yeah, pasting code is ok, but it always requires some little adjustments to make it work. It helps to watch your browser's JS console... for errors. It takes some tweaking/patience to be a pro code-borrower. I made a code-borrower mistake on the #3 playground... so I am no pro. heh Glad to hear you are happy. Good luck... cya later. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 26, 2018 Author Share Posted May 26, 2018 Thank ya so much for all of your help..the recent demo change worked like a charm ? Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 26, 2018 Author Share Posted May 26, 2018 Sorry to be a pest but one more thing: Say if I wanted to link the text header to another page: What code do I use to trigger it? Do I have to create a button or I can leave it as simple text? Gracias? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 27, 2018 Share Posted May 27, 2018 Well that's a darned good question. I needed to do some tests... http://playground.babylonjs.com/#41IFI5#7 I think simpleBUTTON will work best... is has more "observables", I think. Lines 272-274... I'm experimenting. Also in lines 302-304. Clicking on the boxes is still working fine, without security warning (in my FireFox 52 ESR). Clicking on the labels... I am getting "Firefox prevented opening a popup window" warning... with options. Strange. Why one way is okay, and the other... not okay? Hmm. Are you getting same issues in #7 PG, Meka? (thx for report) Anyway, let's keep experimenting, and listen for others' comments. Do tell if you make discoveries, Mekaboo. I'll keep thinking and reporting, too. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 Copied and pasted didnt work :(.. BTW I use FireFox as well (Ubuntu 18.04) Check out the current index file Ive attached..see where the "About" is under the main heading there is where I want a button right under the main heading..its going to take folks to a page where folks can know more about the business...I have no problem using a button/label just need it link properly. I did locate a demo under the "GUI-button" that had nice button but it was connected to a sphere and even though I was able to copy, paste and get it to load I had a hard time adjusting so that instead of it blocking the bull's face it would be higher up. Tried to find..will look some more! https://www.babylonjs-playground.com/#XCPP9Y#4 Thank ya for all you are doing? index2.html Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 27, 2018 Share Posted May 27, 2018 1 hour ago, Mekaboo said: Thank ya for all you are doing? My pleasure. Thanks for the thanks. http://playground.babylonjs.com/#41IFI5#12 How's that look? Link set to "google.com" for testing. (later adjusted to "http:/google.com") I'm still getting "firefox blocked popup" warning. I'll keep thinking. http://playground.babylonjs.com/#41IFI5#14 That one works... but link NOT loaded in new window. Instead, same window. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 Can I ask a favor is possible that I can get a PG with just the "About Us" button...delete the "Box0" and "Box1" buttons then all I have to do is transfer background and textures..its fascinating that some copy and paste moments work and some dont..even when I look at the JS console and it says Im missing a syntax I add the syntax and it still mess up ?. BTW Im an almost 3 years self taught coder and this in my first time doing 3D...Im usually working with Bootstrap(simple and easy..love it to bits) http://playground.babylonjs.com/#41IFI5#14 I can use this one for sure..just need to delete the buttons above the boxes! Once again thank you for the help? Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 My goal is to keep the landing page as simple as possible and make the sub companies' sites special ? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 27, 2018 Share Posted May 27, 2018 Hi What keeps YOU from highlighting lines 288-361, pressing delete key, pressing RUN to test, and then saving the #14 playground again? Just curious. http://playground.babylonjs.com/#41IFI5#15 Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 I didn't think to do that..Im sorry for making your job hard Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 27, 2018 Share Posted May 27, 2018 No problems... easy to do. I'm just curious if you are scared to play in the playground... and if so, wondering why. You seem a little hurried to "get things home"... grab code and leave playground. I have been known to leave a single playground running in a browser window... for a whole week... just playing, thinking, trying stuff... goofing around. Your scene is a little different from most, though. You are using it as a menu to load other webpages, so I guess I can undersatand why you want to get that to your home environment... where the other webpages can be accessed. It's all cool. For future projects, try to make the playground your friend... because it REALLY speeds-up learning. Good luck! Ping me if you have problems, you aren't bothering me. You should keep experimenting and pasting and adjusting... it will get easier and easier. I think you will be a super-programmer real soon. Mekaboo 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 I'm definitely going to take your words to heart..I for sure going to check out the PG and learn more because honestly this is not the first time I will be using BabylonJS..have future ideas already bubbling in my noggin ? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Mekaboo Posted May 27, 2018 Author Share Posted May 27, 2018 This page is a simple gateway...add as the business gets bigger..dont want to give folks all upfront ? Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.