466 questions
0
votes
1
answer
56
views
Open source implications of Three.js and Babylonjs applications
Suppose I build a 3D model in these two open-sources i.e Three.js and Babylonjs, and want to sell that application. I want to clear the following doubts
Do I need to handover the entire code to whom ...
0
votes
1
answer
73
views
How to Replace a Box Player Entity with a GLB Model in Noa.js + Babylon.js Game
I’m currently working on a game built using Noa.js and Babylon.js. In the existing entity.js file from the project template, the player is created using a simple box mesh.
I’m trying to replace this ...
0
votes
0
answers
50
views
Fix the Babylon JS GLSL
I am making simple babylon.js project that can be set base texture, pattern overlay texture, pattern tint, lightmap of sphere.
But my project doesn't work well.
I can see only black sphere (not ...
-1
votes
1
answer
172
views
CORS Error in connecting Babylon.js and Colyseus server [duplicate]
error screenshot I am getting a CORS error when I'm trying to connect to colyseus server. I have provided code pls check what is the issue.
Server file - index.js
// server/index.js
import express ...
2
votes
0
answers
36
views
How to find/colorize different between two Meshes of the STEP file uploaded with STEPLoader in Three.js
I have two STEP files, After.stp and Before.stp, of the same object. In the Before.stp file, some surfaces have shifted or deviated compared to After.stp. I need to identify and colorize the different ...
0
votes
1
answer
42
views
Attempting to deploy a BabylonJs website coded in typescript
I had learned to code babylonjs scenes in type script
import {Scene, Engine, FreeCamera, Vector3, HemisphericLight, MeshBuilder, StandardMaterial, Texture, CubeTexture, PBRMaterial, SceneLoader, ...
0
votes
1
answer
55
views
The rotation point for the BabylonJS sprite
I recently encountered a problem with the Pivot method for BabylonJS frame sprites, it does not exist :D I would like to ask if anyone has encountered a similar problem and how to set the rotation ...
3
votes
0
answers
205
views
Can I use a GPUBuffer which is the output of a compute shader as a Three.js or Babylon.js vertex position buffer?
I am experimenting whith webgpu. I found out that transferring data between cpu and gpu can be quite slow.
My goal is to simulate particle physics on the gpu using webgpu's compute shaders, then use ...
0
votes
0
answers
51
views
libc Fatal signal 11 in Android BabylonJS React Native
I'm getting this error below when running on emulator:
libc Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr
0x7b03a8c6f4 in tid 10945 (mqt_js), pid 10810
If I run on a device I get
...
0
votes
1
answer
45
views
How to wait for async function inside sync
I have a function in a class here which runs every frame (in babylonjs). its purpose is to load 3d tiles and set the mesh.
if (!mesh) {
// this.loadTile is async!
const newTile = this.loadTile(...
1
vote
1
answer
41
views
Mesh Not Displaying with `setVerticesBuffer`, But Displays Correctly with `VertexData`
Problem Description:
I am encountering an issue while developing 3D graphics with Babylon.js. I attempted to set mesh vertex positions directly using the setVerticesBuffer method, but the mesh does ...
1
vote
1
answer
288
views
Export Blender to Babylon.js fails
I'm using Blender 4.0.2 and Blender2Babylon-3.3x.zip, that I downloaded from github repo here. I created new file with cube model and deleted camera and light, so there is nothing except cube.
During ...
0
votes
1
answer
173
views
How to tell if Shift key is being held down
I am making a first-person game using Babylon.js and I'm trying to add a feature where the player can sprint (camera.speed is increased) when holding SHIFT, but SHIFT doesn't trigger the keydown event,...
0
votes
2
answers
713
views
Error while loading Draco-compressed mesh (glTF-Transform) in BabylonJS
I am trying to load Draco-compressed meshes, processed server-side with glTF-Transform, in BabylonJS retrieving them on the fly via REST calls. Due to this, the mesh to load doesn’t have an extension, ...
0
votes
0
answers
113
views
Redering glb file using babylon viewer in angular
I tried installing babylonjs/viewer and @babylonjs/viewer. Both are not working.
The first viewer is throwing a namespace error. second one has the issue with the typescript version below 5.
Anyone ...
-1
votes
1
answer
73
views
BabylonJS GUI Element has strange effects with depthOfField
Using BABYLON.DefaultRenderingPipeline with depthOfField creates strange effects on GUI (partly blurred).
Example:
https://www.babylonjs-playground.com/#USTXX4
EDIT:
BABYLON.DynamicTexture https://...
1
vote
1
answer
64
views
Babylon.js, making turrets face the middle of the field?
I am getting started with Babylon.js and am getting stuck. I have this code to create boxes and add cylinders to them. When clicked, bullets fire out from the cylinder.
I've added a playground link ...
0
votes
2
answers
136
views
BabylonJS Dynamically generated Animation not playing
I’m developing a custom AnimationSequencer Class that, once provided with a group of keyframes, is able to dynamically generate an Animation instance for each keyframe group, append these animations ...
0
votes
1
answer
134
views
How to add easing function to Babylon JS keyframe
Given I have a BabylonJS keyframe animation defined similar to as follows (ancillary code omitted for brevity):
const animation = new BABYLON.Animation(
"positionAnimation",
"...
-1
votes
1
answer
252
views
How to create 3D website like this? (babylon.js or KRpano?)
I've seen this website https://greenewera.com.tw/2023/ and curious about how to make it.
Already checked with wappalyzer and it shows the framework like Vue.js and Ngins as web server, but how to ...
0
votes
1
answer
67
views
Importing a mesh only work with active Inspector
I have a strange problem in my angular app and I can't figure it out.
I am importing a mesh like this:
SceneLoader.ImportMesh("", "assets/models/", "model.gltf", this....
0
votes
1
answer
501
views
Loading OBJ Model in BabylonJs Not Loading
I have a Blazor WASM project that I load Babylon scene. When I load a simple scene (drawing a sphere on a plane) everything loads fine. But, I am trying to load an *.obj file, which is stored on ...
1
vote
0
answers
48
views
Pass by copy of reference may be causing unexpected behavior
I am trying to build a BabylonJS app inside of ObservableJS. I've already made an ObservableJS page with a working BabylonJS app inside, just by writing BabylonJS code inside a code cell. So I know ...
-2
votes
1
answer
75
views
useState variable does not get changed after updated in useEffect by event
i am trying to update a stateful variable cameraPosition using Typescript, React and Babylonjs.
this is the code snipped:
const camera = scene?.cameras[0];
const prevPositionRef = useRef<...
1
vote
0
answers
130
views
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 ...
0
votes
0
answers
60
views
I can't add animation to my babylonjs file
i am new to babylonjs and currently having problem animating my gltf file. could you help me fix it? Thanks in advance
import * as BABYLON from '@babylonjs/core';
import '@babylonjs/loaders/glTF';
...
1
vote
0
answers
111
views
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 ...
1
vote
1
answer
108
views
When uploading a GLB file onto a website it applies a nonexisting gradient over the whole view
I created a model in Blender and when viewing it in Sandbox theres is no gradient when i look at the views set up by the camera, but once the developer adds it to the website a gredient from the ...
0
votes
1
answer
543
views
BabylonJS: How to set background color transparent
I'm struggeling with making the background color of a babylonjs scene transparent.
Since I'm using a .glb file i need to add a environment. Before using the defaultEnvironment i was able to remove the ...
0
votes
1
answer
108
views
How to substitute the local dependency with external CDN link in Webpack?
I am trying to do something like this:
resolve: {
alias: {
babylonjs: "https://preview.babylonjs.com/babylon.js?t=1682926053948",
}
},
Instead of using saved local ...
0
votes
1
answer
160
views
How to position the camera so that the given world coordinate is projected on the given screen position
I want the camera to be positioned so that the center of the object is rendered at the given pixel coordinates( for example (10, 20)) of the screen.
The center of the object is given in the world ...
1
vote
1
answer
500
views
How do I properly initialize HavokPlugin in BabylonJS 6.18.0
As for the topic, I have a BabylonJS project and want to implement physics, I have upgraded version from 5.57.0 to 6.18.0 so my package.json looks like so
{
"name": "roulette",
...
0
votes
1
answer
69
views
What to use instead of IWheelEvent.wheelDelta?
According to the docs IWheelEvent.wheelDelta is deprecated.
What should we use instead?
1
vote
1
answer
315
views
babylonjs load glb from php header for hide file path
I want to load a 3D *.glb file with babylonjs from a hidden file path like this
<html>
<head>
<title>Babylon.js Viewer - Display a 3D model</title>
<script src=&...
0
votes
1
answer
796
views
Trying to use GLB file in flutter
I am Created a 3D model and exported the file in the extension .GLB I like to use that file in flutter is there any way to use.
And I have tried with this dependencies model_viewer_plus: ^1.5.0, ...
0
votes
2
answers
141
views
How to Get BabylonJS working in a Microsoft Teams App
In a Microsoft Teams app, I am using
await app.shareAppContentToStageAsync()
with a page that hosts Babylon JS - this exact page that should show a ball on a plane with a blue background.
https://doc....
1
vote
1
answer
2k
views
Vite serving shader file with wrong (none) MIME type
I'm developing a BabylonJS application. BabylonJS PostProcess class appends .fragment.fx to a given file name and requests that from the server. When my local Vite (version 4.0.4) dev server serves ...
1
vote
1
answer
657
views
How can I position a BABYLON.GUI.Image?
I want to display a babylon image but I can't position it, because a BABYLON.GUI.Image doens't seem to have properties like x, y or position.
const advancedTexture = BABYLON.GUI.AdvancedDynamicTexture....
0
votes
1
answer
165
views
How to deploy Babylon.js app to Hololens Emulator
I have developed a simple application with babylon.js in a file called index.html, but I don't know how to run it on Hololens Emulator.
0
votes
1
answer
246
views
How to calculate rotation for a box based on a set of four points?
I’m a bit new to working with 3D space and rotation. I have a list of four Vector3 points that represent the corners of a rectangle. What I want to do is use those points to create a box mesh that is ...
1
vote
0
answers
414
views
BabylonJS compute ArcRotateCamera rotation to look at point on sphere
How do I compute the alpha and beta for ArcRotateCamera to look a point on a sphere? My playground has a ray from sphere origin to point on surface. Ultimately, I would like to animate from current ...
0
votes
1
answer
405
views
how to load textures and use it on obj modele
In babylon js when you load an obj modele how could you edit it and add textures on colors?
BABYLON.SceneLoader.Append("skull/", "skull.obj", scene)
0
votes
1
answer
501
views
Imported mesh falls through the ground in BabylonJS
I'm trying to use physics (AmmoJS) in BabylonJS for an imported mesh.
For meshes I create on the fly everything works fine, but when I import a mesh it falls through the ground.
const ground = BABYLON....
1
vote
1
answer
488
views
Change Material of a babylonJs model with react-babylonjs
I load a model coming from Blender (exported with babylon js exporter). The model comes with materials. and has 5 meshes (very simple test model).
I would like to change albedo (color under natural ...
1
vote
0
answers
266
views
Babylon js texture issue when used with reactjs
I'm implementing 3D demo application using Babylonjs library for 3D Demo.I'm importing 3D model from S3 and adding texture image on top of material in Reactjs.
But when i add texture image on top of ...
1
vote
0
answers
400
views
Why is AWS Sumerian transitioning to Babylon.js? Any alternative AWS services planned in future?
The AWS Faqs : https://aws.amazon.com/sumerian/faqs/ Suggest the AWS Sumerian is going to transition to BABYLON.JS.
However, why is AWS planning to sunset this Service ?
Is there any new AWS service ...
0
votes
0
answers
397
views
Finding intersection points between meshes
how to get all intersection points, while two different mesh collide/intersect?
ex. mesh.intersectsMesh(anotherMesh) it return bool.
In my case I need to find all intersection points.
1
vote
1
answer
194
views
BabylonJS Tab freezing when calling new Babylon.Engine in a fresh project
I wanted to rewrite a project of mine in babylon js so i created a new directory added a html file and added the script tags for babylon etc...
Everything works fine till i create the engine.
If i ...
0
votes
1
answer
759
views
Is it possible in Babylon.js to make an object's transparency be driven by viewing angle?
For example imagine a cube. As you look straight onto the cube, the side of the cube which is facing the camera is fully transparent.
Then you rotate the cube or the camera around the cube, and as you ...
1
vote
0
answers
642
views
How do I force scroll wheel events to only affect a canvas filled with BabylonJS
I have a web app that contains a canvas filled with a BabylonJS created scene (with an ArcRotateCamera) and other html content.
I want to use the scroll wheel of the mouse to zoom the camera in the ...