• Content Count

  • Joined

  • Last visited

About aaronmck

  • Rank

Profile Information

  • Location

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey, that looks like a better way to do it. Thanks
  2. I currently have a Canvas2D in my scene already which handles click events on the actual meshes, which was why I was looking to add a popup error message just to keep them separate. To create the buttons I used: $('body').append('<button id="gpu_button" style="position: absolute; right: 20px; top: 110px; font-size: 1em;">Graphics Card</button>');
  3. Hello I have a mesh that loads when a button on screen is clicked. The button currently can only be clicked once so duplicate models can't be loaded. I would like for there to be a message that displays on screen if the user clicks the button more than once. var gpu_button_counter = 0; document.getElementById("gpu_button").addEventListener("click", function () { if (gpu_button_counter > 0) { return false } gpu_button_counter++; I have this current code. Can anybody provide a solution as to how I would display a message on screen if the button is clicked more than once? Thanks!
  4. Hey @alessandronunes Thanks for the reply, that works well for me Cheers!
  5. Hi all, So I've basically finished a project that I've been working on in Visual Studio which I have been running locally using IIS Express that comes with VS. Now I want someone in a different part of the country to access it by just typing in a link in the address bar. How do I go about this? I've never set up or used a server before. PS. I also have WAMPServer installed but I'm unsure how to set it up so anyone can access it at any time? Thanks!
  6. Hey, This is perfect, I got it working in my code so thanks very much, greatly appreciated!
  7. @Sebavan Here you go, a basic example of my code i'm using http://babylonjs-playground.com/#JFMP For some reason it isn't working on either of the models in that PG
  8. Hey @Sebavan This is great, very helpful. Just one issue. I have some of my models load on a button click and others that do not. The canvas 2d panel works on the models that don't load on button click but doesn't work on the models that do load on button click. Do you know why this is? Thanks!
  9. Hi all, So I'm working on a project where I need to be able to click on a mesh and have information about that mesh appear on the screen. I was told I should use Canvas2D but I'm still pretty new with this and it is simply going above my head, I haven't a clue where to start with this. Could anyone be kind enough to help me with this? I have attached a playground with what I'm looking to do. Basically I will have multiple meshes on screen and when I click / double click on one of the meshes it will display info for that particular mesh. http://babylonjs-playground.com/#BPV7F Thanks in advance!
  10. Thanks for all your responses, a great help! I referenced PEP in the document head using <script src="https://code.jquery.com/pep/0.4.1/pep.js"></script> and now I am able to interact with the meshes which is great. I went back into 3ds Max and used ProBoolean to connect all the pieces of the motherboard together so I am able to move the motherboard along the x axis by clicking anywhere on the model which rocks! I just need to figure out how to implement clicking the alt/ctrl key to move the models up and down on the y axis and utilising worldSpaceCanvas for a description to appear somewhere on screen. Slowly but surely I'm getting there. Thanks!
  11. Hey, Just to follow up if anyone has this issue in the future. I tried using ProBoolean to cut holes and union two objects and it now displays perfectly. Cheers!
  12. Sorry for being a noob but how do I reference hand.js? Is that just adding <script src="hand.js"></script> to the top of the html?
  13. The drag and drop function works in the playground but when I add the code into my visual studio code and run it, the models show up but I am unable to drag them. There are no errors reported in visual studio. I've attached a .txt file with my code if you get a chance to look at it and see if there is any issues that you can see. my_code.txt
  14. Hey @Wingnut thanks for your response. I followed your guide and created the git repository and successfully added a few of my models to the playground for testing purposes. Here it is. http://www.babylonjs-playground.com/#BUERM#0 I added the drag and drop code from the example on playground and it works, but it doesn't work when I use it in the rest of my code on Visual Studio for some reason??? A problem I found was that if my model has more than one mesh making it up I am able to move all these individual meshes rather than the full model itself as seen on the motherboard model. Any ideas on how that can be fixed so that I can click anywhere on the motherboard and be able to move the entire model? A couple of other things I would like to be able to do are; 1. Move the models up and down as well as left and right (not worried about rotating it) 2. Be able to click on a model and a description of it appears on the bottom right of the screen if that is possible? I look forward to any of your suggestions. Many thanks!
  15. Hello all, I have a quick question if anyone could help me with. I've set up a scene and imported multiple meshes that were made in 3ds Max and have them positioned where I want them on the scene. It consists of a PC case and all the PC's components beside it. Now I'm trying to implement the drag and drop function so I can click on an imported mesh and be able to drag it into the PC case and position it where it's supposed to be. I tried adding the code from the drag and drop demo from the playground into my code but when I run it, it doesn't do anything. Can I use this drag and drop function on imported meshes or is it only for meshes that are created from scratch in the code? Thanks! PS, I would add a playground with my models and code but I'm unsure how to set it up to show my models.