Questions tagged [babylonjs]

JavaScript framework for building 3D games with HTML5 and WebGL.

Official site, Github, documentation.

Features

  • Complete scene graph with lights, cameras, materials and meshes
  • Collisions engine
  • Scene picking
  • Antialiasing
  • Animations engine
  • Particles Systems
  • Sprites and 2D layers
  • Optimizations engines:
    • Frustum clipping
    • Sub-meshes clipping
    • Hardware scaling
    • Selection octrees
    • Offline mode (Assets are saved locally to prevent reloading them)
    • Incremental loading
  • Standard material is a per pixel material that supports:
    • Diffuse lightning and texture
    • Ambient lightning and texture
    • Specular lightning
    • Opacity texture
    • Reflection texture (Spheric, planar, cubic and projection)
    • Mirror texture
    • Emissive texture
    • Specular texture
    • Bump texture
    • Up to 4 lights (points, directionals, spots, hemispherics)
    • Custom materials
    • Skybox
    • Vertex color
    • Bones (Animations and shadows are supported)
  • Special FX
    • Fog
    • Alpha blending
    • Alpha testing
    • Billboarding
    • Fullscreen mode
    • Shadow Maps and Variance Shadow Maps
    • Rendering layers
    • Post-processes (blur, refraction, black'n'white, fxaa, customs...)
  • Textures:
    • Render target textures
    • Dynamic textures (canvas)
    • Video textures
  • Cameras (Perspective and orthographic):
    • Arc rotate camera
    • Free camera
    • Touch camera
  • Meshes:
    • Mesh cloning
    • Dynamic meshes
    • Height maps
  • Import:
    • Babylon scene file can be converted from .OBJ, .FBX, .MXB
    • Exporter for Blender
469 questions
2
votes
2 answers

How to create a Texture from a ArrayBuffer in html5 and WebGL

I am having a image that I am reading in server side and pushing to web browser via AJAX call. I have a requirement where I have to render them line by line using WebGL. For Example : Image is 640X480 where 640 is width and 480 is height. Now the…
graphics123
  • 1,191
  • 3
  • 20
  • 57
2
votes
1 answer

taking a 'snapshot' of babylonjs scene sometimes works, sometimes doesn't

I am trying to take a 'snapshot' of a babylon3d scene ... in other words: I am trying to clone a babylon3d canvas when a user presses a button, and then append the new to the .. Sometimes it works, but other times it does…
dsdsdsdsd
  • 2,880
  • 6
  • 41
  • 56
2
votes
2 answers

Babylonjs draw walking path line

I am trying to draw walking path lines using BabylonJS. I tried functions CreateLines and CreateDashedlines but am unable to increase the stroke size. This video has the path which I have in my mind Walking path:(0.20)
raja babu
  • 21
  • 3
2
votes
1 answer

typescript class cannot find "this" variable?

I'm using babylonjs library and created a "Building" class with typescript. Using typescript for the whole thing BTW. I create this new "Building" from my main game.ts "Game" class and when trying to access a member of "Building" I get "undefined"…
efel
  • 1,054
  • 3
  • 14
  • 29
2
votes
2 answers

Drawing custom shapes in Babylon.js

I have been searching all over the web for a way to draw custom 3d shapes in babylon.js. I would be grateful if somebody could provide a working example. For instance, a 3d irregular pentagon, triangle fan, or a wedge.
2
votes
1 answer

Extracting animation keyframes in Baylon.js

I am teaching myself babylon.js and I am creating an Animations library class (in javascript). I wanted to know if babylon.js provides a tool that would enable me to extract the total animation keyframe for my zombie character? What I am doing as a…
user3838697
  • 115
  • 3
  • 12
2
votes
1 answer

Load multiple babylon files in one html

I want to know how can I load two or more babylon files in one html page or if its possible to join them. I have the following code which its good to see one simple model (exported) but I need add more exported models in the same html page. I heard…
Alan Alvarez
  • 646
  • 2
  • 11
  • 32
2
votes
1 answer

How to insert a newline in a babylon JS dynamic texture using drawtext?

So I have something like this demo: http://jeromeetienne.github.io/threex.dynamictexture/examples/basic.html Source: https://github.com/jeromeetienne/threex.dynamictexture/blob/master/examples/basic.html A box with the time printed on each surface.…
2
votes
2 answers

How to create a custom mesh in Babylon.js?

I'm using the babylonjs 3D WebGL library. It's great library, but I can't find the same, which exists in THREE.JS library. For example, I have 2D polygons in database, I'm fetching the polygon data from it and then create a custom mesh and extruding…
user4124520
2
votes
1 answer

Coordinates system in Babylon.js

I'm a little confused about the coordinates system in Babylon.js. That is, when I use the following sequence of statements : var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 50, new BABYLON.Vector3(0, 0, 0), scene); var sphere1 =…
E B
  • 59
  • 1
  • 8
2
votes
4 answers

webgl - babylonjs skybox texture not showing

I have a problem with a texture of a skybox made in webgl using babylonjs. My whole project is on the webserver and everything seemd to be good written but the box which should be a skybox doesn't show the texture - black outside and…
user3166894
  • 21
  • 1
  • 2
2
votes
1 answer

babylonjs: multi-shadows for multi-elements not working

Im trying to get the shadows right using Babylonjs. Without any joy :p Here is the resources on shadows I have found Babylonjs wiki: Shadows framework for building 3D games with HTML5 and WebGL but I can't find anything on "element on element"…
Brian
  • 1,026
  • 1
  • 15
  • 25
2
votes
2 answers

babylon.js texture from blender

I have some basic issue (I think) when I try to export a scene from Blender to Babylon.js. I think I don't really understand how textures work. Let's take a basic example. I create a new scene on Blender. There's juste a light, a camera and a cube.…
1
vote
0 answers

multiDrawElementsInstancedWEBGL / select geometry to render using LOD

I'm looking for answer regarding the multiDrawElementsInstancedWEBGL api on the web, I'm hitting a wall on something and this is quite frustrating, and really afraid this could confirm my darkest fear haha I did some experiments in implementing…
1
vote
0 answers

React native Skia is not compatible with babylon

I am trying to use react-native-skia with @babylonjs/react-native(1.6.1) and RN 0.71 but can not use both of them together. Only of them is visible on the screen. I had the same problem earlier with RN 0.70 where skia drawings were not available in…
Narendra
  • 4,514
  • 2
  • 21
  • 38