Namespace BABYLON
Index
Namespaces
Enumerations
- Animated
Input Block Types - Animation
Key Interpolation - Asset
Task State - Conditional
Block Conditions - Conversion
Mode - Coordinate
- Curve
Block Types - Debug
Layer Tab - Depth
Of Field Effect Blur Level - Device
Input Event Type - Device
Type - Dual
Sense Input - Dual
Shock Button - Dual
Shock Dpad - Dual
Shock Input - Engine
Format - Fluid
Rendering Debug - GLTFLoader
Animation Start Mode - GLTFLoader
Coordinate System Mode - GLTFLoader
State - Hand
Constraint Orientation - Hand
Constraint Visibility - Hand
Constraint Zone - Hand
Part - Inspectable
Type - Internal
Texture Source - Joystick
Axis - Mesh
Attribute Exists Block Types - Node
Material Block Connection Point Mode - Node
Material Block Connection Point Types - Node
Material Block Targets - Node
Material Connection Point Compatibility States - Node
Material Connection Point Direction - Node
Material Modes - Node
Material System Values - Orientation
- Physics
Constraint Axis - Physics
Constraint Axis Limit Mode - Physics
Constraint Motor Type - Physics
Constraint Type - Physics
Material Combine Mode - Physics
Motion Type - Physics
Radial Impulse Falloff - Physics
Shape Type - Physics
Updraft Mode - Point
Color - Pointer
Input - Pose
Enabled Controller Type - Property
Type For Edition - Scene
Loader Animation Group Loading Mode - Scene
Performance Priority - Shader
Language - Simplification
Type - Source
Texture Format - Space
- Sub
Emitter Type - Switch
Input - Timer
State - Tonemapping
Operator - Transcode
Target - Trigonometry
Block Operations - Wave
Block Kind - WebXRHand
Joint - WebXRNear
Controller Mode - WebXRState
- WebXRTracking
State - Xbox360
Button - Xbox360
Dpad - Xbox
Input
Classes
- Abstract
Action Manager - Abstract
Asset Task - Abstract
Mesh - Abstract
Scene - Action
- Action
Event - Action
Manager - Add
Block - Advanced
Timer - AmmoJSPlugin
- Anaglyph
Arc Rotate Camera - Anaglyph
Free Camera - Anaglyph
Gamepad Camera - Anaglyph
Post Process - Anaglyph
Universal Camera - Analyser
- And
Or Not Evaluator - Angle
- Animatable
- Animation
- Animation
Asset Task - Animation
Event - Animation
Group - Animation
Properties Override - Animation
Range - Anisotropy
Block - Arc2
- Arc
Follow Camera - Arc
Rotate Camera - Arc
Rotate Camera Gamepad Input - Arc
Rotate Camera Inputs Manager - Arc
Rotate Camera Keyboard Move Input - Arc
Rotate Camera Mouse Wheel Input - Arc
Rotate Camera Pointers Input - Arc
Rotate CameraVRDevice Orientation Input - Arc
Tan2 Block - Array
Tools - Asset
Container - Assets
Manager - Assets
Progress Event - Async
Loop - Attach
To Box Behavior - Audio
Engine - Audio
Scene Component - Auto
Release Worker Pool - Auto
Rotation Behavior - Axis
- Axis
Drag Gizmo - Axis
Scale Gizmo - Babylon
File Loader Configuration - Back
Ease - Background
Material - Baked
Vertex Animation Manager - Ball
And Socket Constraint - Base
Camera Mouse Wheel Input - Base
Camera Pointers Input - Base
Particle System - Base
Six Dof Drag Behavior - Base
Texture - Basis
File Info - Basis
Transcode Configuration - Bezier
Curve - Bezier
Curve Ease - Bi
Planar Block - Binary
File Asset Task - Black
And White Post Process - Bloom
Effect - Bloom
Merge Post Process - Blur
Post Process - Body
Plugin Data - Bone
- BoneIKController
- Bone
Look Controller - Bones
Block - Bounce
Ease - Bouncing
Behavior - Bounding
Box - Bounding
Box Gizmo - Bounding
Box Renderer - Bounding
Info - Bounding
Sphere - Box
Particle Emitter - Buffer
- CSG
- Camera
- Camera
Gizmo - Camera
Inputs Manager - Cascaded
Shadow Generator - Cell
Material - Chromatic
Aberration Post Process - Circle
Ease - Circle
Of Confusion Post Process - Clamp
Block - Clear
Coat Block - Clip
Planes Block - Clipboard
Event Types - Clipboard
Info - Cloud
Block - Cloud
Point - Color3
- Color3
Gradient - Color4
- Color
Correction Post Process - Color
Curves - Color
Gradient - Color
Grading Texture - Color
Merger Block - Color
Splitter Block - Combine
Action - Compatibility
Options - Compute
Effect - Compute
Shader - Condition
- Conditional
Block - Cone
Particle Emitter - Constants
- Container
Asset Task - Convolution
Post Process - Copy
Texture To Texture - Cross
Block - Cube
Map To Spherical Polynomial Tools - Cube
Texture - Cube
Texture Asset Task - Cubic
Ease - Current
Screen Block - Curve3
- Curve
Block - Custom
Block - Custom
Material - Custom
Optimization - Custom
Particle Emitter - Custom
Procedural Texture - Custom
Shader Structure - Cylinder
Directed Particle Emitter - Cylinder
Particle Emitter - DDSTools
- Data
Buffer - Data
Reader - Data
Storage - Database
- Daydream
Controller - Debug
Layer - Decal
Map Configuration - Deep
Copier - DefaultKTX2
Decoder Options - Default
Loading Screen - Default
Rendering Pipeline - Deferred
- Depth
Of Field Blur Post Process - Depth
Of Field Effect - Depth
Of Field Merge Post Process - Depth
Peeling Renderer - Depth
Peeling Scene Component - Depth
Reducer - Depth
Renderer - Depth
Renderer Scene Component - Derivative
Block - Desaturate
Block - Detail
Map Configuration - Device
Event Factory - Device
Orientation Camera - Device
Source - Device
Source Manager - Directional
Light - Directional
Light Frustum Viewer - Discard
Block - Display
Pass Post Process - Distance
Block - Distance
Constraint - Distance
Joint - Divide
Block - Do
Nothing Action - Dot
Block - Draco
Compression - Dual
Shock Pad - Dump
Tools - Dynamic
Float32 Array - Dynamic
Texture - EXT_
mesh_ gpu_ instancing - Easing
Function - Edges
Renderer - Effect
- Effect
Fallbacks - Effect
Layer - Effect
Layer Scene Component - Effect
Renderer - Effect
Wrapper - Elastic
Ease - Elbow
Block - Engine
- Engine
Factory - Engine
Instrumentation - Engine
Store - Engine
View - Environment
Helper - Equi
Rectangular Cube Texture - Equi
Rectangular Cube Texture Asset Task - Event
Constants - Event
State - Execute
Code Action - Exponential
Ease - External
Texture - Extract
Highlights Post Process - Factor
Gradient - Fade
In Out Behavior - Files
Input - Files
Input Store - Filter
Post Process - Fire
Material - Fluid
Renderer - Fluid
Renderer Scene Component - Fluid
Rendering Object - Fluid
Rendering Object Custom Particles - Fluid
Rendering Object Particle System - Fluid
Rendering Target Renderer - Fly
Camera - Fly
Camera Inputs Manager - Fly
Camera Keyboard Input - Fly
Camera Mouse Input - Fog
Block - Follow
Behavior - Follow
Camera - Follow
Camera Inputs Manager - Follow
Camera Keyboard Move Input - Follow
Camera Mouse Wheel Input - Follow
Camera Pointers Input - Frag
Coord Block - Frag
Depth Block - Fragment
Output Block - Framing
Behavior - Free
Camera - Free
Camera Device Orientation Input - Free
Camera Gamepad Input - Free
Camera Inputs Manager - Free
Camera Keyboard Move Input - Free
Camera Mouse Input - Free
Camera Mouse Wheel Input - Free
Camera Touch Input - Free
Camera Virtual Joystick Input - Fresnel
Block - Fresnel
Parameters - Front
Facing Block - Frustum
- Fur
Material - Fxaa
Post Process - GLTF2
Export - GLTFData
- GLTFFile
Loader - GLTFValidation
- GPUParticle
System - Gamepad
- Gamepad
Camera - Gamepad
Manager - Gamepad
System Scene Component - GearVRController
- Generic
Controller - Generic
Pad - Geodesic
Data - Geometry
- Geometry
Buffer Renderer - Geometry
Buffer Renderer Scene Component - Gizmo
- Gizmo
Manager - Glow
Layer - Goldberg
Mesh - Gradient
Block - Gradient
Block Color Step - Gradient
Helper - Gradient
Material - Grain
Post Process - Grid
Material - Ground
Mesh - HDRCube
Texture - HDRCube
Texture Asset Task - HDRFiltering
- HDRTools
- Hand
Constraint Behavior - Hardware
Scaling Optimization - Havok
Plugin - Height
To Normal Block - Hemispheric
Light - Hemispheric
Particle Emitter - Highlight
Layer - Highlights
Post Process - Hinge2
Joint - Hinge
Constraint - Hinge
Joint - Html
Element Texture - IWebXRController
Physics Options - Image
Asset Task - Image
Processing Block - Image
Processing Configuration - Image
Processing Post Process - Image
Source Block - Increment
Value Action - Input
Block - Input
Manager - Instanced
Lines Mesh - Instanced
Mesh - Instances
Block - Instantiated
Entries - Instantiation
Tools - Internal
Texture - Interpolate
Value Action - Iridescence
Block - KHR_
lights_ punctual - KHR_
materials_ emissive_ strength - KHR_
materials_ ior - KHR_
materials_ specular - KHR_
materials_ transmission - KHR_
materials_ volume - Keep
Assets - Keyboard
Event Types - Keyboard
Info - Keyboard
Info Pre - Khronos
Texture Container - Khronos
Texture Container2 - Lava
Material - Layer
- Layer
Scene Component - Length
Block - Lens
Flare - Lens
Flare System - Lens
Flare System Scene Component - Lens
Flares Optimization - Lens
Rendering Pipeline - Lerp
Block - Light
- Light
Block - Light
Constants - Light
Gizmo - Light
Information Block - Line
Edges Renderer - Lines
Mesh - Lock
Constraint - Logger
- MTLFile
Loader - Material
- Material
Defines - Material
Flags - Material
Helper - Material
Plugin Base - Material
Plugin Manager - Material
Stencil State - Matrix
- Matrix
Builder Block - Matrix
Determinant Block - Matrix
Transpose Block - Max
Block - Merge
Meshes Optimization - Mesh
- Mesh
Asset Task - Mesh
Attribute Exists Block - Mesh
Exploder - MeshLODLevel
- Mesh
Particle Emitter - MeshUVSpace
Renderer - Meshopt
Compression - Min
Block - Min
Max Reducer - Mirror
Texture - Mix
Material - Mod
Block - Model
Shape - Morph
Target - Morph
Target Manager - Morph
Targets Block - Motion
Blur Configuration - Motion
Blur Post Process - Motor
Enabled Joint - Multi
Material - Multi
Observer - Multi
Pointer Scale Behavior - Multi
Render Target - Multiply
Block - Multiview
Render Target - NLerp
Block - Native
Data Buffer - Native
Pipeline Context - Native
Render Target Wrapper - Negate
Block - Node
- Node
Material - Node
Material Block - Node
Material Build State - Node
Material Build State Shared Data - Node
Material Connection Point - Node
Material Connection Point Custom Object - Node
Material Optimizer - Noise
Procedural Texture - Normal
Blend Block - Normal
Material - Normalize
Block - Null
Engine - Null
Engine Options - OBJExport
- OBJFile
Loader - Observable
- Observer
- Occlusion
Material - Octree
- Octree
Block - Octree
Scene Component - Oculus
Touch Controller - On
After EnteringVRObservable Event - One
Minus Block - Outline
Renderer - PBRAnisotropic
Configuration - PBRBRDFConfiguration
- PBRBase
Material - PBRBase
Simple Material - PBRClear
Coat Configuration - PBRCustom
Material - PBRIridescence
Configuration - PBRMaterial
- PBRMetallic
Roughness Block - PBRMetallic
Roughness Material - PBRSheen
Configuration - PBRSpecular
Glossiness Material - PBRSub
Surface Configuration - Panorama
To Cube Map Tools - Particle
- Particle
Blend Multiply Block - Particle
Helper - Particle
Ramp Gradient Block - Particle
System - Particle
System Set - Particle
Texture Block - Particles
Optimization - Pass
Cube Post Process - Pass
Post Process - Path2
- Path3D
- Path
Cursor - Perf
Collection Strategy - Perf
Counter - Performance
Monitor - Performance
Viewer Collector - Perturb
Normal Block - Photo
Dome - Physics6
DoFConstraint - Physics6
DoFLimit - Physics
Aggregate - Physics
Body - Physics
Constraint - Physics
Engine - Physics
Engine Scene Component - Physics
Engine V2 - Physics
Gravitational Field Event - Physics
Helper - Physics
Impostor - Physics
Joint - Physics
Radial Explosion Event - Physics
Radial Explosion Event Options - Physics
Raycast Result - Physics
Shape - Physics
Shape Box - Physics
Shape Capsule - Physics
Shape Container - Physics
Shape Convex Hull - Physics
Shape Cylinder - Physics
Shape Mesh - Physics
Shape Sphere - Physics
Updraft Event - Physics
Updraft Event Options - Physics
Vortex Event - Physics
Vortex Event Options - Picking
Info - Plane
- Plane
Drag Gizmo - Plane
Rotation Gizmo - Play
Animation Action - Play
Sound Action - Point
Light - Point
Particle Emitter - Pointer
Drag Behavior - Pointer
Event Types - Pointer
Info - Pointer
Info Base - Pointer
Info Pre - Points
Cloud System - Points
Group - Polar
- Polygon
- Polygon
Mesh Builder - Pose
Enabled Controller - Pose
Enabled Controller Helper - Position
Gizmo - Position
Normal Texture Vertex - Position
Normal Vertex - Post
Process - Post
Process Manager - Post
Process Render Effect - Post
Process Render Pipeline - Post
Process Render Pipeline Manager - Post
Process Render Pipeline Manager Scene Component - Post
Processes Optimization - Posterize
Block - Pow
Block - Power
Ease - Pre
Pass Configuration - Pre
Pass Renderer - Pre
Pass Renderer Scene Component - Precision
Date - Predicate
Condition - Pressure
Observer Wrapper - Prismatic
Constraint - Procedural
Texture - Procedural
Texture Scene Component - Quadratic
Ease - Quadratic
Error Simplification - Quartic
Ease - Quaternion
- Quintic
Ease - RGBDTexture
Tools - Random
Number Block - Raw
Cube Texture - Raw
Texture - Raw
Texture2DArray - Raw
Texture3D - Ray
- Ray
Helper - RecastJSCrowd
- RecastJSPlugin
- Reciprocal
Block - Reflect
Block - Reflection
Block - Reflection
Probe - Reflection
Texture Base Block - Reflection
Texture Block - Reflector
- Refract
Block - Refraction
Block - Refraction
Post Process - Refraction
Texture - Remap
Block - Render
Target Texture - Render
Target Wrapper - Render
Targets Optimization - Rendering
Group Info - Rendering
Manager - Replace
Color Block - Retry
Strategy - Rolling
Average - Rotate2d
Block - Rotation
Gizmo - Runtime
Animation - Runtime
Error - SSAO2
Configuration - SSAO2
Rendering Pipeline - SSAORendering
Pipeline - SSRRendering
Pipeline - STLExport
- STLFile
Loader - Scalar
- Scale
Block - Scale
Gizmo - Scene
- Scene
Depth Block - Scene
Instrumentation - Scene
Loader - Scene
Loader Flags - Scene
Optimization - Scene
Optimizer - Scene
Optimizer Options - Scene
Recorder - Scene
Serializer - Screen
Size Block - Screen
Space Block - Screen
Space Curvature Post Process - Screen
Space Reflection Post Process - Screen
Space Reflections2 Configuration - Screen
Space Reflections Configuration - Serialization
Helper - Set
Parent Action - Set
State Action - Set
Value Action - Shader
Alebdo Parts - Shader
Code Inliner - Shader
Material - Shader
Special Parts - Shader
Store - Shadow
Depth Wrapper - Shadow
Generator - Shadow
Generator Scene Component - Shadow
Light - Shadow
Map Block - Shadow
Only Material - Shadows
Optimization - Sharpen
Post Process - Sheen
Block - Simple
Material - Simplex
Perlin3DBlock - Simplication
Queue Scene Component - Simplification
Queue - Simplification
Settings - Sine
Ease - Six
Dof Drag Behavior - Size
- Skeleton
- Sky
Material - Slider
Constraint - Smart
Array - Smart
Array No Duplicate - Smooth
Step Block - Solid
Parser - Solid
Particle - Solid
Particle System - Solid
Particle Vertex - Sound
- Sound
Track - Sphere
Directed Particle Emitter - Sphere
Particle Emitter - Spherical
- Spherical
Harmonics - Spherical
Polynomial - Spot
Light - Sprite
- Sprite
Manager - Sprite
Map - Sprite
Packed Manager - Sprite
Renderer - Sprite
Scene Component - Standard
Material - Standard
Rendering Pipeline - State
Condition - Step
Block - Stereoscopic
Arc Rotate Camera - Stereoscopic
Free Camera - Stereoscopic
Gamepad Camera - Stereoscopic
Interlace Post Process - Stereoscopic
Interlace Post ProcessI - Stereoscopic
Screen Universal Camera - Stereoscopic
Universal Camera - Stick
Values - Stop
Animation Action - Stop
Sound Action - Storage
Buffer - String
Dictionary - Sub
Emitter - Sub
Mesh - Sub
Surface Block - Sub
Surface Configuration - Sub
Surface Scattering Post Process - Sub
Surface Scene Component - Subtract
Block - Surface
Magnetism Behavior - Switch
Boolean Action - TBNBlock
- Tags
- Target
Camera - Targeted
Animation - Terrain
Material - Text
File Asset Task - Texture
- Texture
Asset Task - Texture
Block - Texture
Dome - Texture
Optimization - Texture
Packer - Texture
Packer Frame - Texture
Sampler - Thin
Engine - Thin
Render Target Texture - Thin
Sprite - Thin
Texture - Timing
Tools - Tonemap
Post Process - Tools
- Touch
Camera - Trail
Mesh - Trajectory
- Trajectory
Classifier - Transcode
Result - Transform
Block - Transform
Node - Tri
Planar Block - Tri
Planar Material - Trigonometry
Block - Twirl
Block - Uniform
Buffer - Unique
Id Generator - Universal
Camera - Utility
Layer Renderer - VRCamera
Metrics - VRDevice
Orientation Arc Rotate Camera - VRDevice
Orientation Free Camera - VRDevice
Orientation Gamepad Camera - VRDistortion
Correction Post Process - VRExperience
Helper - VRMultiview
To Singleview Post Process - Validated
Native Data Stream - Value
Condition - Vector2
- Vector3
- Vector4
- Vector
Merger Block - Vector
Splitter Block - Vertex
Animation Baker - Vertex
Buffer - Vertex
Data - Vertex
Output Block - Video
Dome - Video
Recorder - Video
Texture - View
Direction Block - Viewport
- Virtual
Joystick - Virtual
Joysticks Camera - Vive
Controller - Volumetric
Light Scattering Post Process - Voronoi
Noise Block - Water
Material - Wave
Block - WebGPUEngine
- Web
Request - WebVRController
- WebVRFree
Camera - WebXRAbstract
Feature - WebXRAbstract
Motion Controller - WebXRAnchor
System - WebXRBackground
Remover - WebXRCamera
- WebXRController
Component - WebXRController
Movement - WebXRController
Physics - WebXRController
Pointer Selection - WebXRDefault
Experience - WebXRDefault
Experience Options - WebXRDepth
Sensing - WebXRDom
Overlay - WebXREnter
ExitUI - WebXREnter
ExitUIButton - WebXREnter
ExitUIOptions - WebXRExperience
Helper - WebXREye
Tracking - WebXRFeature
Name - WebXRFeature
Point System - WebXRFeatures
Manager - WebXRGeneric
Hand Controller - WebXRGeneric
Trigger Motion Controller - WebXRHTCVive
Motion Controller - WebXRHand
- WebXRHand
Tracking - WebXRHit
Test - WebXRHit
Test Legacy - WebXRImage
Tracking - WebXRInput
- WebXRInput
Source - WebXRLayers
- WebXRLight
Estimation - WebXRManaged
Output Canvas - WebXRManaged
Output Canvas Options - WebXRMesh
Detector - WebXRMicrosoft
Mixed Reality Controller - WebXRMotion
Controller Manager - WebXRMotion
Controller Teleportation - WebXRNear
Interaction - WebXROculus
Touch Motion Controller - WebXRPlane
Detector - WebXRProfiled
Motion Controller - WebXRSession
Manager - WebXRWalking
Locomotion - Weighted
Sound - Windows
Motion Controller - Worker
Pool - Worley
Noise3DBlock - XRWindows
Motion Controller - Xbox360
Pad - _
Basis Texture Loader
Interfaces
- Auto
Release Worker Pool Options - Behavior
- Buffer
Image Data - Camera
Inputs Map - Create
Env Texture Options - Cube
Map Info - DDSInfo
- Depth
Texture Creation Options - Device
Pose - Distance
Joint Data - Effect
Wrapper Creation Options - Engine
Capabilities - Engine
Options - Environment
Texture Info V1 - Environment
Texture Info V2 - Environment
Texture Specular Info V1 - Gamepad
Button Changes - Gizmo
Axis Cache - Glslang
Options - HDRInfo
- Host
Information - IAccessibility
Tag - IAction
- IAction
Event - IAgent
Parameters - IAnimatable
- IAnimation
Key - IAssets
Progress Event - IAudio
Engine - IAudio
Engine Options - IAxis
Drag Gizmo - IAxis
Scale Gizmo - IBaked
Vertex Animation Manager - IBehavior
Aware - IBone
Weight Shader Options - IBounding
Box Gizmo - ICamera
Gizmo - ICamera
Input - ICanvas
- ICanvas
Gradient - ICanvas
Rendering Context - IClip
Planes Holder - ICompressed
Format Capabilities - ICompute
Effect Creation Options - ICompute
Pipeline Context - ICompute
Shader Options - ICreate
Capsule Options - ICrowd
- ICullable
- ICustom
Animation Frame Requester - ICustom
Shader Name Resolve Options - ICustom
Shader Options - IData
Buffer - IDecision
Tree - IDecoded
Data - IDevice
Input System - IDisplay
Changed Event Args - IDisposable
- IDraco
Compression Configuration - IEasing
Function - IEdges
Renderer - IEdges
Renderer Options - IEditable
Property List Option - IEditable
Property Option - IEffect
Creation Options - IEffect
Fallbacks - IEffect
Layer Options - IEffect
Renderer Options - IEnvironment
Helper Options - IExplorer
Additional Child - IExplorer
Additional Node - IExplorer
Extensibility Group - IExplorer
Extensibility Option - IExport
Options - IFile
Request - IFluid
Rendering Render Object - IFont
Data - IGLTFLoader
Data - IGLTFLoader
Extension - IGLTFValidation
Configuration - IGet
Set Vertices Data - IGizmo
- IGlow
Layer Options - IGlyph
Data - IHDRFiltering
Options - IHighlight
Layer Options - IHtml
Element Texture Options - IIOption
Shadow Depth Material - IImage
- IInspectable
- IInspectable
Options - IInspector
Context Menu Item - IInspector
Options - IInternal
Texture Loader - IKTX2
Decoder Options - IKeyboard
Event - ILeaf
- ILight
Gizmo - ILoading
Screen - IMaterial
Compilation Options - IMeshUVSpace
Renderer Options - IMeshopt
Compression Configuration - IMinimal
Motion Controller Object - IMipmap
- IMotion
Controller Button Mesh Map - IMotion
Controller Layout - IMotion
Controller Layout Map - IMotion
Controller Mesh Map - IMotion
Controller Profile - IMotor
Enabled Joint - IMouse
Event - IMulti
Render Target Options - INav
Mesh Parameters - INavigation
Engine Plugin - INode
- INode
Material Editor Options - INode
Material Options - IObstacle
- IOctree
Container - IOffline
Provider - IParticle
Emitter Type - IParticle
System - IPerf
Custom Event - IPerf
Datasets - IPerf
Metadata - IPerf
Viewer Collection Strategy - IPerformance
Viewer Strategy Parameter - IPhysics
Collision Event - IPhysics
Enabled Object - IPhysics
Engine - IPipeline
Context - IPlane
Drag Gizmo - IPlane
Rotation Gizmo - IPointer
Event - IPosition
Gizmo - IProperty
Description For Edition - IQuaternion
Like - IRegistered
Plugin - IRender
Target Texture - IRendering
Manager Auto Clear Setup - IRotation
Gizmo - IScale
Gizmo - IScene
Component - IScene
Loader Async Result - IScene
Loader Plugin - IScene
Loader Plugin Async - IScene
Loader Plugin Base - IScene
Loader Plugin Extensions - IScene
Loader Plugin Factory - IScene
Loader Progress Event - IScene
Serializable Component - IScreenshot
Size - IShader
Material Options - IShadow
Generator - IShadow
Light - ISimplification
Settings - ISimplification
Task - ISimplifier
- ISize
- ISkeleton
Map Shader Color Map Knot - ISkeleton
Map Shader Options - ISkeleton
Viewer Display Options - ISkeleton
Viewer Options - ISmart
Array Like - ISortable
Light - ISound
Options - ISound
Track Options - ISpriteJSONAtlas
- ISpriteJSONSprite
- ISpriteJSONSprite
Frame Data - ISpriteJSONSprite
Source Size - ISprite
Manager - ISprite
Map - ISprite
Map Options - IText
Metrics - ITexture
Asset Task - ITexture
Creation Options - ITexture
Packer Frame - ITexture
PackerJSON - ITexture
Packer Options - ITimer
Data - ITimer
Options - IUIEvent
- IVRPresentation
Attributes - IValue
Gradient - IViewport
Owner Like - IWeb
Request - IWebXRAnchor
- IWebXRAnchor
System Options - IWebXRBackground
Remover Options - IWebXRController
Movement Options - IWebXRController
Options - IWebXRController
Pointer Selection Options - IWebXRDepth
Sensing Options - IWebXRDom
Overlay Options - IWebXRFeature
- IWebXRFeature
Point - IWebXRHand
Tracking Options - IWebXRHit
Result - IWebXRHit
Test Feature - IWebXRHit
Test Options - IWebXRImage
Tracking Options - IWebXRInput
Options - IWebXRLayers
Options - IWebXRLegacy
Hit Result - IWebXRLegacy
Hit Test Options - IWebXRLight
Estimation - IWebXRLight
Estimation Options - IWebXRMesh
Detector Options - IWebXRMotion
Controller Axes Value - IWebXRMotion
Controller Component Changes - IWebXRMotion
Controller Component Changes Values - IWebXRNear
Interaction Options - IWebXRPlane
- IWebXRPlane
Detector Options - IWebXRRender
Target Texture Provider - IWebXRTeleportation
Options - IWebXRTracked
Image - IWebXRVertex
Data - IWebXRWalking
Locomotion Options - IWheel
Event - IXYZ
- Instancing
Attribute Info - Internal
Texture Creation Options - Mutable
Gamepad Button - Native
Engine Options - Physic
Shape Options - Physics
Affected Body With Data - Physics
Affected Impostor With Data - Physics
Aggregate Parameters - Physics
Constraint Parameters - Physics
Gravitational Field Event Data - Physics
Hit Data - Physics
Impostor Joint - Physics
Impostor Parameters - Physics
Joint Data - Physics
Mass Properties - Physics
Material - Physics
Radial Explosion Event Data - Physics
Shape Parameters - Physics
Updraft Event Data - Physics
Vortex Event Data - Plane
Rotation Gizmo Options - Pointer
Touch - Pose
Controlled - Pre
Pass Effect Configuration - Render
Target Creation Options - Render
Target Texture Options - Rotation
Gizmo Options - Scene
Options - Spring
Joint Data - Thin
Engine Options - Twgsl
Options - VRExperience
Helper Options - VRTeleportation
Options - Video
Recorder Options - Video
Texture Settings - Virtual
Joystick Customizations - WebGPUEngine
Options - WebVROptions
- WebXRRender
Target - WebXRSpectator
Mode Option
Type Aliases
- AcceptedARIA
- Accepted
Role - Babylon
File Parser - Camera
Stage Action - Camera
Stage Frame Buffer Action - Compute
Binding Location - Compute
Binding Mapping - Coroutine
Base - Data
Array - Deep
Immutable - Deep
Immutable Object - Device
Input - Device
Source Event - Device
Source Type - Distribute
- Environment
Texture Info - Error
Codes Type - Evaluate
Sub Mesh Stage Action - Float
Array - Get
Depth In Meters Type - Goldberg
Creation Option - Goldberg
Data - Goldberg
Vertex Data Option - IFresnel
Parameters Creation Options - IFresnel
Parameters Serialized - IInspector
Context Menu Type - Immutable
- Indices
Array - Individual
Babylon File Parser - Matrix
Constructor - Mesh
Stage Action - Motion
Controller Component State Type - Motion
Controller Component Type - Motion
Controller Constructor - Motion
Controller Handedness - Native
Framebuffer - Native
Program - Native
Texture - Native
Uniform - Native
Vertex Array Object - Node
Constructor - Node
Material Texture Blocks - Nullable
- OBJLoading
Options - Perf
Strategy Initialization - Plugin
Material Factory - Pointer
Move Stage Action - Pointer
Up Down Stage Action - Post
Process Custom Shader Code Processing - Post
Process Options - Pre
Active Mesh Stage Action - Primitive
- Quaternion
Constructor - Render
Target Stage Action - Render
Target Texture Size - Render
Targets Stage Action - Rendering
Group Stage Action - Rendering
Mesh Stage Action - Scene
Loader Success Callback - Shader
Custom Processing Function - Simple
Stage Action - Texture
Size - Triangle
Picking Predicate - Vector2
Constructor - Vector3
Constructor - Vector4
Constructor - Virtual
Mesh Info - WebXRComposition
Layer Type - WebXRController
Movement Feature Context - WebXRController
Movement Registration Configuration - WebXRController
Movement State - WebXRDepth
Data Format - WebXRDepth
Usage - WebXRDom
Overlay Type - WebXRFeature
Constructor - WebXRLayer
Type - XRHand
Mesh Rig Mapping - double
- float
- int
Variables
- BRDFTexture
Tools - Basis
Tools - Basis
Tools Options - Box
Builder - Capsule
Builder - Copy
Tools - Cylinder
Builder - Decal
Builder - Disc
Builder - Dom
Management - Environment
Texture Tools - Epsilon
- Error
Codes - GUID
- Ground
Builder - Hemisphere
Builder - Ico
Sphere Builder - Lathe
Builder - Lines
Builder - Mesh
Builder - PHI
- Plane
Builder - Polygon
Builder - Polyhedron
Builder - Ribbon
Builder - Screenshot
Tools - Shape
Builder - Sphere
Builder - String
Tools - TGATools
- Texture
Tools - Tiled
Box Builder - Tiled
Plane Builder - To
Gamma Space - To
Linear Space - Torus
Builder - Torus
Knot Builder - Tube
Builder - renderable
Texture Format To Index
Functions
- Apply
Post Process - Create
Box - Create
Box Vertex Data - Create
Capsule - Create
Capsule Vertex Data - Create
Cylinder - Create
Cylinder Vertex Data - Create
Dashed Lines - Create
Dashed Lines Vertex Data - Create
Decal - Create
Disc - Create
Disc Vertex Data - Create
Env Texture Async - Create
Geodesic - Create
Goldberg - Create
Goldberg Vertex Data - Create
Ground - Create
Ground From Height Map - Create
Ground From Height Map Vertex Data - Create
Ground Vertex Data - Create
Hemisphere - Create
Ico Sphere - Create
Ico Sphere Vertex Data - Create
Image Data Array Buffer Views - Create
Lathe - Create
Line System - Create
Line System Vertex Data - Create
Lines - Create
Plane - Create
Plane Vertex Data - Create
Polygon - Create
Polygon Vertex Data - Create
Polyhedron - Create
Polyhedron Vertex Data - Create
Resized Copy - Create
Ribbon - Create
Ribbon Vertex Data - Create
Screenshot - Create
Screenshot Async - Create
Screenshot Using Render Target - Create
Screenshot Using Render Target Async - Create
Screenshot With Resize Async - Create
Sphere - Create
Sphere Vertex Data - Create
Text - Create
Tiled Box - Create
Tiled Box Vertex Data - Create
Tiled Ground - Create
Tiled Ground Vertex Data - Create
Tiled Plane - Create
Tiled Plane Vertex Data - Create
Torus - Create
Torus Knot - Create
Torus Knot Vertex Data - Create
Torus Vertex Data - Create
Tube - Decode
- Decode
Base64 To Binary - Decode
Base64 To String - Encode
Array Buffer To Base64 - Ends
With - Escape
Reg Exp - Extract
Between Markers - Extrude
Polygon - Extrude
Shape - Extrude
Shape Custom - Find
Backward - From
Half Float - Generate
Base64 String From Pixel Data - Generate
Base64 String From Texture - Generate
Base64 String From Texture Async - GetDOMText
Content - Get
Env Info - Get
EnvironmentBRDFTexture - Get
Internal Format From Basis Format - GetTGAHeader
- Is
Document Available - Is
Identifier Char - Is
Navigator Available - Is
Window Object Exist - Load
Texture From Transcode Result - Pad
Number - RandomGUID
- Register
Material Plugin - Remove
Comments - Skip
Whitespaces - Starts
With - Test
Base64 Data Url - To
Half Float - Transcode
Async - Unregister
All Material Plugins - Unregister
Material Plugin - Upload
Env Levels Async - Upload
Env Spherical - Upload
Levels Async - allocate
And Copy Typed Buffer - class
Name - create
Detail Map Plugin - createPBRAnisotropic
Plugin - createPBRBRDFPlugin
- createPBRClear
Coat Plugin - createPBRIridescence
Plugin - createPBRSheen
Plugin - createPBRSub
Surface Plugin - editable
In Property Page - expand
To Property - extract
Min And Max - extract
Min And Max Indexed - serialize
- serialize
As Camera Reference - serialize
As Color3 - serialize
As Color4 - serialize
As Color Curves - serialize
As Fresnel Parameters - serialize
As Image Processing Configuration - serialize
As Matrix - serialize
As Mesh Reference - serialize
As Quaternion - serialize
As Texture - serialize
As Vector2 - serialize
As Vector3 - set
And Start Timer
Type Aliases
AcceptedARIA
Accepted Role
Babylon File Parser
Type declaration
Parameters
parsedData: any
scene: Scene
container: AssetContainer
rootUrl: string
Returns void
Camera Stage Action
Type declaration
Strong typing of a Camera related stage step action
Parameters
camera: Camera
Returns void
Camera Stage Frame Buffer Action
Type declaration
Strong typing of a Camera Frame buffer related stage step action
Parameters
camera: Camera
Returns boolean
Compute Binding Location
Type used to locate a resource in a compute shader. TODO: remove this when browsers support reflection for wgsl shaders
Type declaration
binding: number
group: number
Compute Binding Mapping
Type used to lookup a resource and retrieve its binding location TODO: remove this when browsers support reflection for wgsl shaders
Type declaration
[key: string]: ComputeBindingLocation
Coroutine Base
A Coroutine is the intersection of:
- An Iterator that yields void, returns a T, and is not passed values with calls to next.
- An IterableIterator of void (since it only yields void).
Type Parameters
TStep
TReturn
Data Array
Alias for types that can be used by a Buffer or VertexBuffer.
Deep Immutable
Type modifier to make all the properties of an object Readonly recursively
Type Parameters
T
Deep Immutable Object
Type modifier to make object properties readonly.
Type Parameters
T
Device Input
Type to handle enforcement of inputs
Type Parameters
T extends DeviceType
Device Source Event
Subset of DeviceInput that only handles pointers and keyboard
Type Parameters
T extends DeviceType
Device Source Type
Distribute
Type Parameters
T
Environment Texture Info
Raw texture data and descriptor sufficient for WebGL texture upload
Error Codes Type
Error code type
Evaluate Sub Mesh Stage Action
Type declaration
Strong typing of a Evaluate Sub Mesh related stage step action
Parameters
mesh: AbstractMesh
subMesh: SubMesh
Returns void
Float Array
Alias type for number array or Float32Array
Get Depth In Meters Type
Type declaration
Parameters
x: number
y: number
Returns number
Goldberg Creation Option
Defines the set of data required to create a goldberg mesh.
Goldberg Data
Defines the set of goldberg data used to create the polygon
Type declaration
adjacent
Faces: number[][] Defines the number of adjacent faces per goldberg faces
face
Centers: Vector3[] The list of Goldberg faces centers
face
Colors: Color4[] The list of Goldberg faces colors
face
Xaxis: Vector3[] The list of Goldberg faces Y axis
face
Yaxis: Vector3[] The list of Goldberg faces X axis
face
Zaxis: Vector3[] The list of Goldberg faces Z axis
nb
Faces: number Defines the total number of goldberg faces
nb
Faces At Pole: number Defines the number of goldberg faces at the pole
nb
Shared Faces: number Defines the number of shared faces
nb
Unshared Faces: number Defines the number of unshared faces
Goldberg Vertex Data Option
Defines the set of data required to create goldberg vertex data.
Type declaration
Optional side
Orientation?: number optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
Optional size?: number
the size of the Goldberg, optional default 1
Optional sizeX?: number
allows stretching in the x direction, optional, default size
Optional sizeY?: number
allows stretching in the y direction, optional, default size
Optional sizeZ?: number
allows stretching in the z direction, optional, default size
IFresnel Parameters Creation Options
Options to be used when creating a FresnelParameters.
Type declaration
Optional bias?: number
Define bias applied to computed fresnel term
Optional is
Enabled?: boolean Define if the fresnel effect is enable or not.
Optional left
Color?: Color3 Define the color used on edges (grazing angle)
Optional power?: number
Defined the power exponent applied to fresnel term
Optional right
Color?: Color3 Define the color used on center
IFresnel Parameters Serialized
Serialized format for FresnelParameters.
Type declaration
bias: number
Define bias applied to computed fresnel term
is
Enabled: boolean Define if the fresnel effect is enable or not.
left
Color: number[] Define the color used on edges (grazing angle) [as an array]
Optional power?: number
Defined the power exponent applied to fresnel term
right
Color: number[] Define the color used on center [as an array]
IInspector Context Menu Type
Immutable
Type modifier to make all the properties of an object Readonly
Type Parameters
T
Indices Array
Alias type for number array or Float32Array or Int32Array or Uint32Array or Uint16Array
Individual Babylon File Parser
Type declaration
Defines how the individual parser contract is defined. These parser can parse an individual asset
Parameters
parsedData: any
scene: Scene
rootUrl: string
Returns any
Matrix Constructor
Type Parameters
T extends Matrix
Type declaration
Returns T
Mesh Stage Action
Type declaration
Strong typing of a Mesh related stage step action
Parameters
mesh: AbstractMesh
hardwareInstancedRendering: boolean
Returns boolean
Motion Controller Component State Type
The state of a controller component
Motion Controller Component Type
The type of components available in motion controllers. This is not the name of the component.
Motion Controller Constructor
Type declaration
A construction function type to create a new controller based on an xrInput object
Parameters
xrInput: XRInputSource
scene: Scene
Returns WebXRAbstractMotionController
Motion Controller Handedness
Handedness type in xrInput profiles. These can be used to define layouts in the Layout Map.
Native Framebuffer
Native Program
Native Texture
Native Uniform
Native Vertex Array Object
Node Constructor
Node Material Texture Blocks
Blocks that manage a texture
Nullable
Alias type for value that can be null
Type Parameters
T
OBJLoading Options
Options for loading OBJ/MTL files
Type declaration
UVScaling: Vector2
Defines custom scaling of UV coordinates of loaded meshes.
compute
Normals: boolean Compute the normals for the model, even if normals are present in the file.
import
Vertex Colors: boolean Include in meshes the vertex colors available in some OBJ files. This is not part of OBJ standard.
invert
TextureY: boolean Invert Y-Axis of referenced textures on load
invertY: boolean
Invert model on y-axis (does a model scaling inversion)
material
Loading Fails Silently: boolean When a material fails to load OBJ loader will silently fail and onSuccess() callback will be triggered.
optimize
Normals: boolean Optimize the normals for the model. Lighting can be uneven if you use OptimizeWithUV = true because new vertices can be created for the same location if they pertain to different faces. Using OptimizehNormals = true will help smoothing the lighting by averaging the normals of those vertices.
optimize
WithUV: boolean Defines if UVs are optimized by default during load.
skip
Materials: boolean Skip loading the materials even if defined in the OBJ file (materials are ignored).
Perf Strategy Initialization
Type declaration
Initializer callback for a strategy
Parameters
scene: Scene
Returns IPerfViewerCollectionStrategy
Plugin Material Factory
Type declaration
Type for plugin material factories.
Parameters
material: Material
Returns Nullable<MaterialPluginBase>
Pointer Move Stage Action
Type declaration
Strong typing of a pointer move action.
Parameters
unTranslatedPointerX: number
unTranslatedPointerY: number
pickResult: Nullable<PickingInfo>
isMeshPicked: boolean
element: Nullable<HTMLElement>
Returns Nullable<PickingInfo>
Pointer Up Down Stage Action
Type declaration
Strong typing of a pointer up/down action.
Parameters
unTranslatedPointerX: number
unTranslatedPointerY: number
pickResult: Nullable<PickingInfo>
evt: IPointerEvent
doubleClick: boolean
Returns Nullable<PickingInfo>
Post Process Custom Shader Code Processing
Allows for custom processing of the shader code used by a post process
Type declaration
bind
Custom Bindings?:function If provided, will be called when binding inputs to the shader code to allow the user to add custom bindings
Parameters
postProcessName: string
effect: Effect
Returns void
define
Custom Bindings?:function process
Code After Includes?:function If provided, will be called two times with the vertex and fragment code so that this code can be updated after the #include have been processed
Parameters
postProcessName: string
shaderType: string
code: string
Returns string
process
Final Code?:function If provided, will be called two times with the vertex and fragment code so that this code can be updated before it is compiled by the GPU
Parameters
postProcessName: string
shaderType: string
code: string
Returns string
Post Process Options
Size options for a post process
Type declaration
height: number
width: number
Pre Active Mesh Stage Action
Type declaration
Strong typing of a pre active Mesh related stage step action
Parameters
mesh: AbstractMesh
Returns void
Primitive
Alias type for primitive types
Quaternion Constructor
Type Parameters
T extends Quaternion
Type declaration
Parameters
Rest ...args: ConstructorParameters<typeof Quaternion>
Returns T
Render Target Stage Action
Type declaration
Strong typing of a Render Target related stage step action
Parameters
renderTarget: RenderTargetTexture
Optional faceIndex: number
Optional layer: number
Returns void
Render Target Texture Size
Type used to define a texture size (either with a number or with a rect width and height)
Render Targets Stage Action
Type declaration
Strong typing of a render target action.
Parameters
renderTargets: SmartArrayNoDuplicate<RenderTargetTexture>
Returns void
Rendering Group Stage Action
Type declaration
Strong typing of a RenderingGroup related stage step action
Parameters
renderingGroupId: number
Returns void
Rendering Mesh Stage Action
Scene Loader Success Callback
Type declaration
Type used for the success callback of ImportMesh
Parameters
meshes: AbstractMesh[]
particleSystems: IParticleSystem[]
skeletons: Skeleton[]
animationGroups: AnimationGroup[]
transformNodes: TransformNode[]
geometries: Geometry[]
lights: Light[]
Returns void
Shader Custom Processing Function
Type declaration
Function for custom code generation
Parameters
shaderType: string
code: string
Returns string
Simple Stage Action
Type declaration
Strong typing of a simple stage step action
Returns void
Texture Size
Type used to define a texture size (either with a number or with a rect width and height)
Triangle Picking Predicate
Vector2 Constructor
Type Parameters
T extends Vector2
Type declaration
Parameters
Rest ...args: ConstructorParameters<typeof Vector2>
Returns T
Vector3 Constructor
Type Parameters
T extends Vector3
Type declaration
Parameters
Rest ...args: ConstructorParameters<typeof Vector3>
Returns T
Vector4 Constructor
Type Parameters
T extends Vector4
Type declaration
Parameters
Rest ...args: ConstructorParameters<typeof Vector4>
Returns T
Virtual Mesh Info
Data store to track virtual pointers movement
Type declaration
drag
Mesh: AbstractMesh dragging: boolean
last
Drag Position: Vector3 last
Origin Position: Vector3 moving: boolean
origin
Mesh: AbstractMesh pivot
Mesh: AbstractMesh starting
Orientation: Quaternion starting
Pivot Orientation: Quaternion starting
Pivot Position: Vector3 starting
Position: Vector3
WebXRComposition Layer Type
Covers all supported subclasses of WebXR's XRCompositionLayer
WebXRController Movement Feature Context
Feature context is used in handlers and on each XR frame to control the camera movement/direction.
Type declaration
movement
Enabled: boolean movement
Orientation Follows Viewer Pose: boolean movement
Speed: number movement
Threshold: number rotation
Enabled: boolean rotation
Speed: number rotation
Threshold: number
WebXRController Movement Registration Configuration
Button of Axis Handler must be specified.
WebXRController Movement State
Current state of Movements shared across components and handlers.
Type declaration
moveX: number
moveY: number
rotateX: number
rotateY: number
WebXRDepth Data Format
WebXRDepth Usage
WebXRDom Overlay Type
Type of DOM overlay provided by UA.
WebXRFeature Constructor
Type declaration
Defining the constructor of a feature. Used to register the modules.
Parameters
xrSessionManager: WebXRSessionManager
Optional options: any
Returns (() => IWebXRFeature)
Returns IWebXRFeature
WebXRLayer Type
Covers all supported subclasses of WebXR's XRLayer
XRHand Mesh Rig Mapping
A type encapsulating a dictionary mapping WebXR joints to bone names in a rigged hand mesh.
double
Alias type for number that are doubles.
float
Alias type for number that are floats
int
Alias type for number that are integer
Variables
BRDFTexture Tools
Class used to host texture specific utilities
Type declaration
Get
EnvironmentBRDFTexture:function Gets a default environment BRDF for MS-BRDF Height Correlated BRDF
Parameters
scene: Scene
defines the hosting scene
Returns BaseTexture
the environment BRDF texture
Basis Tools
Used to load .Basis files See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
Type declaration
JSModuleURL: string
URL to use when loading the basis transcoder
Wasm
ModuleURL: string URL to use when loading the wasm module for the transcoder
Get
Internal Format From Basis Format:function Get the internal format to be passed to texImage2D corresponding to the .basis format value
Parameters
basisFormat: number
format chosen from GetSupportedTranscodeFormat
engine: Engine
Returns number
internal format corresponding to the Basis format
Load
Texture From Transcode Result:function Loads a texture from the transcode result
Parameters
texture: InternalTexture
texture load to
transcodeResult: TranscodeResult
the result of transcoding the basis file to load from
Returns void
Transcode
Async:function Transcodes a loaded image file to compressed pixel data
Parameters
data: ArrayBufferView | ArrayBuffer
image data to transcode
config: BasisTranscodeConfiguration
configuration options for the transcoding
Returns Promise<TranscodeResult>
a promise resulting in the transcoded image
Basis Tools Options
Used to load .Basis files See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
Type declaration
JSModuleURL: string
URL to use when loading the basis transcoder
Wasm
ModuleURL: string URL to use when loading the wasm module for the transcoder
Box Builder
Class containing static functions to help procedurally build meshes
Capsule Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Capsule: typeof BABYLON.CreateCapsule
Copy Tools
Class used to host copy specific utilities (Back-compat)
Type declaration
Generate
Base64 String From Pixel Data: typeof GenerateBase64StringFromPixelData Transform some pixel data to a base64 string
Generate
Base64 String From Texture: typeof GenerateBase64StringFromTexture Reads the pixels stored in the webgl texture and returns them as a base64 string
Generate
Base64 String From Texture Async: typeof GenerateBase64StringFromTextureAsync Reads the pixels stored in the webgl texture and returns them as a base64 string
Cylinder Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Cylinder: typeof BABYLON.CreateCylinder
Decal Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Decal: typeof BABYLON.CreateDecal
Disc Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Disc: typeof BABYLON.CreateDisc
Dom Management
Sets of helpers dealing with the DOM and some of the recurrent functions needed in Babylon.js
Type declaration
GetDOMText
Content: typeof GetDOMTextContent Extracts text content from a DOM element hierarchy
Is
Document Available: typeof IsDocumentAvailable Check if the document object exists
Is
Navigator Available: typeof IsNavigatorAvailable Checks if the navigator object exists
Is
Window Object Exist: typeof IsWindowObjectExist Checks if the window object exists
Environment Texture Tools
Sets of helpers addressing the serialization and deserialization of environment texture stored in a BabylonJS env file. Those files are usually stored as .env files.
Type declaration
Create
Env Texture Async: typeof CreateEnvTextureAsync Creates an environment texture from a loaded cube texture.
Create
Image Data Array Buffer Views: typeof CreateImageDataArrayBufferViews Creates the ArrayBufferViews used for initializing environment texture image data.
Get
Env Info: typeof GetEnvInfo Gets the environment info from an env file.
Upload
Env Levels Async: typeof UploadEnvLevelsAsync Uploads the texture info contained in the env file to the GPU.
Upload
Env Spherical: typeof UploadEnvSpherical Uploads spherical polynomials information to the texture.
Upload
Levels Async: typeof UploadLevelsAsync Uploads the levels of image data to the GPU.
Const Epsilon
Constant used to define the minimal number value in Babylon.js
Error Codes
Error codes for BaseError
Type declaration
Readonly GLTFLoader
Unexpected Magic Error: 2000 Unexpected magic number found in GLTF file header.
Readonly Load
File Error: 4000 Load file error
Readonly Mesh
Invalid Positions Error: 0 Invalid or empty mesh vertex positions.
Readonly Read
File Error: 4002 Read file error
Readonly Request
File Error: 4001 Request file error
Readonly Scene
Loader Error: 3000 SceneLoader generic error code. Ideally wraps the inner exception.
Readonly Unsupported
Texture Error: 1000 Unsupported texture found.
GUID
Class used to manipulate GUIDs
Type declaration
Random
Id: typeof RandomGUID Implementation from http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#answer-2117523 Be aware Math.random() could cause collisions, but: "All but 6 of the 128 bits of the ID are randomly generated, which means that for any two ids, there's a 1 in 2^^122 (or 5.3x10^^36) chance they'll collide"
Ground Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Ground: typeof BABYLON.CreateGround Create
Ground From Height Map: typeof BABYLON.CreateGroundFromHeightMap Create
Tiled Ground: typeof BABYLON.CreateTiledGround
Hemisphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Hemisphere: typeof BABYLON.CreateHemisphere
Ico Sphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Ico Sphere: typeof BABYLON.CreateIcoSphere
Lathe Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Lathe: typeof BABYLON.CreateLathe
Lines Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Dashed Lines: typeof BABYLON.CreateDashedLines Create
Line System: typeof CreateLineSystem Create
Lines: typeof BABYLON.CreateLines
Mesh Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Box: typeof BABYLON.CreateBox Create
Capsule: typeof BABYLON.CreateCapsule Create
Cylinder: typeof BABYLON.CreateCylinder Create
Dashed Lines: typeof BABYLON.CreateDashedLines Create
Decal: typeof BABYLON.CreateDecal Create
Disc: typeof BABYLON.CreateDisc Create
Geodesic: typeof CreateGeodesic Create
Goldberg: typeof CreateGoldberg Create
Ground: typeof BABYLON.CreateGround Create
Ground From Height Map: typeof BABYLON.CreateGroundFromHeightMap Create
Ico Sphere: typeof BABYLON.CreateIcoSphere Create
Lathe: typeof BABYLON.CreateLathe Create
Line System: typeof CreateLineSystem Create
Lines: typeof BABYLON.CreateLines Create
Plane: typeof BABYLON.CreatePlane Create
Polygon: typeof BABYLON.CreatePolygon Create
Polyhedron: typeof BABYLON.CreatePolyhedron Create
Ribbon: typeof BABYLON.CreateRibbon Create
Sphere: typeof BABYLON.CreateSphere Create
Text: typeof CreateText Create
Tiled Box: typeof CreateTiledBox Create
Tiled Ground: typeof BABYLON.CreateTiledGround Create
Tiled Plane: typeof CreateTiledPlane Create
Torus: typeof BABYLON.CreateTorus Create
Torus Knot: typeof BABYLON.CreateTorusKnot Create
Tube: typeof BABYLON.CreateTube Extrude
Polygon: typeof BABYLON.ExtrudePolygon Extrude
Shape: typeof BABYLON.ExtrudeShape Extrude
Shape Custom: typeof BABYLON.ExtrudeShapeCustom
PHI
Constant Golden Ratio value in Babylon.js
Plane Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Plane: typeof BABYLON.CreatePlane
Polygon Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Polygon: typeof BABYLON.CreatePolygon Extrude
Polygon: typeof BABYLON.ExtrudePolygon
Polyhedron Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Polyhedron: typeof BABYLON.CreatePolyhedron
Ribbon Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Ribbon: typeof BABYLON.CreateRibbon
Screenshot Tools
Class containing a set of static utilities functions for screenshots
Type declaration
Create
Screenshot: typeof CreateScreenshot Captures a screenshot of the current rendering
Create
Screenshot Async: typeof CreateScreenshotAsync Captures a screenshot of the current rendering
Create
Screenshot Using Render Target: typeof CreateScreenshotUsingRenderTarget Generates an image screenshot from the specified camera.
Create
Screenshot Using Render Target Async: typeof CreateScreenshotUsingRenderTargetAsync Generates an image screenshot from the specified camera.
Create
Screenshot With Resize Async: typeof CreateScreenshotWithResizeAsync Captures a screenshot of the current rendering for a specific size. This will render the entire canvas but will generate a blink (due to canvas resize)
Shape Builder
Class containing static functions to help procedurally build meshes
Type declaration
Extrude
Shape: typeof BABYLON.ExtrudeShape Extrude
Shape Custom: typeof BABYLON.ExtrudeShapeCustom
Sphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Sphere: typeof BABYLON.CreateSphere
String Tools
Helper to manipulate strings
Type declaration
Decode:function
Parameters
buffer: Uint8Array | Uint16Array
Returns string
Decode
Base64 To Binary:function Parameters
base64Data: string
Returns ArrayBuffer
Decode
Base64 To String:function Parameters
base64Data: string
Returns string
Encode
Array Buffer To Base64:function Parameters
buffer: ArrayBufferView | ArrayBuffer
Returns string
Ends
With:function Parameters
str: string
suffix: string
Returns boolean
Pad
Number:function Parameters
num: number
length: number
Returns string
Starts
With:function Parameters
str: string
suffix: string
Returns boolean
TGATools
Based on jsTGALoader - Javascript loader for TGA file By Vincent Thibault
Type declaration
GetTGAHeader: typeof GetTGAHeader
Gets the header of a TGA file
Texture Tools
Class used to host texture specific utilities
Type declaration
Apply
Post Process: typeof ApplyPostProcess Apply a post process to a texture
Create
Resized Copy: typeof CreateResizedCopy Uses the GPU to create a copy texture rescaled at a given size
From
Half Float: typeof FromHalfFloat Converts a half float to a number
To
Half Float: typeof ToHalfFloat Converts a number to half float
Tiled Box Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Tiled Box: typeof CreateTiledBox
Tiled Plane Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Tiled Plane: typeof CreateTiledPlane
To Gamma Space
Constant used to convert a value to gamma space
Const To Linear Space
Constant used to convert a value to linear space
Torus Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Torus: typeof BABYLON.CreateTorus
Torus Knot Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Torus Knot: typeof BABYLON.CreateTorusKnot
Tube Builder
Class containing static functions to help procedurally build meshes
Type declaration
Create
Tube: typeof BABYLON.CreateTube
renderable Texture Format To Index
Map a (renderable) texture format (GPUTextureFormat) to an index for fast lookup (in caches for eg)
Type declaration
[name: string]: number
Functions
Apply Post Process
Apply a post process to a texture
Parameters
postProcessName: string
name of the fragment post process
internalTexture: InternalTexture
the texture to encode
scene: Scene
the scene hosting the texture
Optional type: number
type of the output texture. If not provided, use the one from internalTexture
Optional samplingMode: number
sampling mode to use to sample the source texture. If not provided, use the one from internalTexture
Optional format: number
format of the output texture. If not provided, use the one from internalTexture
Optional width: number
Optional height: number
Returns Promise<InternalTexture>
a promise with the internalTexture having its texture replaced by the result of the processing
Create Box
Creates a box mesh
- The parameter
size
sets the size (float) of each box side (default 1) - You can set some different box dimensions by using the parameters
width
,height
anddepth
(all by default have the same value ofsize
) - You can set different colors and different images to each box side by using the parameters
faceColors
(an array of 6 Color3 elements) andfaceUV
(an array of 6 Vector4 elements) - Please read this tutorial : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace
- You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; bottomBaseAt?: number; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; topBaseAt?: number; updatable?: boolean; width?: number; wrap?: boolean }
defines the options used to create the mesh
Optional backUVs?: Vector4
Optional bottom
Base At?: number Optional depth?: number
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional frontUVs?: Vector4
Optional height?: number
Optional side
Orientation?: number Optional size?: number
Optional top
Base At?: number Optional updatable?: boolean
Optional width?: number
Optional wrap?: boolean
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the box mesh
- The parameter
Create Box Vertex Data
Creates the VertexData for a box
Parameters
options: { backUVs?: Vector4; bottomBaseAt?: number; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; topBaseAt?: number; width?: number; wrap?: boolean }
an object used to set the following optional parameters for the box, required but can be empty
- size sets the width, height and depth of the box to the value of size, optional default 1
- width sets the width (x direction) of the box, overwrites the width set by size, optional, default size
- height sets the height (y direction) of the box, overwrites the height set by size, optional, default size
- depth sets the depth (z direction) of the box, overwrites the depth set by size, optional, default size
- faceUV an array of 6 Vector4 elements used to set different images to each box side
- faceColors an array of 6 Color3 elements used to set different colors to each box side
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional backUVs?: Vector4
Optional bottom
Base At?: number Optional depth?: number
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional frontUVs?: Vector4
Optional height?: number
Optional side
Orientation?: number Optional size?: number
Optional top
Base At?: number Optional width?: number
Optional wrap?: boolean
Returns VertexData
the VertexData of the box
Create Capsule
Creates a capsule or a pill mesh
Parameters
name: string
defines the name of the mesh
Optional options: ICreateCapsuleOptions
The constructors options.
Optional scene: Nullable<Scene>
The scene the mesh is scoped to.
Returns Mesh
Capsule Mesh
Create Capsule Vertex Data
Parameters
Optional options: ICreateCapsuleOptions
the constructors options used to shape the mesh.
Returns VertexData
the capsule VertexData
Create Cylinder
Creates a cylinder or a cone mesh
- The parameter
height
sets the height size (float) of the cylinder/cone (float, default 2). - The parameter
diameter
sets the diameter of the top and bottom cap at once (float, default 1). - The parameters
diameterTop
anddiameterBottom
overwrite the parameterdiameter
and set respectively the top cap and bottom cap diameter (floats, default 1). The parameter "diameterBottom" can't be zero. - The parameter
tessellation
sets the number of cylinder sides (positive integer, default 24). Set it to 3 to get a prism for instance. - The parameter
subdivisions
sets the number of rings along the cylinder height (positive integer, default 1). - The parameter
hasRings
(boolean, default false) makes the subdivisions independent from each other, so they become different faces. - The parameter
enclose
(boolean, default false) adds two extra faces per subdivision to a sliced cylinder to close it around its height axis. - The parameter
cap
sets the way the cylinder is capped. Possible values : BABYLON.Mesh.NO_CAP, BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL (default). - The parameter
arc
(float, default 1) is the ratio (max 1) to apply to the circumference to slice the cylinder. - You can set different colors and different images to each box side by using the parameters
faceColors
(an array of n Color3 elements) andfaceUV
(an array of n Vector4 elements). - The value of n is the number of cylinder faces. If the cylinder has only 1 subdivisions, n equals : top face + cylinder surface + bottom face = 3
- Now, if the cylinder has 5 independent subdivisions (hasRings = true), n equals : top face + 5 stripe surfaces + bottom face = 2 + 5 = 7
- Finally, if the cylinder has 5 independent subdivisions and is enclose, n equals : top face + 5 x (stripe surface + 2 closing faces) + bottom face = 2 + 5 * 3 = 17
- Each array (color or UVs) is always ordered the same way : the first element is the bottom cap, the last element is the top cap. The other elements are each a ring surface.
- If
enclose
is false, a ring surface is one element. - If
enclose
is true, a ring surface is 3 successive elements in the array : the tubular surface, then the two closing faces. - Example how to set colors and textures on a sliced cylinder : https://www.html5gamedevs.com/topic/17945-creating-a-closed-slice-of-a-cylinder/#comment-106379
- You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created.
Parameters
name: string
defines the name of the mesh
Optional options: { arc?: number; backUVs?: Vector4; cap?: number; diameter?: number; diameterBottom?: number; diameterTop?: number; enclose?: boolean; faceColors?: Color4[]; faceUV?: Vector4[]; frontUVs?: Vector4; hasRings?: boolean; height?: number; sideOrientation?: number; subdivisions?: number; tessellation?: number; updatable?: boolean }
defines the options used to create the mesh
Optional arc?: number
Optional backUVs?: Vector4
Optional cap?: number
Optional diameter?: number
Optional diameter
Bottom?: number Optional diameter
Top?: number Optional enclose?: boolean
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional frontUVs?: Vector4
Optional has
Rings?: boolean Optional height?: number
Optional side
Orientation?: number Optional subdivisions?: number
Optional tessellation?: number
Optional updatable?: boolean
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the cylinder mesh
- The parameter
Create Cylinder Vertex Data
Creates the VertexData for a cylinder, cone or prism
Parameters
options: { arc?: number; backUVs?: Vector4; cap?: number; diameter?: number; diameterBottom?: number; diameterTop?: number; enclose?: boolean; faceColors?: Color4[]; faceUV?: Vector4[]; frontUVs?: Vector4; hasRings?: boolean; height?: number; sideOrientation?: number; subdivisions?: number; tessellation?: number }
an object used to set the following optional parameters for the box, required but can be empty
- height sets the height (y direction) of the cylinder, optional, default 2
- diameterTop sets the diameter of the top of the cone, overwrites diameter, optional, default diameter
- diameterBottom sets the diameter of the bottom of the cone, overwrites diameter, optional, default diameter
- diameter sets the diameter of the top and bottom of the cone, optional default 1
- tessellation the number of prism sides, 3 for a triangular prism, optional, default 24
- subdivisions` the number of rings along the cylinder height, optional, default 1
- arc a number from 0 to 1, to create an unclosed cylinder based on the fraction of the circumference given by the arc value, optional, default 1
- faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively
- faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively
- hasRings when true makes each subdivision independently treated as a face for faceUV and faceColors, optional, default false
- enclose when true closes an open cylinder by adding extra flat faces between the height axis and vertical edges, think cut cake
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional arc?: number
Optional backUVs?: Vector4
Optional cap?: number
Optional diameter?: number
Optional diameter
Bottom?: number Optional diameter
Top?: number Optional enclose?: boolean
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional frontUVs?: Vector4
Optional has
Rings?: boolean Optional height?: number
Optional side
Orientation?: number Optional subdivisions?: number
Optional tessellation?: number
Returns VertexData
the VertexData of the cylinder, cone or prism
Create Dashed Lines
Creates a dashed line mesh
- A dashed line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
- Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
- The parameter
points
is an array successive Vector3 - The parameter
dashNb
is the intended total number of dashes (positive integer, default 200) - The parameter
dashSize
is the size of the dashes relatively the dash number (positive float, default 3) - The parameter
gapSize
is the size of the gap between two successive dashes relatively the dash number (positive float, default 1) - The optional parameter
instance
is an instance of an existing LineMesh object to be updated with the passedpoints
parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines - The optional parameter
useVertexAlpha
is to be set tofalse
(defaulttrue
) when you don't need the alpha blending (faster) - The optional parameter
material
is the material to use to draw the lines if provided. If not, a default material will be created - When updating an instance, remember that only point positions can change, not the number of points
- The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
options: { dashNb?: number; dashSize?: number; gapSize?: number; instance?: LinesMesh; material?: Material; points: Vector3[]; updatable?: boolean; useVertexAlpha?: boolean }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Returns LinesMesh
the dashed line mesh
Create Dashed Lines Vertex Data
Create the VertexData for a DashedLines
Parameters
options: { dashNb?: number; dashSize?: number; gapSize?: number; points: Vector3[] }
an object used to set the following optional parameters for the DashedLines, required but can be empty
- points an array successive Vector3
- dashSize the size of the dashes relative to the dash number, optional, default 3
- gapSize the size of the gap between two successive dashes relative to the dash number, optional, default 1
- dashNb the intended total number of dashes, optional, default 200
Optional dash
Nb?: number Optional dash
Size?: number Optional gap
Size?: number points: Vector3[]
Returns VertexData
the VertexData for the DashedLines
Create Decal
Creates a decal mesh. A decal is a mesh usually applied as a model onto the surface of another mesh. So don't forget the parameter
sourceMesh
depicting the decal- The parameter
position
(Vector3, default(0, 0, 0)
) sets the position of the decal in World coordinates - The parameter
normal
(Vector3, defaultVector3.Up
) sets the normal of the mesh where the decal is applied onto in World coordinates - The parameter
size
(Vector3, default(1, 1, 1)
) sets the decal scaling - The parameter
angle
(float in radian, default 0) sets the angle to rotate the decal - The parameter
captureUVS
defines if we need to capture the uvs or compute them - The parameter
cullBackFaces
defines if the back faces should be removed from the decal mesh - The parameter
localMode
defines that the computations should be done with the local mesh coordinates instead of the world space coordinates. - Use this mode if you want the decal to be parented to the sourceMesh and move/rotate with it.
Note: Meshes with morph targets are not supported!
Parameters
name: string
defines the name of the mesh
sourceMesh: AbstractMesh
defines the mesh where the decal must be applied
options: { angle?: number; captureUVS?: boolean; cullBackFaces?: boolean; localMode?: boolean; normal?: Vector3; position?: Vector3; size?: Vector3 }
defines the options used to create the mesh
Returns Mesh
the decal mesh
- The parameter
Create Disc
Creates a plane polygonal mesh. By default, this is a disc
- The parameter
radius
sets the radius size (float) of the polygon (default 0.5) - The parameter
tessellation
sets the number of polygon sides (positive integer, default 64). So a tessellation valued to 3 will build a triangle, to 4 a square, etc - You can create an unclosed polygon with the parameter
arc
(positive float, default 1), valued between 0 and 1, what is the ratio of the circumference : 2 x PI x ratio - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { arc?: number; backUVs?: Vector4; frontUVs?: Vector4; radius?: number; sideOrientation?: number; tessellation?: number; updatable?: boolean }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the plane polygonal mesh
- The parameter
Create Disc Vertex Data
Creates the VertexData of the Disc or regular Polygon
Parameters
options: { arc?: number; backUVs?: Vector4; frontUVs?: Vector4; radius?: number; sideOrientation?: number; tessellation?: number }
an object used to set the following optional parameters for the disc, required but can be empty
- radius the radius of the disc, optional default 0.5
- tessellation the number of polygon sides, optional, default 64
- arc a number from 0 to 1, to create an unclosed polygon based on the fraction of the circumference given by the arc value, optional, default 1
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Returns VertexData
the VertexData of the box
Create Env Texture Async
Creates an environment texture from a loaded cube texture.
Parameters
texture: BaseTexture
defines the cube texture to convert in env file
Optional options: CreateEnvTextureOptions
options for the conversion process
Returns Promise<ArrayBuffer>
a promise containing the environment data if successful.
Create Geodesic
Creates the Mesh for a Geodesic Polyhedron
Parameters
name: string
defines the name of the mesh
options: { backUVs?: Vector4; faceColors?: Color4[]; faceUV?: Vector4[]; flat?: boolean; frontUVs?: Vector4; m?: number; n?: number; sideOrientation?: number; size?: number; sizeX?: number; sizeY?: number; sizeZ?: number; updatable?: boolean }
an object used to set the following optional parameters for the polyhedron, required but can be empty
- m number of horizontal steps along an isogrid
- n number of angled steps along an isogrid
- size the size of the Geodesic, optional default 1
- sizeX allows stretching in the x direction, optional, default size
- sizeY allows stretching in the y direction, optional, default size
- sizeZ allows stretching in the z direction, optional, default size
- faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively
- faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively
- flat when true creates a flat shaded mesh, optional, default true
- subdivisions increasing the subdivisions increases the number of faces, optional, default 4
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional backUVs?: Vector4
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional flat?: boolean
Optional frontUVs?: Vector4
Optional m?: number
Optional n?: number
Optional side
Orientation?: number Optional size?: number
Optional sizeX?: number
Optional sizeY?: number
Optional sizeZ?: number
Optional updatable?: boolean
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
Geodesic mesh
Create Goldberg
Creates the Mesh for a Goldberg Polyhedron which is made from 12 pentagonal and the rest hexagonal faces
Parameters
name: string
defines the name of the mesh
options: GoldbergCreationOption
an object used to set the following optional parameters for the polyhedron, required but can be empty
Optional scene: Nullable<Scene>
defines the hosting scene
Returns GoldbergMesh
Goldberg mesh
Create Goldberg Vertex Data
Creates the Mesh for a Goldberg Polyhedron
Parameters
options: GoldbergVertexDataOption
an object used to set the following optional parameters for the polyhedron, required but can be empty
goldbergData: PolyhedronData
polyhedronData defining the Goldberg polyhedron
Returns VertexData
GoldbergSphere mesh
Create Ground
Creates a ground mesh
- The parameters
width
andheight
(floats, default 1) set the width and height sizes of the ground - The parameter
subdivisions
(positive integer) sets the number of subdivisions per side - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { height?: number; subdivisions?: number; subdivisionsX?: number; subdivisionsY?: number; updatable?: boolean; width?: number }
defines the options used to create the mesh
Optional height?: number
Optional subdivisions?: number
Optional subdivisionsX?: number
Optional subdivisionsY?: number
Optional updatable?: boolean
Optional width?: number
Optional scene: Scene
defines the hosting scene
Returns GroundMesh
the ground mesh
- The parameters
Create Ground From Height Map
Creates a ground mesh from a height map
- The parameter
url
sets the URL of the height map image resource. - The parameters
width
andheight
(positive floats, default 10) set the ground width and height sizes. - The parameter
subdivisions
(positive integer, default 1) sets the number of subdivision per side. - The parameter
minHeight
(float, default 0) is the minimum altitude on the ground. - The parameter
maxHeight
(float, default 1) is the maximum altitude on the ground. - The parameter
colorFilter
(optional Color3, default (0.3, 0.59, 0.11) ) is the filter to apply to the image pixel colors to compute the height. - The parameter
onReady
is a javascript callback function that will be called once the mesh is just built (the height map download can last some time). - The parameter
alphaFilter
will filter any data where the alpha channel is below this value, defaults 0 (all data visible) - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created.
Parameters
name: string
defines the name of the mesh
url: string
defines the url to the height map
Optional options: { alphaFilter?: number; colorFilter?: Color3; height?: number; maxHeight?: number; minHeight?: number; subdivisions?: number; updatable?: boolean; width?: number; onReady?: any }
defines the options used to create the mesh
Optional alpha
Filter?: number Optional color
Filter?: Color3 Optional height?: number
Optional max
Height?: number Optional min
Height?: number Optional subdivisions?: number
Optional updatable?: boolean
Optional width?: number
on
Ready?:function Parameters
mesh: GroundMesh
Returns void
Optional scene: Nullable<Scene>
defines the hosting scene
Returns GroundMesh
the ground mesh
- The parameter
Create Ground From Height Map Vertex Data
Creates the VertexData of the Ground designed from a heightmap
Parameters
options: { alphaFilter: number; buffer: Uint8Array; bufferHeight: number; bufferWidth: number; colorFilter: Color3; height: number; maxHeight: number; minHeight: number; subdivisions: number; width: number }
an object used to set the following parameters for the Ground, required and provided by CreateGroundFromHeightMap
- width the width (x direction) of the ground
- height the height (z direction) of the ground
- subdivisions the number of subdivisions per side
- minHeight the minimum altitude on the ground, optional, default 0
- maxHeight the maximum altitude on the ground, optional default 1
- colorFilter the filter to apply to the image pixel colors to compute the height, optional Color3, default (0.3, 0.59, 0.11)
- buffer the array holding the image color data
- bufferWidth the width of image
- bufferHeight the height of image
- alphaFilter Remove any data where the alpha channel is below this value, defaults 0 (all data visible)
alpha
Filter: number buffer: Uint8Array
buffer
Height: number buffer
Width: number color
Filter: Color3 height: number
max
Height: number min
Height: number subdivisions: number
width: number
Returns VertexData
the VertexData of the Ground designed from a heightmap
Create Ground Vertex Data
Creates the VertexData for a Ground
Parameters
options: { height?: number; subdivisions?: number; subdivisionsX?: number; subdivisionsY?: number; width?: number }
an object used to set the following optional parameters for the Ground, required but can be empty
- width the width (x direction) of the ground, optional, default 1
- height the height (z direction) of the ground, optional, default 1
- subdivisions the number of subdivisions per side, optional, default 1
Optional height?: number
Optional subdivisions?: number
Optional subdivisionsX?: number
Optional subdivisionsY?: number
Optional width?: number
Returns VertexData
the VertexData of the Ground
Create Hemisphere
Creates a hemisphere mesh
Parameters
name: string
defines the name of the mesh
Optional options: { diameter?: number; segments?: number; sideOrientation?: number }
defines the options used to create the mesh
Optional diameter?: number
Optional segments?: number
Optional side
Orientation?: number
Optional scene: Scene
defines the hosting scene
Returns Mesh
the hemisphere mesh
Create Ico Sphere
Creates a sphere based upon an icosahedron with 20 triangular faces which can be subdivided
- The parameter
radius
sets the radius size (float) of the icosphere (default 1) - You can set some different icosphere dimensions, for instance to build an ellipsoid, by using the parameters
radiusX
,radiusY
andradiusZ
(all by default have the same value ofradius
) - The parameter
subdivisions
sets the number of subdivisions (positive integer, default 4). The more subdivisions, the more faces on the icosphere whatever its size - The parameter
flat
(boolean, default true) gives each side its own normals. Set it to false to get a smooth continuous light reflection on the surface - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; flat?: boolean; frontUVs?: Vector4; radius?: number; radiusX?: number; radiusY?: number; radiusZ?: number; sideOrientation?: number; subdivisions?: number; updatable?: boolean }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the icosahedron mesh
- The parameter
Create Ico Sphere Vertex Data
Creates the VertexData of the IcoSphere
Parameters
options: { backUVs?: Vector4; flat?: boolean; frontUVs?: Vector4; radius?: number; radiusX?: number; radiusY?: number; radiusZ?: number; sideOrientation?: number; subdivisions?: number }
an object used to set the following optional parameters for the IcoSphere, required but can be empty
- radius the radius of the IcoSphere, optional default 1
- radiusX allows stretching in the x direction, optional, default radius
- radiusY allows stretching in the y direction, optional, default radius
- radiusZ allows stretching in the z direction, optional, default radius
- flat when true creates a flat shaded mesh, optional, default true
- subdivisions increasing the subdivisions increases the number of faces, optional, default 4
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Returns VertexData
the VertexData of the IcoSphere
Create Image Data Array Buffer Views
Creates the ArrayBufferViews used for initializing environment texture image data.
Parameters
data: ArrayBufferView
the image data
info: EnvironmentTextureInfo
parameters that determine what views will be created for accessing the underlying buffer
Returns ArrayBufferView[][]
the views described by info providing access to the underlying buffer
Create Lathe
Creates lathe mesh. The lathe is a shape with a symmetry axis : a 2D model shape is rotated around this axis to design the lathe
- The parameter
shape
is a required array of successive Vector3. This array depicts the shape to be rotated in its local space : the shape must be designed in the xOy plane and will be rotated around the Y axis. It's usually a 2D shape, so the Vector3 z coordinates are often set to zero - The parameter
radius
(positive float, default 1) is the radius value of the lathe - The parameter
tessellation
(positive integer, default 64) is the side number of the lathe - The parameter
clip
(positive integer, default 0) is the number of sides to not create without effecting the general shape of the sides - The parameter
arc
(positive float, default 1) is the ratio of the lathe. 0.5 builds for instance half a lathe, so an opened shape - The parameter
closed
(boolean, default true) opens/closes the lathe circumference. This should be set to false when used with the parameter "arc" - The parameter
cap
sets the way the extruded shape is capped. Possible values : BABYLON.Mesh.NO_CAP (default), BABYLON.Mesh.CAP_START, BABYLON.Mesh.CAP_END, BABYLON.Mesh.CAP_ALL - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The optional parameter
invertUV
(boolean, default false) swaps in the geometry the U and V coordinates to apply a texture - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
options: { arc?: number; backUVs?: Vector4; cap?: number; clip?: number; closed?: boolean; frontUVs?: Vector4; invertUV?: boolean; radius?: number; shape: Vector3[]; sideOrientation?: number; tessellation?: number; updatable?: boolean }
defines the options used to create the mesh
Optional arc?: number
Optional backUVs?: Vector4
Optional cap?: number
Optional clip?: number
Optional closed?: boolean
Optional frontUVs?: Vector4
Optional invertUV?: boolean
Optional radius?: number
shape: Vector3[]
Optional side
Orientation?: number Optional tessellation?: number
Optional updatable?: boolean
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the lathe mesh
- The parameter
Create Line System
Creates a line system mesh. A line system is a pool of many lines gathered in a single mesh
- A line system mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of lines as an input parameter
- Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineSystem to this static function
- The parameter
lines
is an array of lines, each line being an array of successive Vector3 - The optional parameter
instance
is an instance of an existing LineSystem object to be updated with the passedlines
parameter - The optional parameter
colors
is an array of line colors, each line colors being an array of successive Color4, one per line point - The optional parameter
useVertexAlpha
is to be set tofalse
(defaulttrue
) when you don't need the alpha blending (faster) - The optional parameter
material
is the material to use to draw the lines if provided. If not, a default material will be created - Updating a simple Line mesh, you just need to update every line in the
lines
array : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines - When updating an instance, remember that only line point positions can change, not the number of points, neither the number of lines
- The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the new line system
options: { colors?: Nullable<Color4[][]>; instance?: Nullable<LinesMesh>; lines: Vector3[][]; material?: Material; updatable?: boolean; useVertexAlpha?: boolean }
defines the options used to create the line system
scene: Nullable<Scene>
defines the hosting scene
Returns LinesMesh
a new line system mesh
Create Line System Vertex Data
Creates the VertexData of the LineSystem
Parameters
options: { colors?: Nullable<Color4[][]>; lines: Vector3[][] }
an object used to set the following optional parameters for the LineSystem, required but can be empty
- lines an array of lines, each line being an array of successive Vector3
- colors an array of line colors, each of the line colors being an array of successive Color4, one per line point
Returns VertexData
the VertexData of the LineSystem
Create Lines
Creates a line mesh A line mesh is considered as a parametric shape since it has no predefined original shape. Its shape is determined by the passed array of points as an input parameter
- Like every other parametric shape, it is dynamically updatable by passing an existing instance of LineMesh to this static function
- The parameter
points
is an array successive Vector3 - The optional parameter
instance
is an instance of an existing LineMesh object to be updated with the passedpoints
parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#lines-and-dashedlines - The optional parameter
colors
is an array of successive Color4, one per line point - The optional parameter
useVertexAlpha
is to be set tofalse
(defaulttrue
) when you don't need alpha blending (faster) - The optional parameter
material
is the material to use to draw the lines if provided. If not, a default material will be created - When updating an instance, remember that only point positions can change, not the number of points
- The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the new line system
options: { colors?: Color4[]; instance?: Nullable<LinesMesh>; material?: Material; points: Vector3[]; updatable?: boolean; useVertexAlpha?: boolean }
defines the options used to create the line system
Optional scene: Nullable<Scene>
defines the hosting scene
Returns LinesMesh
a new line mesh
Create Plane
Creates a plane mesh
- The parameter
size
sets the size (float) of both sides of the plane at once (default 1) - You can set some different plane dimensions by using the parameters
width
andheight
(both by default have the same value ofsize
) - The parameter
sourcePlane
is a Plane instance. It builds a mesh plane from a Math plane - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; sourcePlane?: Plane; updatable?: boolean; width?: number }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the plane mesh
- The parameter
Create Plane Vertex Data
Creates the VertexData for a Plane
Parameters
options: { backUVs?: Vector4; frontUVs?: Vector4; height?: number; sideOrientation?: number; size?: number; width?: number }
an object used to set the following optional parameters for the plane, required but can be empty
- size sets the width and height of the plane to the value of size, optional default 1
- width sets the width (x direction) of the plane, overwrites the width set by size, optional, default size
- height sets the height (y direction) of the plane, overwrites the height set by size, optional, default size
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Returns VertexData
the VertexData of the box
Create Polygon
Creates a polygon mesh The polygon's shape will depend on the input parameters and is constructed parallel to a ground mesh
- The parameter
shape
is a required array of successive Vector3 representing the corners of the polygon in th XoZ plane, that is y = 0 for all vectors - You can set the mesh side orientation with the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created - If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4) - Remember you can only change the shape positions, not their number when updating a polygon
Parameters
name: string
defines the name of the mesh
options: { backUVs?: Vector4; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; frontUVs?: Vector4; holes?: Vector3[][]; shape: Vector3[]; sideOrientation?: number; smoothingThreshold?: number; updatable?: boolean; wrap?: boolean }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Optional earcutInjection: any
can be used to inject your own earcut reference
Returns Mesh
the polygon mesh
- The parameter
Create Polygon Vertex Data
Creates the VertexData for an irregular Polygon in the XoZ plane using a mesh built by polygonTriangulation.build() All parameters are provided by CreatePolygon as needed
Parameters
polygon: Mesh
a mesh built from polygonTriangulation.build()
sideOrientation: number
takes the values Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
Optional fUV: Vector4[]
an array of Vector4 elements used to set different images to the top, rings and bottom respectively
Optional fColors: Color4[]
an array of Color3 elements used to set different colors to the top, rings and bottom respectively
Optional frontUVs: Vector4
only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
Optional backUVs: Vector4
only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional wrp: boolean
a boolean, default false, when true and fUVs used texture is wrapped around all sides, when false texture is applied side
Returns VertexData
the VertexData of the Polygon
Create Polyhedron
Creates a polyhedron mesh
- The parameter
type
(positive integer, max 14, default 0) sets the polyhedron type to build among the 15 embbeded types. Please refer to the type sheet in the tutorial to choose the wanted type - The parameter
size
(positive float, default 1) sets the polygon size - You can overwrite the
size
on each dimension bu using the parameterssizeX
,sizeY
orsizeZ
(positive floats, default tosize
value) - You can build other polyhedron types than the 15 embbeded ones by setting the parameter
custom
(polyhedronObject
, default null). If you set the parametercustom
, this overrides the parametertype
- A
polyhedronObject
is a formatted javascript object. You'll find a full file with pre-set polyhedra here : https://github.com/BabylonJS/Extensions/tree/master/Polyhedron - You can set the color and the UV of each side of the polyhedron with the parameters
faceColors
(Color4, default(1, 1, 1, 1)
) and faceUV (Vector4, default(0, 0, 1, 1)
) - To understand how to set
faceUV
orfaceColors
, please read this by considering the right number of faces of your polyhedron, instead of only 6 for the box : https://doc.babylonjs.com/features/featuresDeepDive/materials/using/texturePerBoxFace - The parameter
flat
(boolean, default true). If set to false, it gives the polyhedron a single global face, so less vertices and shared normals. In this case,faceColors
andfaceUV
are ignored - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; custom?: any; faceColors?: Color4[]; faceUV?: Vector4[]; flat?: boolean; frontUVs?: Vector4; sideOrientation?: number; size?: number; sizeX?: number; sizeY?: number; sizeZ?: number; type?: number; updatable?: boolean }
defines the options used to create the mesh
Optional backUVs?: Vector4
Optional custom?: any
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional flat?: boolean
Optional frontUVs?: Vector4
Optional side
Orientation?: number Optional size?: number
Optional sizeX?: number
Optional sizeY?: number
Optional sizeZ?: number
Optional type?: number
Optional updatable?: boolean
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the polyhedron mesh
- The parameter
Create Polyhedron Vertex Data
Creates the VertexData for a Polyhedron
Parameters
options: { backUVs?: Vector4; custom?: any; faceColors?: Color4[]; faceUV?: Vector4[]; flat?: boolean; frontUVs?: Vector4; sideOrientation?: number; size?: number; sizeX?: number; sizeY?: number; sizeZ?: number; type?: number }
an object used to set the following optional parameters for the polyhedron, required but can be empty
- type provided types are:
- 0 : Tetrahedron, 1 : Octahedron, 2 : Dodecahedron, 3 : Icosahedron, 4 : Rhombicuboctahedron, 5 : Triangular Prism, 6 : Pentagonal Prism, 7 : Hexagonal Prism, 8 : Square Pyramid (J1)
- 9 : Pentagonal Pyramid (J2), 10 : Triangular Dipyramid (J12), 11 : Pentagonal Dipyramid (J13), 12 : Elongated Square Dipyramid (J15), 13 : Elongated Pentagonal Dipyramid (J16), 14 : Elongated Pentagonal Cupola (J20)
- size the size of the IcoSphere, optional default 1
- sizeX allows stretching in the x direction, optional, default size
- sizeY allows stretching in the y direction, optional, default size
- sizeZ allows stretching in the z direction, optional, default size
- custom a number that overwrites the type to create from an extended set of polyhedron from https://www.babylonjs-playground.com/#21QRSK#15 with minimised editor
- faceUV an array of Vector4 elements used to set different images to the top, rings and bottom respectively
- faceColors an array of Color3 elements used to set different colors to the top, rings and bottom respectively
- flat when true creates a flat shaded mesh, optional, default true
- subdivisions increasing the subdivisions increases the number of faces, optional, default 4
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional backUVs?: Vector4
Optional custom?: any
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional flat?: boolean
Optional frontUVs?: Vector4
Optional side
Orientation?: number Optional size?: number
Optional sizeX?: number
Optional sizeY?: number
Optional sizeZ?: number
Optional type?: number
Returns VertexData
the VertexData of the Polyhedron
Create Resized Copy
Uses the GPU to create a copy texture rescaled at a given size
Parameters
texture: Texture
Texture to copy from
width: number
defines the desired width
height: number
defines the desired height
Optional useBilinearMode: boolean
defines if bilinear mode has to be used
Returns Texture
the generated texture
Create Ribbon
Creates a ribbon mesh. The ribbon is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
- The parameter
pathArray
is a required array of paths, what are each an array of successive Vector3. The pathArray parameter depicts the ribbon geometry - The parameter
closeArray
(boolean, default false) creates a seam between the first and the last paths of the path array - The parameter
closePath
(boolean, default false) creates a seam between the first and the last points of each path of the path array - The parameter
offset
(positive integer, default : rounded half size of the pathArray length), is taken in account only if thepathArray
is containing a single path - It's the offset to join the points from the same path. Ex : offset = 10 means the point 1 is joined to the point 11
- The optional parameter
instance
is an instance of an existing Ribbon object to be updated with the passedpathArray
parameter : https://doc.babylonjs.com/features/featuresDeepDive/mesh/dynamicMeshMorph#ribbon - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The optional parameter
invertUV
(boolean, default false) swaps in the geometry the U and V coordinates to apply a texture - The parameter
uvs
is an optional flat array ofVector2
to update/set each ribbon vertex with its own custom UV values instead of the computed ones - The parameters
colors
is an optional flat array ofColor4
to set/update each ribbon vertex with its own custom color values - Note that if you use the parameters
uvs
orcolors
, the passed arrays must be populated with the right number of elements, it is to say the number of ribbon vertices. Remember that if you setclosePath
totrue
, there's one extra vertex per path in the geometry - Moreover, you can use the parameter
color
withinstance
(to update the ribbon), only if you previously used it at creation time - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
options: { backUVs?: Vector4; closeArray?: boolean; closePath?: boolean; colors?: Color4[]; frontUVs?: Vector4; instance?: Mesh; invertUV?: boolean; offset?: number; pathArray: Vector3[][]; sideOrientation?: number; updatable?: boolean; uvs?: Vector2[] }
defines the options used to create the mesh
Optional backUVs?: Vector4
Optional close
Array?: boolean Optional close
Path?: boolean Optional colors?: Color4[]
Optional frontUVs?: Vector4
Optional instance?: Mesh
Optional invertUV?: boolean
Optional offset?: number
path
Array: Vector3[][] Optional side
Orientation?: number Optional updatable?: boolean
Optional uvs?: Vector2[]
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the ribbon mesh
- The parameter
Create Ribbon Vertex Data
Creates the VertexData for a Ribbon
Parameters
options: { backUVs?: Vector4; closeArray?: boolean; closePath?: boolean; colors?: Color4[]; frontUVs?: Vector4; invertUV?: boolean; offset?: number; pathArray: Vector3[][]; sideOrientation?: number; uvs?: Vector2[] }
an object used to set the following optional parameters for the ribbon, required but can be empty
- pathArray array of paths, each of which an array of successive Vector3
- closeArray creates a seam between the first and the last paths of the pathArray, optional, default false
- closePath creates a seam between the first and the last points of each path of the path array, optional, default false
- offset a positive integer, only used when pathArray contains a single path (offset = 10 means the point 1 is joined to the point 11), default rounded half size of the pathArray length
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
- invertUV swaps in the U and V coordinates when applying a texture, optional, default false
- uvs a linear array, of length 2 * number of vertices, of custom UV values, optional
- colors a linear array, of length 4 * number of vertices, of custom color values, optional
Returns VertexData
the VertexData of the ribbon
Create Screenshot
Captures a screenshot of the current rendering
Parameters
engine: Engine
defines the rendering engine
camera: Camera
defines the source camera
size: number | IScreenshotSize
This parameter can be set to a single number or to an object with the following (optional) properties: precision, width, height. If a single number is passed, it will be used for both width and height. If an object is passed, the screenshot size will be derived from the parameters. The precision property is a multiplier allowing rendering at a higher or lower resolution
Optional successCallback: ((data: string) => void)
defines the callback receives a single parameter which contains the screenshot as a string of base64-encoded characters. This string can be assigned to the src parameter of an
to display it
Parameters
data: string
Returns void
Optional mimeType: string
defines the MIME type of the screenshot image (default: image/png). Check your browser for supported MIME types
Optional forceDownload: boolean
force the system to download the image even if a successCallback is provided
Returns void
Create Screenshot Async
Captures a screenshot of the current rendering
Parameters
engine: Engine
defines the rendering engine
camera: Camera
defines the source camera
size: number | IScreenshotSize
This parameter can be set to a single number or to an object with the following (optional) properties: precision, width, height. If a single number is passed, it will be used for both width and height. If an object is passed, the screenshot size will be derived from the parameters. The precision property is a multiplier allowing rendering at a higher or lower resolution
Optional mimeType: string
defines the MIME type of the screenshot image (default: image/png). Check your browser for supported MIME types
Returns Promise<string>
screenshot as a string of base64-encoded characters. This string can be assigned to the src parameter of an
to display it
Create Screenshot Using Render Target
Generates an image screenshot from the specified camera.
Parameters
engine: Engine
The engine to use for rendering
camera: Camera
The camera to use for rendering
size: number | IScreenshotSize
This parameter can be set to a single number or to an object with the following (optional) properties: precision, width, height, finalWidth, finalHeight. If a single number is passed, it will be used for both width and height, as well as finalWidth, finalHeight. If an object is passed, the screenshot size will be derived from the parameters. The precision property is a multiplier allowing rendering at a higher or lower resolution
Optional successCallback: ((data: string) => void)
The callback receives a single parameter which contains the screenshot as a string of base64-encoded characters. This string can be assigned to the src parameter of an
to display it
Parameters
data: string
Returns void
Optional mimeType: string
The MIME type of the screenshot image (default: image/png). Check your browser for supported MIME types
Optional samples: number
Texture samples (default: 1)
Optional antialiasing: boolean
Whether antialiasing should be turned on or not (default: false)
Optional fileName: string
A name for for the downloaded file.
Optional renderSprites: boolean
Whether the sprites should be rendered or not (default: false)
Optional enableStencilBuffer: boolean
Whether the stencil buffer should be enabled or not (default: false)
Optional useLayerMask: boolean
if the camera's layer mask should be used to filter what should be rendered (default: true)
Returns void
Create Screenshot Using Render Target Async
Generates an image screenshot from the specified camera.
Parameters
engine: Engine
The engine to use for rendering
camera: Camera
The camera to use for rendering
size: number | IScreenshotSize
This parameter can be set to a single number or to an object with the following (optional) properties: precision, width, height. If a single number is passed, it will be used for both width and height. If an object is passed, the screenshot size will be derived from the parameters. The precision property is a multiplier allowing rendering at a higher or lower resolution
Optional mimeType: string
The MIME type of the screenshot image (default: image/png). Check your browser for supported MIME types
Optional samples: number
Texture samples (default: 1)
Optional antialiasing: boolean
Whether antialiasing should be turned on or not (default: false)
Optional fileName: string
A name for for the downloaded file.
Optional renderSprites: boolean
Whether the sprites should be rendered or not (default: false)
Optional enableStencilBuffer: boolean
Whether the stencil buffer should be enabled or not (default: false)
Optional useLayerMask: boolean
if the camera's layer mask should be used to filter what should be rendered (default: true)
Returns Promise<string>
screenshot as a string of base64-encoded characters. This string can be assigned to the src parameter of an
to display it
Create Screenshot With Resize Async
Captures a screenshot of the current rendering for a specific size. This will render the entire canvas but will generate a blink (due to canvas resize)
Parameters
engine: Engine
defines the rendering engine
camera: Camera
defines the source camera
width: number
defines the expected width
height: number
defines the expected height
Optional mimeType: string
defines the MIME type of the screenshot image (default: image/png). Check your browser for supported MIME types
Returns Promise<void>
screenshot as a string of base64-encoded characters. This string can be assigned to the src parameter of an
to display it
Create Sphere
Creates a sphere mesh
- The parameter
diameter
sets the diameter size (float) of the sphere (default 1) - You can set some different sphere dimensions, for instance to build an ellipsoid, by using the parameters
diameterX
,diameterY
anddiameterZ
(all by default have the same value ofdiameter
) - The parameter
segments
sets the sphere number of horizontal stripes (positive integer, default 32) - You can create an unclosed sphere with the parameter
arc
(positive float, default 1), valued between 0 and 1, what is the ratio of the circumference (latitude) : 2 x PI x ratio - You can create an unclosed sphere on its height with the parameter
slice
(positive float, default1), valued between 0 and 1, what is the height ratio (longitude) - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created
Parameters
name: string
defines the name of the mesh
Optional options: { arc?: number; backUVs?: Vector4; diameter?: number; diameterX?: number; diameterY?: number; diameterZ?: number; frontUVs?: Vector4; segments?: number; sideOrientation?: number; slice?: number; updatable?: boolean }
defines the options used to create the mesh
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the sphere mesh
- The parameter
Create Sphere Vertex Data
Creates the VertexData for an ellipsoid, defaults to a sphere
Parameters
options: { arc?: number; backUVs?: Vector4; dedupTopBottomIndices?: boolean; diameter?: number; diameterX?: number; diameterY?: number; diameterZ?: number; frontUVs?: Vector4; segments?: number; sideOrientation?: number; slice?: number }
an object used to set the following optional parameters for the box, required but can be empty
- segments sets the number of horizontal strips optional, default 32
- diameter sets the axes dimensions, diameterX, diameterY and diameterZ to the value of diameter, optional default 1
- diameterX sets the diameterX (x direction) of the ellipsoid, overwrites the diameterX set by diameter, optional, default diameter
- diameterY sets the diameterY (y direction) of the ellipsoid, overwrites the diameterY set by diameter, optional, default diameter
- diameterZ sets the diameterZ (z direction) of the ellipsoid, overwrites the diameterZ set by diameter, optional, default diameter
- arc a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the circumference (latitude) given by the arc value, optional, default 1
- slice a number from 0 to 1, to create an unclosed ellipsoid based on the fraction of the height (latitude) given by the arc value, optional, default 1
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional arc?: number
Optional backUVs?: Vector4
Optional dedup
Top Bottom Indices?: boolean Optional diameter?: number
Optional diameterX?: number
Optional diameterY?: number
Optional diameterZ?: number
Optional frontUVs?: Vector4
Optional segments?: number
Optional side
Orientation?: number Optional slice?: number
Returns VertexData
the VertexData of the ellipsoid
Create Text
Create a text mesh
Parameters
name: string
defines the name of the mesh
text: string
defines the text to use to build the mesh
fontData: IFontData
defines the font data (can be generated with http://gero3.github.io/facetype.js/)
Optional options: { depth?: number; resolution?: number; sideOrientation?: number; size?: number }
defines options used to create the mesh
Optional depth?: number
Optional resolution?: number
Optional side
Orientation?: number Optional size?: number
Optional scene: Nullable<Scene>
defines the hosting scene
Optional earcutInjection: any
can be used to inject your own earcut reference
Returns Nullable<Mesh>
a new Mesh
Create Tiled Box
Creates a tiled box mesh
Parameters
name: string
defines the name of the mesh
options: { alignHorizontal?: number; alignVertical?: number; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; height?: number; pattern?: number; sideOrientation?: number; tileHeight?: number; tileSize?: number; tileWidth?: number; updatable?: boolean; width?: number }
an object used to set the following optional parameters for the tiled box, required but can be empty
- pattern sets the rotation or reflection pattern for the tiles,
- size of the box
- width of the box, overwrites size
- height of the box, overwrites size
- depth of the box, overwrites size
- tileSize sets the size of a tile
- tileWidth sets the tile width and overwrites tileSize
- tileHeight sets the tile width and overwrites tileSize
- faceUV an array of 6 Vector4 elements used to set different images to each box side
- faceColors an array of 6 Color3 elements used to set different colors to each box side
- alignHorizontal places whole tiles aligned to the center, left or right of a row
- alignVertical places whole tiles aligned to the center, left or right of a column
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
Optional align
Horizontal?: number Optional align
Vertical?: number Optional depth?: number
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional height?: number
Optional pattern?: number
Optional side
Orientation?: number Optional tile
Height?: number Optional tile
Size?: number Optional tile
Width?: number Optional updatable?: boolean
Optional width?: number
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the box mesh
Create Tiled Box Vertex Data
Creates the VertexData for a tiled box
Parameters
options: { alignHorizontal?: number; alignVertical?: number; depth?: number; faceColors?: Color4[]; faceUV?: Vector4[]; height?: number; pattern?: number; sideOrientation?: number; size?: number; tileHeight?: number; tileSize?: number; tileWidth?: number; width?: number }
an object used to set the following optional parameters for the tiled box, required but can be empty
- pattern sets the rotation or reflection pattern for the tiles,
- size of the box
- width of the box, overwrites size
- height of the box, overwrites size
- depth of the box, overwrites size
- tileSize sets the size of a tile
- tileWidth sets the tile width and overwrites tileSize
- tileHeight sets the tile width and overwrites tileSize
- faceUV an array of 6 Vector4 elements used to set different images to each box side
- faceColors an array of 6 Color3 elements used to set different colors to each box side
- alignHorizontal places whole tiles aligned to the center, left or right of a row
- alignVertical places whole tiles aligned to the center, left or right of a column
Optional align
Horizontal?: number Optional align
Vertical?: number Optional depth?: number
Optional face
Colors?: Color4[] Optional faceUV?: Vector4[]
Optional height?: number
Optional pattern?: number
Optional side
Orientation?: number - sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
Optional size?: number
Optional tile
Height?: number Optional tile
Size?: number Optional tile
Width?: number Optional width?: number
Returns VertexData
the VertexData of the TiledBox
Create Tiled Ground
Creates a tiled ground mesh
- The parameters
xmin
andxmax
(floats, default -1 and 1) set the ground minimum and maximum X coordinates - The parameters
zmin
andzmax
(floats, default -1 and 1) set the ground minimum and maximum Z coordinates - The parameter
subdivisions
is a javascript object{w: positive integer, h: positive integer}
(default{w: 6, h: 6}
).w
andh
are the numbers of subdivisions on the ground width and height. Each subdivision is called a tile - The parameter
precision
is a javascript object{w: positive integer, h: positive integer}
(default{w: 2, h: 2}
).w
andh
are the numbers of subdivisions on the ground width and height of each tile - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created.
Parameters
name: string
defines the name of the mesh
options: { precision?: { h: number; w: number }; subdivisions?: { h: number; w: number }; updatable?: boolean; xmax: number; xmin: number; zmax: number; zmin: number }
defines the options used to create the mesh
Optional precision?: { h: number; w: number }
h: number
w: number
Optional subdivisions?: { h: number; w: number }
h: number
w: number
Optional updatable?: boolean
xmax: number
xmin: number
zmax: number
zmin: number
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the tiled ground mesh
- The parameters
Create Tiled Ground Vertex Data
Creates the VertexData for a TiledGround by subdividing the ground into tiles
Parameters
options: { precision?: { h: number; w: number }; subdivisions?: { h: number; w: number }; xmax: number; xmin: number; zmax: number; zmin: number }
an object used to set the following optional parameters for the Ground, required but can be empty
- xmin the ground minimum X coordinate, optional, default -1
- zmin the ground minimum Z coordinate, optional, default -1
- xmax the ground maximum X coordinate, optional, default 1
- zmax the ground maximum Z coordinate, optional, default 1
- subdivisions a javascript object {w: positive integer, h: positive integer},
w
andh
are the numbers of subdivisions on the ground width and height creating 'tiles', default {w: 6, h: 6} - precision a javascript object {w: positive integer, h: positive integer},
w
andh
are the numbers of subdivisions on the tile width and height, default {w: 2, h: 2}
Optional precision?: { h: number; w: number }
h: number
w: number
Optional subdivisions?: { h: number; w: number }
h: number
w: number
xmax: number
xmin: number
zmax: number
zmin: number
Returns VertexData
the VertexData of the TiledGround
Create Tiled Plane
Creates a tiled plane mesh
Parameters
name: string
defines the name of the mesh
options: { alignHorizontal?: number; alignVertical?: number; backUVs?: Vector4; frontUVs?: Vector4; height?: number; pattern?: number; sideOrientation?: number; size?: number; tileHeight?: number; tileSize?: number; tileWidth?: number; updatable?: boolean; width?: number }
an object used to set the following optional parameters for the tiled plane, required but can be empty
- pattern a limited pattern arrangement depending on the number
- size of the box
- width of the box, overwrites size
- height of the box, overwrites size
- tileSize sets the width, height and depth of the tile to the value of size, optional default 1
- tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size
- tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- alignHorizontal places whole tiles aligned to the center, left or right of a row
- alignVertical places whole tiles aligned to the center, left or right of a column
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional align
Horizontal?: number Optional align
Vertical?: number Optional backUVs?: Vector4
Optional frontUVs?: Vector4
Optional height?: number
Optional pattern?: number
Optional side
Orientation?: number Optional size?: number
Optional tile
Height?: number Optional tile
Size?: number Optional tile
Width?: number Optional updatable?: boolean
Optional width?: number
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the box mesh
Create Tiled Plane Vertex Data
Creates the VertexData for a tiled plane
Parameters
options: { alignHorizontal?: number; alignVertical?: number; backUVs?: Vector4; frontUVs?: Vector4; height?: number; pattern?: number; sideOrientation?: number; size?: number; tileHeight?: number; tileSize?: number; tileWidth?: number; width?: number }
an object used to set the following optional parameters for the tiled plane, required but can be empty
- pattern a limited pattern arrangement depending on the number
- size of the box
- width of the box, overwrites size
- height of the box, overwrites size
- tileSize sets the width, height and depth of the tile to the value of size, optional default 1
- tileWidth sets the width (x direction) of the tile, overwrites the width set by size, optional, default size
- tileHeight sets the height (y direction) of the tile, overwrites the height set by size, optional, default size
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- alignHorizontal places whole tiles aligned to the center, left or right of a row
- alignVertical places whole tiles aligned to the center, left or right of a column
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
Optional align
Horizontal?: number Optional align
Vertical?: number Optional backUVs?: Vector4
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Optional frontUVs?: Vector4
Optional height?: number
Optional pattern?: number
Optional side
Orientation?: number Optional size?: number
Optional tile
Height?: number Optional tile
Size?: number Optional tile
Width?: number Optional width?: number
Returns VertexData
the VertexData of the tiled plane
Create Torus
Creates a torus mesh
- The parameter
diameter
sets the diameter size (float) of the torus (default 1) - The parameter
thickness
sets the diameter size of the tube of the torus (float, default 0.5) - The parameter
tessellation
sets the number of torus sides (positive integer, default 16) - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created.
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; diameter?: number; frontUVs?: Vector4; sideOrientation?: number; tessellation?: number; thickness?: number; updatable?: boolean }
defines the options used to create the mesh
Optional scene: Scene
defines the hosting scene
Returns Mesh
the torus mesh
- The parameter
Create Torus Knot
Creates a torus knot mesh
- The parameter
radius
sets the global radius size (float) of the torus knot (default 2) - The parameter
radialSegments
sets the number of sides on each tube segments (positive integer, default 32) - The parameter
tubularSegments
sets the number of tubes to decompose the knot into (positive integer, default 32) - The parameters
p
andq
are the number of windings on each axis (positive integers, default 2 and 3) - You can also set the mesh side orientation with the values : BABYLON.Mesh.FRONTSIDE (default), BABYLON.Mesh.BACKSIDE or BABYLON.Mesh.DOUBLESIDE
- If you create a double-sided mesh, you can choose what parts of the texture image to crop and stick respectively on the front and the back sides with the parameters
frontUVs
andbackUVs
(Vector4). Detail here : https://doc.babylonjs.com/features/featuresDeepDive/mesh/creation/set#side-orientation - The mesh can be set to updatable with the boolean parameter
updatable
(default false) if its internal geometry is supposed to change once created.
Parameters
name: string
defines the name of the mesh
Optional options: { backUVs?: Vector4; frontUVs?: Vector4; p?: number; q?: number; radialSegments?: number; radius?: number; sideOrientation?: number; tube?: number; tubularSegments?: number; updatable?: boolean }
defines the options used to create the mesh
Optional scene: Scene
defines the hosting scene
Returns Mesh
the torus knot mesh
- The parameter
Create Torus Knot Vertex Data
Creates the VertexData for a TorusKnot
Parameters
options: { backUVs?: Vector4; frontUVs?: Vector4; p?: number; q?: number; radialSegments?: number; radius?: number; sideOrientation?: number; tube?: number; tubularSegments?: number }
an object used to set the following optional parameters for the TorusKnot, required but can be empty
- radius the radius of the torus knot, optional, default 2
- tube the thickness of the tube, optional, default 0.5
- radialSegments the number of sides on each tube segments, optional, default 32
- tubularSegments the number of tubes to decompose the knot into, optional, default 32
- p the number of windings around the z axis, optional, default 2
- q the number of windings around the x axis, optional, default 3
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Returns VertexData
the VertexData of the Torus Knot
Create Torus Vertex Data
Creates the VertexData for a torus
Parameters
options: { backUVs?: Vector4; diameter?: number; frontUVs?: Vector4; sideOrientation?: number; tessellation?: number; thickness?: number }
an object used to set the following optional parameters for the box, required but can be empty
- diameter the diameter of the torus, optional default 1
- thickness the diameter of the tube forming the torus, optional default 0.5
- tessellation the number of prism sides, 3 for a triangular prism, optional, default 24
- sideOrientation optional and takes the values : Mesh.FRONTSIDE (default), Mesh.BACKSIDE or Mesh.DOUBLESIDE
- frontUvs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the front side, optional, default vector4 (0, 0, 1, 1)
- backUVs only usable when you create a double-sided mesh, used to choose what parts of the texture image to crop and apply on the back side, optional, default vector4 (0, 0, 1, 1)
Returns VertexData
the VertexData of the torus
Create Tube
Creates a tube mesh. The tube is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters
- The parameter
path
is a required array of successive Vector3. It is the curve used as the axis of the tube - The parameter
radius
(positive float, default 1) sets the tube radius size - The parameter
tessellation
(positive float, default 64) is the number of sides on the tubular surface - The parameter
radiusFunction
(javascript function, d
- The parameter
Defines how the parser contract is defined. These parsers are used to parse a list of specific assets (like particle systems, etc..)