Jump to content

touslecoq

Members
  • Content Count

    40
  • Joined

  • Last visited

About touslecoq

  • Rank
    Advanced Member

Recent Profile Visitors

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

  1. Thanks both. That is the thing - I am trying to force Castor to take the path I provide (/themes/mysite/) and append themesGUI/default.css to it. it does this the first time round, but prefixes it with http://mysite:9999/node/ which is not the correct path. Inteja - the canvas is embedded in a custom block that is only displayed when content type of model3d is selected. The block is then overridden using a drupal twig which just loads the editor3d.js script and creates my scene. At the moment the scene is all hard coded and not driven by drupal content - that is the next challenge. H
  2. Hey Inteja thanks for the tip - although, I wouldn't have admitted the Drupal thing as I may be bugging you for help now! :). I think I did try that combination but will try again. From what you said ... is it Drupal that is applying logic as to what prefix to use (ie site only or current URL?). That is what puzzled me. Although I could see where themeRoot was coming from (or not in the case of GUIWindow), I could not see where it was obtaining and applying the site name and any existing URL.
  3. Hi Having some difficulty getting CastorGUI to work when my Babylon.js app is embedded in a Drupal (it works when all in a single html file). It fails with a 404 as cannot find the file mysite:8083/node/themesGUI/default.css. Clearly that is because that location doesn't exist. The /node/ notation is the Drupal URL for the current content, not the location of the CSS file. The file is actually at mysite:8083/themes/mytheme/themesGUI/default.css. I did some tracing in Chrome Dev Tools and found the following: - I kick things off with gui = createGUI(); - createGU
  4. Fixed it. I hadn't forced the canvas element width and height to 100% in the drupal version. Added the following into a Drupal twig. It should probably go in a CSS file but concept proven. <style> #renderCanvas { width: 100%; height: 100%; }</style>
  5. Ah right just noticed something ... if I click in blank space in certain places then the boxes are clicked. So it looks like the co-ordinates are offset somehow when its embedded (ie I click in position coordinate 50,50 and the app thinks I've clicked at position 100,100 where the box is. Any thoughts why this might be happening?
  6. Hi all I'm struggling to debug an issue with my babylon.js app when embedded in a Drupal page. The click events are definitely registering (ie I can orbit that camera by click-dragging and have got it to write the co-ordinates scene.pointerX and scene.pointerY to the chrome console). However for some reason when I click on a mesh (I've a load of boxes in the scene) pickInfo is not returning a hit and therefore not allowing me to drag the boxes around. I have tried it just embedded in a standard non-drupal html page (with my babylon app in a separate .js file, and it works fine allo
  7. Thanks - I think you are right - having just played with a basic version it in the playground it is exhibiting similar behaviour. The reason mine looks worse is because of the additional code it executes on the fly (ie checking for nearby meshes to snap to), it appears less smooth. I therefore think the behaviour I am seeking is not standard. As I drag components around in front of the camera I want them to remain in that same plane (ie remain same distance from the camera). I will create some functions to lock movement to the x,y and z axis for more precise movement. Thanks agai
  8. Hey Dk. Thanks. I have tried that and actually I am wondering if there is some other issue contributing to the issue I am seeing. I think there are 2 symptoms: 1 - when camera (arc rotate) is rotated so that it approaches being co-linear with the ground plane (ie close to ground level), the getGroundPosition stops working as ground is no longer behind the mesh being dragged (ie the sky - no plane - is behind the dragged mesh). I tried doing it inside a cube and had some luck but results were a bit sporadic - possibly related to point 2. 2 - aside from point 1 I am still seein
  9. Hey all I've used the standard method for drag and dropping meshes in my app (ie the one with the getGroundPosition function.) it works fine. However I don't really like it - I don't want to have a ground plane in the scene as the user is building up building blocks and is able to rotate the camera all around the evolving structure and make changes. The ground plane gets in the way of this. So - has anyone come up with an alternative strategy for this? If I remove the ground mesh it does kind of work but is glitchy - the mesh being dragged suddenly starts moving toward or a
  10. Yeehaa :). Thanks Wingy not sure how I missed that but that is exactly what it needed!
  11. Hi folks, @Nockawa As well as making use of the fine Castor.js extension for html based UI, I am wanting to add some webgl UI elements using Canvas2d, specifically mesh labels. I have pretty much got to grips with the basics. However one thing I cannot get to work is changing the visibility of elements at run time. For example allowing the user to toggle labels on and off. I have created a silly demo based on the "labels" playground demo. The red sphere has a label. Hitting the 'Z' and 'X' keys moves the label along the viewport x-axis and this works fine. The ''L' key toggl
  12. Love this place!! Thanks both for your replies. @Dad72I haven't checked out your suggestions above yet, but the effect I was trying to achieve was a control group (ie. like a toolbar) with the title section at the bottom of the group rather than the top. The group would be positioned at the top of the screen with only the title element visible (ie the remainder with the buttons in the group would be off the top of the screen). Upon moving the mouse over the visible portion (ie the group title) would then trigger the whole group to move down into view, creating the effect of drop-down t
  13. Also I removed the title border by setting the Text to " " and the heightTitle to "0px". Would be great to have more configuration over the positioning of title though. Great extension though!
  14. Fixed it - I was missing the "false" attribute at the end of the creation statement to inhibit it from being appended to document body.
  15. Hi (for Dad72 or anyone with Castor skills) I'm using Castor for simple UI elements for my app. My UI will have a window for scene/world buttons, a window for current mesh buttons and a window for status/MI. I am having difficulty adding buttons into a window: var form = new CASTORGUI.GUIWindow("form", { x: 0, y: 0, w: 300, h: 200, overflow: "hidden" }, guiSystem); var sceneButton_toggleAxis = new CASTORGUI.GUIButton("sceneButton_toggleAxis", { x:10, y: 10, w:40, h:40, borderRadiusButton:"20px", borderButton:"8px solid gray", value:" ", backgroundImage:"./
×
×
  • Create New...