Search the Community
Showing results for tags 'embed'.
-
IF ITS NOT ALREADY IN BABYLON.JS (and i just don't see it) Can we embed vertex and fragment programs in the .babylon file on the 'materal' object of the material customType="BABYLON.ShaderMaterial" Example: { "customType" : "BABYLON.ShaderMaterial", "name" : "Items", "id" : "dadbe3ae-445f-4fe4-b83f-000b27b2b8d4", "backFaceCulling" : true, "wireframe" : false, "alpha" : 1, "shaderPath" : "Items", "options" : { "attributes" : [ "position", "uv" ], "uniforms" : [ "worldViewProjection" ], "needAlphaBlending" : false, "needAlphaTesting" : false, "samplers" : [], "defines" : [] }, "textures" : {}, "floats" : {}, "floatArrays" : {}, "colors3" : {}, "colors4" : {}, "vectors2" : {}, "vectors3" : {}, "vectors4" : {}, "matrices" : {}, "matrices2x2" : {}, "matrices3x3" : {} }, Can we add somewhere in a 'base64' encoded string for the shader programs... Something like: "vertexBase64" : "*** BASE64 ENCODED VERTEX PROGRAM ***", "fragmentBase64" : "*** BASE64 ENCODED FRAGMENT PROGRAM ***", Then in the client side Material parser... If we got base64 parsdedMaterial data with our programs already there... no need to make TWO separate server trips to get our shader programs... plus the shader programs are then cached when storing .babylon files in indexedDB. Also it can easily work with sandbox and just drag that single .babylon file to sandbox (ONCE sandbox get the PR fix to use BABYLON.ShaderMaterial vertexBase64 and fragmentBase64) then folks custom shaders will work on the sandbox... Right now if you have BABYLON.ShaderMaterial defined in your .babylon file (and don't use a qualified path) the server will never find or use them (unless you know where those files end up after posting to server and are available ... still would hard code sandbox path to shader program in your .babylon file.).. For some reason if don't use path and just name... it looks in '/src/Sharder/myShader.vertex.fx' Anyways I'm going to play with the github Material.Parse stuff to use material.vertexBase64 and fragmentBase63 IF PRESENT... After i had them to the ShaderMaterial class... Hope you guys like this idea ... That last one to get metadata added seems like a tough sell... I hope you consider this...
-
Hello, I've made a game in phaser. It's all in a html file with the assets folder next to it. Now how do I actually put it on my website that is hosted on Google Sites? I'm very new to web development. Thanks.