maecky

Members
  • Content count

    16
  • Joined

  • Last visited

1 Follower

About maecky

  • Rank
    Member

Recent Profile Visitors

381 profile views
  1. maecky

    GUI HUD - Background Image

    @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!
  2. maecky

    GUI HUD - Background Image

    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...
  3. Hi, I am trying to create a GUI which has a background image. The GUI I built will look something like this: http://www.babylonjs-playground.com/#VEHQTQ 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,
  4. 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!
  5. 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: http://mfeu.at/test/ I expected the bluish shaded part to be transparent.
  6. @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.
  7. 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!
  8. 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? http://www.babylonjs-playground.com/#AFH1MN#1 Thanks for your help!
  9. The debug layer is working now and I can also import STL files. Thank you very much for your fast reply, this really helped!
  10. 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
  11. maecky

    [Completed] Defend Your Planet!

    Nice Game! May I ask, which engine you used?
  12. maecky

    Ads with Clay.io, FGL or other?

    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
  13. maecky

    [Book] HTML5 Game Development Insights

    Do you know, is the chapter about cocos2d-html with the actual 3.0alpha release or the "old" cocos2d-html 2.2 release? Thanks, kind regards
  14. maecky

    New 100% HTML5 games store annoucement

    This looks very interesting, will keep an eye on this. Are there any devs that have experiecne with this new service and care to share? kind regards
  15. maecky

    HTML5 Game Publisher - Online Catalog

    Would be interested in this too... Regards