Installations
npm install babylonjs
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
20.18.0
NPM Version
10.8.2
Score
87.2
Supply Chain
100
Quality
95.3
Maintenance
100
Vulnerability
87.6
License
Releases
Contributors
Languages
TypeScript (86.63%)
HLSL (6.18%)
JavaScript (4.08%)
SCSS (1.49%)
Roff (1.1%)
HTML (0.46%)
FLUX (0.06%)
Developer
Download Statistics
Total Downloads
3,188,719
Last Day
395
Last Week
8,602
Last Month
58,266
Last Year
670,309
GitHub Statistics
23,429 Stars
44,722 Commits
3,449 Forks
540 Watching
13 Branches
532 Contributors
Bundle Size
6.04 MB
Minified
1.27 MB
Minified + Gzipped
Package Meta Information
Latest Version
7.41.1
Package Id
babylonjs@7.41.1
Unpacked Size
85.37 MB
Size
14.93 MB
File Count
17
NPM Version
10.8.2
Node Version
20.18.0
Publised On
20 Dec 2024
Total Downloads
Cumulative downloads
Total Downloads
3,188,719
Last day
-80.6%
395
Compared to previous day
Last week
-32.4%
8,602
Compared to previous week
Last month
-26.4%
58,266
Compared to previous month
Last year
-6.8%
670,309
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Babylon.js
- We recommend using the Core ES6-supported version;
Getting started? Play directly with the Babylon.js API using our playground. It also contains a lot of samples to learn how to use it.
Any questions? Here is our official forum.
CDN
For the preview release, use the following URLs:
npm
BabylonJS and its modules are published on npm with full typing support. To install, use:
1npm install babylonjs --save
This will allow you to import BabylonJS entirely using:
1import * as BABYLON from 'babylonjs';
or individual classes using:
1import { Scene, Engine } from 'babylonjs';
If using TypeScript, don't forget to add 'babylonjs' to 'types' in tsconfig.json
:
1 ... 2 "types": [ 3 "babylonjs", 4 "anotherAwesomeDependency" 5 ], 6 ...
To add a module, install the respective package. A list of extra packages and their installation instructions can be found on the babylonjs user on npm.
Usage
See Getting Started:
1// Get the canvas DOM element 2var canvas = document.getElementById('renderCanvas'); 3// Load the 3D engine 4var engine = new BABYLON.Engine(canvas, true, {preserveDrawingBuffer: true, stencil: true}); 5// CreateScene function that creates and return the scene 6var createScene = function(){ 7 // Create a basic BJS Scene object 8 var scene = new BABYLON.Scene(engine); 9 // Create a FreeCamera, and set its position to {x: 0, y: 5, z: -10} 10 var camera = new BABYLON.FreeCamera('camera1', new BABYLON.Vector3(0, 5, -10), scene); 11 // Target the camera to scene origin 12 camera.setTarget(BABYLON.Vector3.Zero()); 13 // Attach the camera to the canvas 14 camera.attachControl(canvas, false); 15 // Create a basic light, aiming 0, 1, 0 - meaning, to the sky 16 var light = new BABYLON.HemisphericLight('light1', new BABYLON.Vector3(0, 1, 0), scene); 17 // Create a built-in "sphere" shape; its constructor takes 6 params: name, segment, diameter, scene, updatable, sideOrientation 18 var sphere = BABYLON.Mesh.CreateSphere('sphere1', 16, 2, scene, false, BABYLON.Mesh.FRONTSIDE); 19 // Move the sphere upward 1/2 of its height 20 sphere.position.y = 1; 21 // Create a built-in "ground" shape; its constructor takes 6 params : name, width, height, subdivision, scene, updatable 22 var ground = BABYLON.Mesh.CreateGround('ground1', 6, 6, 2, scene, false); 23 // Return the created scene 24 return scene; 25} 26// call the createScene function 27var scene = createScene(); 28// run the render loop 29engine.runRenderLoop(function(){ 30 scene.render(); 31}); 32// the canvas/window resize event handler 33window.addEventListener('resize', function(){ 34 engine.resize(); 35});
Documentation
Contributing
Please see the Contributing Guidelines.
Useful links
- Official web site: www.babylonjs.com
- Online playground to learn by experimentating
- Online sandbox where you can test your .babylon and glTF scenes with a simple drag'n'drop
- Online shader creation tool where you can learn how to create GLSL shaders
- 3DS Max exporter can be used to generate a .babylon file from 3DS Max
- Maya exporter can be used to generate a .babylon file from Maya
- Blender exporter can be used to generate a .babylon file from Blender 3d
- Unity 5 (deprecated) exporter can be used to export your geometries from Unity 5 scene editor(animations are supported)
- glTF Tools by KhronosGroup
Features
To get a complete list of supported features, please visit Babylon.js website.
No vulnerabilities found.
Reason
30 commit(s) and 8 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: license.md:0
- Info: FSF or OSI recognized license: Apache License 2.0: license.md:0
Reason
0 existing vulnerabilities detected
Reason
Found 22/30 approved changesets -- score normalized to 7
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/stale.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
Project has not signed or included provenance with any releases.
Details
- Warn: release artifact 7.41.1 not signed: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191771073
- Warn: release artifact 7.41.0 not signed: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191609543
- Warn: release artifact 7.40.4 not signed: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191517539
- Warn: release artifact 7.40.3 not signed: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191032237
- Warn: release artifact 7.40.2 not signed: https://api.github.com/repos/BabylonJS/Babylon.js/releases/190693963
- Warn: release artifact 7.41.1 does not have provenance: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191771073
- Warn: release artifact 7.41.0 does not have provenance: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191609543
- Warn: release artifact 7.40.4 does not have provenance: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191517539
- Warn: release artifact 7.40.3 does not have provenance: https://api.github.com/repos/BabylonJS/Babylon.js/releases/191032237
- Warn: release artifact 7.40.2 does not have provenance: https://api.github.com/repos/BabylonJS/Babylon.js/releases/190693963
Reason
binaries present in source code
Details
- Warn: binary detected: packages/tools/babylonServer/public/ammo.wasm.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/basisTranscoder/1/basis_transcoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/basisTranscoder/basis_transcoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/draco_decoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/draco_decoder_gltf.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/draco_encoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/glslang/glslang.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/havok/HavokPhysics.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/msc_basis_transcoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_astc.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_bc7.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_r8_unorm.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_rg8_unorm.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_rgba8_srgb_v2.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/1/uastc_rgba8_unorm_v2.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/msc_basis_transcoder.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/uastc_astc.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/uastc_bc7.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/uastc_rgba32_srgb.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/ktx2Transcoders/uastc_rgba32_unorm.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/libktx.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/twgsl/twgsl.wasm:1
- Warn: binary detected: packages/tools/babylonServer/public/zstddec.wasm:1
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 22 are checked with a SAST tool
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/BabylonJS/Babylon.js/stale.yml/master?enable=pin
- Info: 0 out of 1 GitHub-owned GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
4.1
/10
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More