Search the Community
Showing results for tags 'smooth'.
-
I need to improve the smoothness of the curved lines which are drawn using PixiJS. When I set the antialias=true, the rendered application would be handy with the smooth lines. Though when I download the rendered segment it seems that the curved lines are not smooth as the rendered one in the web page. Is there a way to improve the smoothness of curved lines in downloaded image. I use following method to download image this.renderTexture = PIXI.RenderTexture.create( { width: this.pixiApp.screen.width, height: this.pixiApp.screen.height, resolution: this.pixiApp.renderer.resolution }); this.pixiApp.renderer.render(this.pixiApp.stage, this.renderTexture); return this.pixiApp.renderer.plugins.extract.image(this.renderTexture, 'image/jpge', 1);
-
Hi, I'm trying to replicate the camera movement from a typical FPS game. I want the camera to follow the player's mouse, without the need to click at all. Here's what I've got so far: var lastMove = 0;oldx = 0,oldy = 0,mousemovemethod = function (e) { if(Date.now() - lastMove > 40) { if (e.pageX < oldx) { camera.rotation.y -= .1; } else if (e.pageX > oldx) { camera.rotation.y += .1; } if (e.pageY < oldy) { camera.rotation.x -= .1; } else if (e.pageY > oldy) { camera.rotation.x += .1; } oldx = e.pageX; oldy = e.pageY; lastMove = Date.now(); }}document.addEventListener('mousemove', mousemovemethod);The camera movement is rough and intermittent. I'd like it to be smooth with a bit of easing. Here's a link to the full code: http://www.babylonjs-playground.com/#WM1VE My question: How can I smooth out the rotation code above, or is there a better way? Solution: camera.cameraRotation.ycamera.cameraRotation.x cameraRotation provides the smooth transition I was looking for.
-
Hello evryone Sorry in advance for my bad english; I wanna ask somthing about .ArcRotateCamera (); I want to make camera with locked position behind the player when the player moving but if player stand on the place he can moving around with the camera and when he again start moving the camera smoothly rotating to the locked position. I wondered if I will make somehow the camera will checking position.z of the player then camera will be calculate position behind the player. Here is my player how move in game for better understending: http://www.babylonjs-playground.com/#TGA1QA By the way I only want some tips or show me a way how I can make this work out I want to fully understand how javascript and babylon.js works. Thank you.
-
Hello guys, I have a scene with a FollowCamera and I need to switch between multiple targets. For some reason though, I cannot get to make the switch smooth. When setting lockedTarget directly it jumps from one position to another. I tried to make an animation with the "lockedTarget" property but it doesn't work. Maybe you guys could help me out? PG: https://www.babylonjs-playground.com/#9AXYDK#1 Thank you!
-
Hey Guys, I'm currently moving my camera around a series of sprites but the movement is painful to look at and jerky when moving the sprites and especially with higher speeds, is there anything you can do to fix/help the lag/poor performance as it isn't really usable as a build in this current state. I also as @Wingnut said have the issue that the transparent background is still clickable. Here is my current playground: https://www.babylonjs-playground.com/#41N19L#3 @Deltakosh @Wingnut @JohnK Any incites Guys?
-
Is there a way to smooth dynamic created mesh? searched the forum and found something related to VertexData.ComputeNormals, I tried it and not working. here is a demo http://www.babylonjs-playground.com/#0GUH53 the attached picture shows the problem, the outer head is a babylon file (smoothed ), the inner face is dynamically generated. clearly the lighting on the inner face looks flat. I guess it is something like this in unity forum ? http://answers.unity3d.com/questions/630505/how-to-procedurally-generate-smooth-meshes.html thanks for the help
-
Hello everybody! I am looking for procedural terrain generator. I'd like to achieve something like smooth hills or something like here. In the last link there is a beautiful and smooth terrain. I thought about Perlin Noise generator, but I am not sure if is it possible with this function. Maybe do you know something that I can achieve with.
-
I have some problem. In blender I have a model with smoothed polygons, but when I am export a model to babylon, than some polygons do not looks smoothed. On a hood and a neck. In blender all right In babylon some polygons do not looks smoothed
-
Hi! I'm trying to figure out how to set part of the mesh shading as smooth and part of it as flat. A quick sample on an image bellow rendered with Blender (from left to right): Mesh with smooth shadingMesh with flat shadingMesh with mixed shading (achieved with edge split modifier) <- what I wantIdeally shading type could be set per vertex group or per material.
-
I have a game were the user put stickers on the stage. he can scale them and rotate... The PNG file is in a fitting size so the user can scale it without loosing quality. But, when I scale the image down it is crisp... Why is that and how can I fix it? Thank you :]
- 4 replies
-
- phaser frameworks
- image
-
(and 2 more)
Tagged with:
-
Hello fellow BabylonJS users, I'm currently using babylon to put some product visualizations on the web, but today I ran into a problem that I didn't find to be documented anywhere. I got a poly-reduced CAD-data rip with custom vertex normals, in Blender everything looks nice and smooth, but when I export to babylon, all those data seemsto be lost. Do you have any idea how to fix this? I'll attach an image, showing the dataloss. Have a nice day, J
-
I've just ported the key bit of a game I'm working on from HaxePunk to Phaser and am having a problem. As my main sprite moves it stutters, judders and in general does not move with the silky smooth motion I am expecting. You can have a look at it in action here: http://www.mountainstorm.co.uk/test/ZD/ I've tried both Chrome and Safari on OSX and both seem to have the same issue. I've also tried commenting out more the code (so it just moves the sprite at a programmed constant rate) and it's still not smooth. I've also tried playing around with calculating the motion based on elapsedMS, elapsed and physicsElapsed and none seem to make much difference. My CPU only runs at about 20%, so I'm kind of at a loss as to whats going wrong. Anyone have any thoughts?
-
Hey there, after updating to the newest version of the blender exporter (3.0.4), meshes, that were set to be rendered smooth before have started ignoring that setting all together, when exported to babylon.js (screenshot attached). Can this be due to a bug in the exporter? Thank you for your time, Ben
-
Hello, Like the title says I have a text on a game that appears quite blurry or like it has smoothness applies to it. I was wondering if there is a way to make it more crisp to improve legibility. I'm attaching a screen of how it looks, I think it is quite obvious.
-
Hi fellow game developers. I have a problem: I want to scale up the particles that come out of an emitter, but they should still look like pixels and not have these blurry borders. So i tried "bullet_emitter[number].smoothed = false;", but this didn't work... In the docs it says you need to do someting with "new Particles(game)", but i don't get it. Anyways, if anyone could show me an example on how to set .smoothed = false; on all particles emitted from an emitter, i would be really happy. Here my game: http://qcoded.de/game/libary/rogue/launcher.html click the "enter the game" button and press space when the game loaded. Now you should a bullet (the particle i want to be .smoothed = false;) emitted from an emitter beneath the player.
-
I'm trying to make it to where the user can draw lines on the screen, with a bitmapData object. When I try to draw on the screen, I get a 404 error, and I'm not sure why. Any help is appreciated! Here's my code: var game= new Phaser.Game(720,1000,Phaser.CANVAS, 'game_div');var play={ preload: function() { this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.scale.setShowAll(); game.scale.refresh(); this.game.load.image('nope','assets/wrong.png'); }, create: function() { this.bmd=this.game.add.bitmapData(720,1000); this.ctx=this.bmd.context; this.ctx.setLineWidth(5.0); this.ctx.setFillColor(255,0,0,0); this.game.add.sprite(0,0,this.bmd); this.game.stage.backgroundColor='#ab54c1'; this.game.scale.forceOrientation(false, true, 'nope'); }, update: function() { if(this.game.input.activePointer.isDown) { this.ctx.lineTo(this.game.input.activePointer.x,this.game.input.activePointer.y); } }}game.state.add('play', play);game.state.start('play');
- 7 replies
-
- bitmap
- bitmapData
-
(and 8 more)
Tagged with: