Jump to content

Search the Community

Showing results for tags 'Base64'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 10 results

  1. Hi All, I'm developing simple image editor which is need to load a image and add texts and drawings and save the edited image. But I'm getting this exception when try to use plugin.extract.base64 method for my container. This exception is getting only when device pixel ratio is not equal to one. (PIXI version: 4.8.1) pixi.min.js:17 Uncaught RangeError: offset is out of bounds at Uint8ClampedArray.set (<anonymous>) at t.canvas (pixi.min.js:17) at t.base64 (pixi.min.js:17) Here is my code sample. PIXI.settings.RESOLUTION = window.devicePixelRatio; PIXI.settings.ROUND_PIXELS = false; var container = document.getElementById('editor-container'); this.set('pixiRenderer', PIXI.autoDetectRenderer(container.offsetWidth, container.offsetHeight, {transparent: true})); container.appendChild(this.get('pixiRenderer').view); this.set('stage', new PIXI.Container()); // Load image to pixi var texture = PIXI.Texture.fromImage(img); var image = new PIXI.Sprite(texture); this.get('stage').addChild(image); // On save image var base64 = this.get('pixiRenderer').plugins.extract.base64(this.get('stage'), 'image/jpeg', 1); Note: If not update the PIXI.settings.RESOLUTION to device pixel ratio exception will not be created. But that is applied to keep keep clarity of image and drawings when zooming the web page. If anyone can help it would be great. Thanks.
  2. how to load a BASE 64 image in phaser 3 ? I am doing on this way function preload() { var dataURI = '''data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQY............" var data = new Image(); data.src = dataURI; game.cache.addImage('image-data', dataURI, data); } function create() { game.add.image(0, 426, 'image-data'); }
  3. Hi, I need to create an image in run-time and then convert it to a base64 string. I can create the image with Phaser.GameObject.RenderTexture, but does anyone know how to convert it to a base64 string? Thanks a lot. Tomas
  4. Hey all, I am trying to use a dds file as a cube texture. it works fine if i link to it in the usual way, but i am trying to instead load a file into my html5 page of which would then be turned into a cube texture as so - new BABYLON.CubeTexture(reader.result, scene); i have got this working with a normal texture as so - new BABYLON.Texture(reader.result, scene); so im wondering, is it the base64 encoding that is messing up the dds file? if so does anyone know a better way of doing this? the dds file im using is from the playground textures many thanks!
  5. Evening Guys Im working on a game for an iso platform that houses several games. This platform handles the loading of assets and sends them back to my game as base64 assets. Im loading in 3 different types of assets: *XML *Sound *TextureAtlas my questions are these: 1) how can i load and play an audio file recieved as a base64 string? 2) how can i load and create a new XML object from a base64 string? 3) how can i create a game.load.atlasXML from base64 strings? any help or notch in the right direction is appreciated. thanks
  6. Lizard

    Base64 Images

    All what i found about it is https://github.com/photonstorm/phaser/issues/3342 But nothing is clear from answer. I triying to use this.textures.addBase64('key', data); On preload where data is string 'data:image/jpeg;base64....' And on create this.add.image(400, 300, 'key'); But it not works, what i do wrong?
  7. Hi, I've been trying to create a cube texture by using the url of texture objects created from a base64 string, but that doesn't seem to be working. Here's a playground example: https://www.babylonjs-playground.com/index.html#IH5G0H#2 Is there another way to create a cube texture, if all 6 textures have been created from a base64 string? Thanks. EDIT: Solved it myself, you can just use the base64 string instead of the textures url. https://www.babylonjs-playground.com/index.html#IH5G0H#3
  8. Hi all, I am researching some things for my current job (html5 games-phaser) and i encountered a very interesting implementation in an online game (not sure if they use an engine). The have a json file like JSONHash but instead of serving the images as pngs the have inlined those as base64 encoded. Having a structure like the one below: { "sprite_key": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAABN ..." "sprite_key2": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAABN ..." .... .... { "sprite_key":{ "frameWidth": ... .... } }}I am struggling to understand the reasons to implement it that way and because i am not sure at all, i though i should ask the community for an opinion
  9. hello everyone im making a game with phaser and i want to take a screenshot from one scene and draw it to another by using game.canvas.toDataURL(); this is what i have tried so far in the first scene GAME.cc = game.canvas.toDataURL(); second one var img = new Image(); img.onload = function(){ var base = new PIXI.BaseTexture(this), texture = new PIXI.Texture(base); var sp = game.add.sprite(0,0); sp.setTexture(texture); }; img.src = GAME.cc; there is no error in console but the sprite is completely black !! so ... what is the problem . on stackoverflow http://stackoverflow.com/questions/29733356/draw-base64-png-data-with-phaser-js
  10. This base64 string will not work anymore?! particleSystem.particleTexture = new BABYLON.Texture('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABGdBTUEAALGPC/xhBQAAAGBQTFRF//3I/+ak7axy/MWI///51JdhvYNRq3NFm2Y7jFozf1ArckYlZj0fWzUaUC4WRycSPyIPOB0MCgQBBQIAMRkKKxYIHA0EJhMHHw8FIhAGGQwEEAcCDgYBEwgCFgoDAAAA3wDZvgAAC9RJREFUeNrVW4mW4jgSdNdOHUAdUIABG7v//y/XyjNSksHUXLuiuguYnhehyENpKdX8/pdH839KYJ9ePqZP6ecfIiDQ3+mVfviX8vi7CTC2jGv4pSz+RgIAfv2+ZkN47B8k0Tw+9xIbWAiH5cZoHrA7oYfRyyABlJhy+CsJ1NB7htffPX3DTK4PUGgWwWfofWVc+QccYhmFZin8N0y8ykBYAIlFFJol4rvb5YiDvDIpHqDQLJh+BX2Q0cPfA/Iwf7zHoFk8/QI8jRF/9ZGFUfgxAYevgY+VF7PIKdwUoVkiv3pdhh0HsjAS9xk0C+ADegFcsgg63KPQLMQXC9+GZw4qgnIgCrMMmll8sH518l16yZjeZjqwDAsYNPPu5/i9W17RO8Tv5K3zMGfgZM0M9osJpPmj+mHy3e2R64COsJSAzp+cP4ifZooM2q6lUSfhIvB6WWXQ3MAvpg/ojCvw8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rsaMdG9yzyd+d/v0bFnC7YQwUQItRdO/CFQM/nLv+7IZFMMNgibFywaGrXnDooXvwh3dMQpOlh+QwLLji4Q3l9+75LLhn5Jds/G5PhcYwFFdc+uufvGdUUoCLPqP/PcbLRn0/LIVfdNkNnZFvdsFtH6Mw5retFsEvvW0HDcc8PXFxItPbW7zq9dfdtoNLVy6D3y4b7IOx668LZ//Qlc/9Hjv/h3jdrkfw6yMXLh+59LqPty/qFw4fQ3/42u/e737m1x75+sLDl24fv/hs11/pJp68/NrxP3L1ex8uXyfc7/1PL17/icvve3j99OL5/8Lt+/8CrZMqBBd8zt8AAAAASUVORK5CYII=', scene); I start to solve it but no solution.?!.... : BABYLON.ParticleSystem.prototype.forceDepthWrite = false;Have somebody an awnser?! greetz Alberto
×
×
  • Create New...