• Content Count

  • Joined

  • Last visited

1 Follower

About maecky

  • Rank

Recent Profile Visitors

650 profile views
  1. Thanks for your answer. I would like to have the yellow column split into two columns but the rest should stay one column. Is this achievable with a simple grid or do I need to nest a second grid into the yellow row? Cheers
  2. Hi Guys, I created a texture for a mesh containing a vertical GUI.StackPanel with a few GUI.TextBlocks in it. These GUI.TextBlocks can be horizontally aligned as expected. Additionally, I added a horizontal GUI.StackPanel to the last row of the vertical GUI.StackPanel. The goal is to add two elements with a width of 35% for each element to this horizontal stack panel. Now I would like to split the horizontal stack panel in a ratio of 50% : 50% and center each element in one of the 50% slots. How can I do that? I created a minimal example in the playground where I tried to center one element (in this case a GUI.Rectangle) in horizontal stack panel which is inside a vertical stack panel. This doesn't work. Does anyone have a clue why this doesn't work and how I can achieve my goal? Thanks
  3. @Gijs thanks a lot for showing me this. Works like a charm! I did create a new class that inherits from StackPanel and did overwrite the draw function as you suggested. The thing is flying Thanks a lot again!
  4. Hi @Wingnut, thanks for your answer and your insights. I already was messing around with a plane parented to the camera but I was running in the same issues - resize doesn't work and different screen resolutions do neither I was thinking of a mix of inheriting from stackPanel and the ImageControl. Or put in other words, adding the image "thingies" to a new control that is inherited from stackPanel. Do you think that could work? I was only playing around with the Image control and it seems that the image isn't as crisp as when it's attached as texture to a plane - did you notice similar behavior? I was hoping that there is an easier way to put a background image to the GUI BTW.: Arrow keys and enter stops working for me, too after typing a few lines...
  5. Hi, I am trying to create a GUI which has a background image. The GUI I built will look something like this: Is it possible to attach a background image to the stackPanel I created? I am aware that I can use a background color but what I really want is to place an image there... Is this possible or is there a better solution for what I am trying to achieve? Thx,
  6. If you open the developer tools in chrome you can read the source code. I did not change anything in the babylon library itself. I used the default.vertex.fx and default.fragment.fx, excepet that I appended the following lines at the end of the fragment shader: if (vPositionW.z < -1000.0) { color.a = 0.1; // discard; } gl_FragColor = color; btw. "discard" would work as excepted. Here a screenshot of the dev tools: Thanks for reading and helping!
  7. What I did was the following: I copied the StandardMaterial.ts file and replaced the "StandardMaterial" names with "AlphaMaterial" in the whole file. I copied the default.fragment.fx and default.vertex.fx and named it alpha.fragment.fx and alpha.vertex.fx I then added the code I posted above at the very end of the alpha.fragment.fx file Since I've written the files in TypeScript I don't know if it is possible to recreate the issue in the PG? If so please let me know - I would love to. Anyways, this is the result of the above-described process: I expected the bluish shaded part to be transparent.
  8. @Amarth2Estel This did solve the rendering glitch in the StandardMaterial but another issue arose. I modified the StandardMaterial and added the following code at the end of the fragment shader: if (vPositionW.z < -1000.0) { color.a = 0.1; // discard; } gl_FragColor = color; This code works if I set seperateCullingPass to false (with the rendering glitches), but stops working if I set it to true. What I am trying to achieve is, to set part of the mesh transparent (e.g. alpha = 0.5). I assume I have to solve it with a shader but I'm not sure? Thanks.
  9. Thanks for your help, really appreciate it! I did read the documentation of the link you provided but I wasn't aware that it helps to render it to the depth buffer. Thanks for pointing it out!
  10. Hi, I am playing around with the StandardMaterial settings and I came across an issue. If I set the alpha value of the StandardMaterial weird rendering glitches appear on my mesh. You can see it in the playground example if you rotate the mesh around. Setting the alpha to 0.9999 makes no sense, I am aware of that but I am trying to write a shader based on the StandardMaterial and I do want to set parts of the mesh transparent - therefore I think I do need alphaBlending enabled (e.g.: gl_color = vec4(1.0, 0.0, 1.0, 0.5)). Is there a possibility to fix this? Thanks for your help!
  11. The debug layer is working now and I can also import STL files. Thank you very much for your fast reply, this really helped!
  12. Hi, I am trying to build a boilerplate with webpack, webpack-dev-server, babel and the latest babylonjs. The versions I am working with: "devDependencies": { "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-preset-env": "^1.6.1", "copy-webpack-plugin": "^4.2.0", "html-webpack-plugin": "^2.30.1", "webpack": "^3.8.1", "webpack-dev-server": "^2.9.4" }, "dependencies": { "babylonjs": "^3.1.0-alpha3.7", "babylonjs-loaders": "^3.1.0-alpha3.7" } If I just import babylonjs like import * as BABYLON from 'babylonjs'; everything is working fine with the exception of the debugLayer : babylon.inspector.bundle.js:408 Uncaught ReferenceError: BABYLON is not defined at INSPECTOR (babylon.inspector.bundle.js:408) at Object.<anonymous> (babylon.inspector.bundle.js:408) at __webpack_require__ (babylon.inspector.bundle.js:21) at Object.<anonymous> (babylon.inspector.bundle.js:49) at __webpack_require__ (babylon.inspector.bundle.js:21) at babylon.inspector.bundle.js:41 at babylon.inspector.bundle.js:44 INSPECTOR @ babylon.inspector.bundle.js:408 (anonymous) @ babylon.inspector.bundle.js:408 __webpack_require__ @ babylon.inspector.bundle.js:21 (anonymous) @ babylon.inspector.bundle.js:49 __webpack_require__ @ babylon.inspector.bundle.js:21 (anonymous) @ babylon.inspector.bundle.js:41 (anonymous) @ babylon.inspector.bundle.js:44 babylon.max.js:68601 Uncaught TypeError: Cannot read property 'Inspector' of undefined at DebugLayer._createInspector (babylon.max.js:68601) at HTMLScriptElement.script.onload (babylon.max.js:6195) I read in another post (link below), that babylon and its modules should be webpack compatible. I tried to import 'babylonjs-loaders' but it resulted in a warning and therefore doesn't work. Tried to import: import * as BABYLON from 'babylonjs'; import 'babylonjs-loaders' Error: ./node_modules/babylonjs-loaders/babylonjs.loaders.min.js Module not found: Error: Can't resolve '../babylon.max' in 'D:\Projects\JS\webpack\bab\node_modules\babylonjs-loaders' @ ./node_modules/babylonjs-loaders/babylonjs.loaders.min.js 1:82-107 @ ./src/index.js @ multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js Had someone the same issues and knows how to solve them? If you need any further info, let me know. Thanks
  13. Nice Game! May I ask, which engine you used?
  14. Is it possible to do both? i.e. Sell some non-exclusive licenses and additionally distribute the game yourself with ads? This would maximize your ROI Relly looking forward to read some answers as I'm just starting out. kind regards, m