Search the Community
Showing results for tags 'File'.
-
There is a INTEGER PROGRAMMING FILE game at http://www.html5pcode.com/a1yintegerx.htm The game uses a p-code. The p-code was written in HTML5 JavaScript. The home page is http://www.html5pcode.com Build your own INTEGER PROGRAMMING GAME. You can enter the PRICES, REQUIREMENTS, and LIMITS. You can have up to 8 ITEMS and up to 8 PARTS. You give the MAXIMUM QUANTITY and PRICE for each ITEM. There are 20 FILES you can use to save the game in the LOCAL STORAGE on your computer. When you have defined your game, click for the PROGRAM SOLUTION. This game is written in a p-code. The p-code is executed by a p-code engine. If you click on PROGRAM in the RED STRIPE at the top, you can view the p-code programs. The p-code engine can execute the programs and it can edit the programs.There is a DATA option that allows you to see the program's data as it is being executed. There is a TRAIL option that allows you to execute the program in small steps. There is an RT, Real Time, option that allows you to change the program as it is executing. There are many YouTube videos that will show you how it works.
- 1 reply
-
- integer programming
- file
-
(and 1 more)
Tagged with:
-
for example i have: html button <button id="objButton" onclick="fileExport()"></button> result of var objtext = BABYLON.OBJExport.OBJ(OBJexport); // this is *.obj file syntax with meshes from scene what syntax should i use inside fileExport function, that popup window savefile in browser? I have syntax with link a href which work , but i need use button, because the program gui with buttons usually, but not with text links. this is a href syntax: function download(text, name, type) { var a = document.getElementById("a"); var file = new Blob([text], {type: type}); a.href = URL.createObjectURL(file); a.download = name; } after this, click link and can save file. I need button way. If possible not way where button press call a.click()
-
Hello everyone, First congrats for this new v1.3 babylon version. Seems there is a lot of nice improvements and new tools! I look at the gltf file format and I was wondering what was the differences with the babylon file format? For instance I have look at some gltf files and I think they are way more light from what I saw with the babylon files. So does this this mean they would be faster to load ? I guess that once the gltf model is loaded, you will have the exact same properties as in any mesh ( materials, clone, position, etc ) ? Cheers, Pichou
-
https://www.dropbox.com/s/l2l67aququd7she/Patch.babylon?dl=0 or https://ajna4taiga.no-ip.org/BabylonBall/Patch.babylon Hire is playground which doesn't work ok any more http://www.babylonjs-playground.com/#CKEHJ#1 or http://www.babylonjs-playground.com/#CKEHJ#3 How can I load my .babylon file from dropbox or my server? This code has worked. What is goging on now? I see with F12 new problem XMLHttpRequest cannot load https://ajna4taiga.no-ip.org/BabylonBall/Patch.babylon. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.babylonjs-playground.com' is therefore not allowed access. But this things has worked before. How can I make this example to work again? Any alternatives? (I also try like this http://www.babylonjs-playground.com/#YEKUO#1 set data (copy/paste from .babylon file) but here is problem with string of data ! I try \" and \' also but no luck.) I would like to make some playground to ask something and I can't meke playground to load .bayblon file. Greetings Ian
-
Hi! I've been using Babylon for a week or so now and really like how easy it is to use and how well the tutorials are written (I'm using it for a robotics simulation project I'm currently working on). Anyways, I have a question about how textures (and other AssetTasks as well: https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.assetsManager.ts) are loaded using the AssetManager. I have a texture image that's being served at /app/assets/sceneassets/mytextureimg.jpg. My Babylon scene is loaded at the url /app/testbabylon. When I try to load a texture using the addTextureTask method of the AssetManager, I specify that the asset is located at "/app/assets/sceneassets/mytextureimg.jpg", however, the network request that the AssetManager makes is to "/app/testbabylon/app/assets/sceneassets/mytextureimg.jpg". This is clearly relative to my current path, I can use an absolute path (in dev: "http://localhost:4000/app/assets/sceneassets/mytextureimg.jpg") and it works correctly, however this seems messy (especially if switching domains). If I end up using "//app/assets/sceneassets/mytextureimg.jpg" the network request is "http://app/assets/sceneassets/mytextureimg.jpg" - which doesn't point to anything. My main question is whether its possible to specify the AssetManager to use the root url of my domain for texture (and/or image, cubetexture, etc.) loading (or have something like a "rootUrl" parameter like AddMeshTask seems to have). Just for reference, here's a snippet of the code I'm using (material is an object that has a name and diffuseTexture property; where diffuseTexture is the url string, scene is a Babylon Scene object). setupMaterial(material, scene) { const babylonMaterial = new Babylon.StandardMaterial(material.name, scene); if (material.diffuseTexture) { const diffuseTask = scene.loader.addTextureTask( `diffuseTextureTask${material.name}`, material.diffuseTexture); diffuseTask.onSuccess = (task) => { babylonMaterial.diffuseTexture = task.texture; }; } return babylonMaterial; } Thanks for any help, Flux159
-
Hi guys. I'm back in bussiness :)) And I have a new nightmare. So let me explain.... I have a babylonjs file, around of 10mb, It has 5mb without animation, and with one animation it have 10mb. Now a have to add 4 more animations on it, so it's not too good:). On Edge or Chrome it's loading fast, but using browsers like mozilla and safari, i'm asleeping. So I tested all the exporters, and 3dsmax, without "Do not optimize animations" checked, and with "Try to optimize vertices" checked, export the smallest file. But what I can remove more, because, it is still too big, and it has only 65k vertices. Thanks a lot.
-
Hello, I'm migrating my index.html phaser code to different javascript files for better structure and organisation; but I'm coming upon a problem. I've decided to use the template to make the game responsive "Basic Responsive Template" The templates features different states: boot, preload, game, and mainmenu as js files. I load all these in my HTML file and proceed to start from the "game" state. using a button I created in "Mainmenu". In the "create" method, of the "game" state, I call the createButtons function. This function is stored in another JS file that is loaded in the HTML file, before loading the phaser states. here is the createButtons code : function createButtons(){ //Mountain Brush buttonGroup = this.add.group(); buttonMountain = this.add.button(736, 32, 'buttons', mountainOnClick, this, "mountainbutton0.png","mountainbuttonpush.png", "mountainbuttonpush.png"); buttonMountain.fixedToCamera = true; buttonGroup.add(buttonMountain) function mountainOnClick () { currentLayer = terrainPop; currentTile = 5; } In the "game" state here is the code I use to call createButtons create: function () { //========================== WORLD CREATION //Make our game world and set it bounds this.world.setBounds(0, 0, gameWorldX*32, gameWorldY*32); // ========================== TERRAIN CREATION //create Blank tilemap terrainLayer = this.add.tilemap(); // add a tileset Image to the map terrainLayer.addTilesetImage(tileSetImage); //create the world as a layer terrain = terrainLayer.create('level1', gameWorldX, gameWorldY, 32, 32); terrainPop = terrainLayer.createBlankLayer('level2', gameWorldX,gameWorldY,32,32) terrainLimbo = terrainLayer.createBlankLayer('limbo', gameWorldX,gameWorldY,32,32) // Fills tilemap layer with default tile:HOLY WATER (6) terrainLayer.fill(0, 0,0,gameWorldX,gameWorldY, 'level1'); //allows camera to move around terrainLayer.fixedToCamera = false; currentLayer = terrain; createButtons(); },// End of Create When trying to load the state, I get the error: "TypeError : this.add is undefined" on the createButtons.js:3:1; I don't understand why createButtons isn't working in the scope of the create method I've been beating my head at this all day long and couldn't find any solution; i'm pretty sure it's a noobie mistake and would be grateful for some help! Thanks a lot
-
I'm using AssetsManager to load a list of files. Is there a way to tell a loaded file's size? e.g. by the IAssetTask returned onTaskSuccess. I'd like to avoid using SceneLoader as I'd need to create predefined .babylon files to load, and I'd like to avoid that. (assuming I understand SceneLoader properly)
-
Hello, I have a problem with load animation from two files to one obecjt. Load files to the game: this.load.spritesheet('cowwalk', 'assets/images/animal/cow_walk.png',128,128); this.load.spritesheet('coweat', 'assets/images/animal/cow_eat.png',128,128); Create object from file cowwalk: this.cow =this.animal.create(zwierzex, zwierzey, 'cowwalk'); Adding animation to object: this.cow.animations.add('cowleft',[7,6,5,4]); this.cow.animations.add('cowright', [12, 13, 14, 15]); this.cow.animations.add('cowdown', [8, 9, 10, 11]); this.cow.animations.add('cowup', [0, 1, 2, 3]); this.cow.animations.add('coweatleft', [7,6,5,4]); this.cow.animations.add('coweatright', [12, 13, 14, 15]); this.cow.animations.add('coweatdown', [8, 9, 10, 11]); this.cow.animations.add('coweatup', [0, 1, 2, 3]); Animation walk i going well, but please tell my now, how to add animation coweat to the object, and them chose wich animation shoud be play? I must create animal from obect coweat or what? Maybe i should to compile two files to one and them add? Please give me some ideas
-
Is there a limit to the size of a babylon file? I am in the 270MB range and it appears that the file is not loading. It is really large because there is a great deal of animation in the file. Have I reached the limit?
-
Hi, For one of my project, I need to export a scene from the browser to a file. My goal is to write a custom babylon importer for another engine (a mobile engine). My importer is already done and now I need to export scenes from Babylon. Can I do this easily ? (maybe there are a super functions I missed ?) Thanks for your answers Yann. Edit: Ok I just seen SceneSerializer, it's awesome \o/ var serializedScene = BABYLON.SceneSerializer.Serialize(scene);var strScene = JSON.stringify(serializedScene);