Namespace BABYLON
Index
Namespaces
Enumerations
- Animated
Input Block Types - Animation
Key Interpolation - Asset
Task State - Conditional
Block Conditions - Coordinate
- Debug
Layer Tab - Depth
OfField Effect Blur Level - Device
Input Event Type - Device
Type - Dual
Sense Input - Dual
Shock Button - Dual
Shock Dpad - Dual
Shock Input - 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 - 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
Radial Impulse Falloff - Physics
Updraft Mode - Point
Color - Pointer
Input - Pose
Enabled Controller Type - Property
Type For Edition - Scene
Loader Animation Group Loading Mode - Shader
Language - Simplification
Type - Space
- Sub
Emitter Type - Switch
Input - Timer
State - Tonemapping
Operator - Trigonometry
Block Operations - Wave
Block Kind - WebXRNear
Controller Mode - WebXRState
- WebXRTracking
State - XRHand
Joint - 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
OrNot Evaluator - Angle
- Animatable
- Animation
- 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 - Ascii
Art Font Texture - Ascii
Art Post Process - Asset
Container - Assets
Manager - Assets
Progress Event - Async
Loop - Attach
ToBox Behavior - Audio
Engine - Audio
Scene Component - Auto
Rotation Behavior - Axis
- Axis
Drag Gizmo - Axis
Scale Gizmo - Babylon
File Loader Configuration - Back
Ease - Background
Material - Baked
Vertex Animation Manager - 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 - Binary
File Asset Task - Black
And White Post Process - Bloom
Effect - Bloom
Merge Post Process - Blur
Post Process - 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 - Brick
Procedural Texture - Buffer
- CSG
- Camera
- Camera
Gizmo - Camera
Inputs Manager - Cascaded
Shadow Generator - Cell
Material - Chromatic
Aberration Post Process - Circle
Ease - Circle
OfConfusion Post Process - Clamp
Block - Clear
Coat Block - Clip
Planes Block - Clipboard
Event Types - Clipboard
Info - Cloud
Block - Cloud
Point - Cloud
Procedural Texture - Color3
- Color3
Gradient - Color4
- Color
Correction Post Process - Color
Curves - Color
Gradient - Color
Grading Texture - Color
Merger Block - Color
Splitter Block - Combine
Action - Compute
Effect - Compute
Pressure Observer Wrapper - Compute
Shader - Condition
- Conditional
Block - Cone
Particle Emitter - Constants
- Container
Asset Task - Convolution
Post Process - Cross
Block - Cube
Map ToSpherical Polynomial Tools - Cube
Texture - Cube
Texture Asset Task - Cubic
Ease - Current
Screen Block - Curve3
- 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 - Deep
Copier - Default
Loading Screen - Default
Rendering Pipeline - Deferred
- Depth
OfField Blur Post Process - Depth
OfField Effect - Depth
OfField Merge Post Process - Depth
OfField Merge Post Process Options - 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 - Digital
Rain Font Texture - Digital
Rain Post Process - Directional
Light - Directional
Light Frustum Viewer - Discard
Block - Display
Pass Post Process - Distance
Block - Distance
Joint - Divide
Block - Do
Nothing Action - Dot
Block - Draco
Compression - Dual
Shock Pad - Dynamic
Float32 Array - Dynamic
Texture - 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
InOut Behavior - Files
Input - Files
Input Store - Filter
Post Process - Fire
Material - Fire
Procedural Texture - 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 - 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 - Grass
Procedural Texture - Grid
Material - Ground
Mesh - HDRCube
Texture - HDRCube
Texture Asset Task - HDRFiltering
- HDRTools
- Hand
Constraint Behavior - Hardware
Scaling Optimization - Hemispheric
Light - Hemispheric
Particle Emitter - Highlight
Layer - Highlights
Post Process - Hinge2
Joint - 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 - 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 - Logger
- MTLFile
Loader - Marble
Procedural Texture - Material
- Material
Defines - Material
Flags - Material
Helper - Material
Plugin Base - Material
Plugin Manager - Material
Stencil State - Matrix
- Matrix
Builder Block - Max
Block - Merge
Meshes Optimization - Mesh
- Mesh
Asset Task - Mesh
Exploder - MeshLODLevel
- Mesh
Particle Emitter - 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 - 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
Map Procedural Texture - 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 - PBRMaterial
- PBRMetallic
Roughness Block - PBRMetallic
Roughness Material - PBRSheen
Configuration - PBRSpecular
Glossiness Material - PBRSub
Surface Configuration - Panorama
ToCube 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 - Perlin
Noise Procedural Texture - Perturb
Normal Block - Photo
Dome - Physics
Engine - Physics
Engine Scene Component - Physics
Gravitational Field Event - Physics
Helper - Physics
Impostor - Physics
Joint - Physics
Radial Explosion Event - Physics
Radial Explosion Event Options - Physics
Raycast Result - 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 - 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 - Procedural
Texture - Procedural
Texture Scene Component - Promise
Polyfill - 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 - Road
Procedural Texture - Rolling
Average - Rotate2d
Block - Rotation
Gizmo - Runtime
Animation - SSAO2
Configuration - SSAO2
Rendering Pipeline - SSAORendering
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 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
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 - Slice
Tools - Smart
Array - Smart
Array NoDuplicate - Smooth
Step Block - Solid
Parser - Solid
Particle - Solid
Particle System - Solid
Particle Vertex - Sound
- Sound
Track - Sphere
Directed Particle Emitter - Sphere
Particle Emitter - Spherical
Harmonics - Spherical
Polynomial - Spot
Light - Sprite
- Sprite
Manager - Sprite
Map - Sprite
Packed Manager - Sprite
Renderer - Sprite
Scene Component - Standard
Material - Standard
Rendering Pipeline - Starfield
Procedural Texture - 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 - 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
Material Helper - 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 Material - Trigonometry
Block - Twirl
Block - Uniform
Buffer - Unique
IdGenerator - 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
ToSingleview Post Process - 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 - 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 - Wood
Procedural Texture - Worker
Pool - Worley
Noise3DBlock - XRWindows
Motion Controller - Xbox360
Pad - _
Basis Texture Loader
Interfaces
- 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 - IAction
- IAction
Event - IAgent
Parameters - IAnimatable
- IAnimation
Key - IAscii
Art Post Process Options - IAssets
Progress Event - IAudio
Engine - IAudio
Engine Options - IBaked
Vertex Animation Manager - IBehavior
Aware - IBone
Weight Shader Options - ICamera
Input - ICanvas
- ICanvas
Gradient - ICanvas
Rendering Context - IClip
Planes Holder - ICompute
Effect Creation Options - ICompute
Pipeline Context - ICompute
Pressure Data - ICompute
Pressure Thresholds - ICompute
Shader Options - ICreate
Capsule Options - ICrowd
- ICullable
- ICustom
Animation Frame Requester - ICustom
Shader Name Resolve Options - ICustom
Shader Options - IData
Buffer - IDevice
Event - IDevice
Input System - IDigital
Rain Post Process Options - 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 - IEvent
- IExplorer
Extensibility Group - IExplorer
Extensibility Option - IExport
Options - IFile
Request - IGLTFLoader
Data - IGLTFLoader
Extension - IGLTFValidation
Configuration - IGet
Set Vertices Data - IGlow
Layer Options - IHDRFiltering
Options - IHighlight
Layer Options - IHtml
Element Texture Options - IIOption
Shadow Depth Material - IImage
- IInspectable
- IInspectable
Options - IInspector
Options - IInternal
Texture Loader - IKeyboard
Event - ILoading
Screen - IMaterial
Compilation Options - IMeshopt
Compression Configuration - IMinimal
Motion Controller Object - 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 - INative
Input - INav
Mesh Parameters - INavigation
Engine Plugin - 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
Enabled Object - IPhysics
Engine - IPipeline
Context - IPointer
Event - IProperty
Description For Edition - IRegistered
Plugin - IRender
Target Texture - IRendering
Manager Auto Clear Setup - 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 - 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 - Physics
Affected Impostor With Data - Physics
Gravitational Field Event Data - Physics
Hit Data - Physics
Impostor Joint - Physics
Impostor Parameters - Physics
Joint Data - Physics
Radial Explosion Event Data - Physics
Updraft Event Data - Physics
Vortex Event Data - Plane
Rotation Gizmo Options - Pointer
Touch - Pose
Controlled - Pre
Pass Effect Configuration - Render
Target Creation Options - Rotation
Gizmo Options - Scene
Options - Spring
Joint Data - Twgsl
Options - VRExperience
Helper Options - VRTeleportation
Options - Video
Recorder Options - Video
Texture Settings - Virtual
Joystick Customizations - WebGPUEngine
Options - WebVROptions
- WebXRRender
Target
Type aliases
- 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 - Environment
Texture Info - Evaluate
Sub Mesh Stage Action - Float
Array - Goldberg
Creation Option - Goldberg
Data - Goldberg
Vertex Data Option - IFresnel
Parameters Creation Options - IFresnel
Parameters Serialized - Immutable
- Indices
Array - Individual
Babylon File Parser - Mesh
Stage Action - Motion
Controller Component State Type - Motion
Controller Component Type - Motion
Controller Constructor - Motion
Controller Handedness - Node
Constructor - Nullable
- OBJLoading
Options - Perf
Strategy Initialization - Plugin
Material Factory - Pointer
Move Stage Action - Pointer
UpDown Stage Action - Post
Process Options - Pre
Active Mesh Stage Action - Primitive
- Render
Target Stage Action - 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 - Virtual
Mesh Info - WebXRComposition
Layer Type - WebXRController
Movement Feature Context - WebXRController
Movement Registration Configuration - WebXRController
Movement State - 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 - Decode
- Decode
Base64 ToBinary - Decode
Base64 ToString - Disc
Builder - Dom
Management - Encode
Array Buffer ToBase64 - Ends
With - Environment
Texture Tools - Epsilon
- GUID
- Get
EnvironmentBRDFTexture - Get
Internal Format From Basis Format - Ground
Builder - Hemisphere
Builder - Ico
Sphere Builder - Lathe
Builder - Lines
Builder - Load
Texture From Transcode Result - Mesh
Builder - PHI
- Pad
Number - Plane
Builder - Polygon
Builder - Polyhedron
Builder - Ribbon
Builder - Screenshot
Tools - Shape
Builder - Sphere
Builder - Starts
With - String
Tools - TGATools
- Texture
Tools - Tiled
Box Builder - Tiled
Plane Builder - To
Gamma Space - To
Linear Space - Torus
Builder - Torus
Knot Builder - Transcode
Async - Tube
Builder - renderable
Texture Format ToIndex
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
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
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 - 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 - GetTGAHeader
- Is
Document Available - Is
Identifier Char - Is
Navigator Available - Is
Window Object Exist - RandomGUID
- Register
Material Plugin - Remove
Comments - Skip
Whitespaces - To
Half Float - 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 - createPBRSheen
Plugin - createPBRSub
Surface Plugin - editable
InProperty Page - expand
ToProperty - extract
Min And Max - extract
Min And Max Indexed - serialize
- serialize
AsCamera Reference - serialize
AsColor3 - serialize
AsColor4 - serialize
AsColor Curves - serialize
AsFresnel Parameters - serialize
AsImage Processing Configuration - serialize
AsMatrix - serialize
AsMesh Reference - serialize
AsQuaternion - serialize
AsTexture - serialize
AsVector2 - serialize
AsVector3 - set
And Start Timer
Type aliases
Babylon File Parser
Type declaration
-
-
Parameters
-
parsedData: any
-
scene: Scene
-
container: AssetContainer
-
rootUrl: string
Returns void
-
-
Camera Stage Action
Strong typing of a Camera related stage step action
Type declaration
-
-
Parameters
-
camera: Camera
Returns void
-
-
Camera Stage Frame Buffer Action
Strong typing of a Camera Frame buffer related stage step action
Type declaration
-
-
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
- 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
Type declaration
Device Input
Type to handle enforcement of inputs
Type parameters
-
T: DeviceType
Environment Texture Info
Raw texture data and descriptor sufficient for WebGL texture upload
Evaluate Sub Mesh Stage Action
Strong typing of a Evaluate Sub Mesh related stage step action
Type declaration
-
-
Parameters
-
mesh: AbstractMesh
-
subMesh: SubMesh
Returns void
-
-
Float Array
Alias type for number array or Float32Array
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 AtPole: 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]
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
Defines how the individual parser contract is defined. These parser can parse an individual asset
Type declaration
-
-
Parameters
-
parsedData: any
-
scene: Scene
-
rootUrl: string
Returns any
-
-
Mesh Stage Action
Strong typing of a Mesh related stage step action
Type declaration
-
-
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
A construction function type to create a new controller based on an xrInput object
Type declaration
-
-
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.
Node Constructor
Defines how a node can be built from a string name.
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
Initializer callback for a strategy
Type declaration
-
-
Parameters
-
scene: Scene
Returns IPerfViewerCollectionStrategy
-
-
Plugin Material Factory
Type for plugin material factories.
Type declaration
-
-
Parameters
-
material: Material
Returns Nullable<MaterialPluginBase>
-
-
Pointer Move Stage Action
Strong typing of a pointer move action.
Type declaration
-
-
Parameters
-
unTranslatedPointerX: number
-
unTranslatedPointerY: number
-
pickResult: Nullable<PickingInfo>
-
isMeshPicked: boolean
-
element: Nullable<HTMLElement>
Returns Nullable<PickingInfo>
-
-
Pointer UpDown Stage Action
Strong typing of a pointer up/down action.
Type declaration
-
-
Parameters
-
unTranslatedPointerX: number
-
unTranslatedPointerY: number
-
pickResult: Nullable<PickingInfo>
-
evt: IPointerEvent
Returns Nullable<PickingInfo>
-
-
Post Process Options
Size options for a post process
Type declaration
-
height: number
-
width: number
Pre Active Mesh Stage Action
Strong typing of a pre active Mesh related stage step action
Type declaration
-
-
Parameters
-
mesh: AbstractMesh
Returns void
-
-
Primitive
Alias type for primitive types
Render Target Stage Action
Strong typing of a Render Target related stage step action
Type declaration
-
-
Parameters
-
renderTarget: RenderTargetTexture
-
Optional faceIndex: number
-
Optional layer: number
Returns void
-
-
Render Targets Stage Action
Strong typing of a render target action.
Type declaration
-
-
Parameters
-
renderTargets: SmartArrayNoDuplicate<RenderTargetTexture>
Returns void
-
-
Rendering Group Stage Action
Strong typing of a RenderingGroup related stage step action
Type declaration
-
-
Parameters
-
renderingGroupId: number
Returns void
-
-
Rendering Mesh Stage Action
Strong typing of a Mesh Render related stage step action
Scene Loader Success Callback
Type used for the success callback of ImportMesh
Type declaration
-
-
Parameters
-
meshes: AbstractMesh[]
-
particleSystems: IParticleSystem[]
-
skeletons: Skeleton[]
-
animationGroups: AnimationGroup[]
-
transformNodes: TransformNode[]
-
geometries: Geometry[]
-
lights: Light[]
Returns void
-
-
Shader Custom Processing Function
Function for custom code generation
Type declaration
-
-
Parameters
-
shaderType: string
-
code: string
Returns string
-
-
Simple Stage Action
Strong typing of a simple stage step action
Type declaration
-
-
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
Type used to define predicate used to select faces when a mesh intersection is detected
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
WebXRDom Overlay Type
Type of DOM overlay provided by UA.
WebXRFeature Constructor
Defining the constructor of a feature. Used to register the modules.
Type declaration
-
-
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.
Type declaration
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
Const BRDFTexture Tools
Class used to host texture specific utilities
Type declaration
-
Get
EnvironmentBRDFTexture: (scene: Scene) => BaseTexture Gets a default environment BRDF for MS-BRDF Height Correlated BRDF
-
-
Parameters
-
scene: Scene
Returns BaseTexture
-
-
-
Const Basis Tools
Used to load .Basis files See https://github.com/BinomialLLC/basis_universal/tree/master/webgl
Type declaration
-
Get
Internal Format From Basis Format: (basisFormat: number, engine: Engine) => number Get the internal format to be passed to texImage2D corresponding to the .basis format value
-
-
Parameters
-
basisFormat: number
-
engine: Engine
Returns number
-
-
-
-
JSModuleURL: string
URL to use when loading the basis transcoder
-
Load
Texture From Transcode Result: (texture: InternalTexture, transcodeResult: TranscodeResult) => void Loads a texture from the transcode result
-
-
Parameters
-
texture: InternalTexture
-
transcodeResult: TranscodeResult
Returns void
-
-
-
-
Transcode
Async: (data: ArrayBuffer | ArrayBufferView, config: BasisTranscodeConfiguration) => Promise<TranscodeResult> Transcodes a loaded image file to compressed pixel data
-
-
Parameters
-
data: ArrayBuffer | ArrayBufferView
-
config: BasisTranscodeConfiguration
Returns Promise<TranscodeResult>
-
-
-
-
Wasm
ModuleURL: string URL to use when loading the wasm module for the transcoder
Const 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
Const Box Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Box: typeof CreateBox
Const Capsule Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Capsule: typeof CreateCapsule
Const 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
Const Cylinder Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Cylinder: typeof CreateCylinder
Const Decal Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Decal: typeof CreateDecal
Const Decode
Decodes a buffer into a string
Type declaration
-
-
Parameters
-
buffer: Uint8Array | Uint16Array
Returns string
-
-
Const Decode Base64 ToBinary
Converts a given base64 string into an ArrayBuffer of raw byte data
Type declaration
-
-
Parameters
-
base64Data: string
Returns ArrayBuffer
-
-
Const Decode Base64 ToString
Converts a given base64 string as an ASCII encoded stream of data
Type declaration
-
-
Parameters
-
base64Data: string
Returns string
-
-
Const Disc Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Disc: typeof CreateDisc
Const 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
Const Encode Array Buffer ToBase64
Encode a buffer to a base64 string
Type declaration
-
-
Parameters
-
buffer: ArrayBuffer | ArrayBufferView
Returns string
-
-
Const Ends With
Checks for a matching suffix at the end of a string (for ES5 and lower)
Type declaration
-
-
Parameters
-
str: string
-
suffix: string
Returns boolean
-
-
Const 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.
Let Epsilon
Constant used to define the minimal number value in Babylon.js
Const 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"
Const Get EnvironmentBRDFTexture
Gets a default environment BRDF for MS-BRDF Height Correlated BRDF
Type declaration
-
-
Parameters
-
scene: Scene
Returns BaseTexture
-
-
Const Get Internal Format From Basis Format
Get the internal format to be passed to texImage2D corresponding to the .basis format value
Type declaration
-
-
Parameters
-
basisFormat: number
-
engine: Engine
Returns number
-
-
Const Ground Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Ground: typeof CreateGround -
Create
Ground From Height Map: typeof CreateGroundFromHeightMap -
Create
Tiled Ground: typeof CreateTiledGround
Const Hemisphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Hemisphere: typeof CreateHemisphere
Const Ico Sphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Ico Sphere: typeof CreateIcoSphere
Const Lathe Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Lathe: typeof CreateLathe
Const Lines Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Dashed Lines: typeof CreateDashedLines -
Create
Line System: typeof CreateLineSystem -
Create
Lines: typeof CreateLines
Const Load Texture From Transcode Result
Loads a texture from the transcode result
Type declaration
-
-
Parameters
-
texture: InternalTexture
-
transcodeResult: TranscodeResult
Returns void
-
-
Const Mesh Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Box: typeof CreateBox -
Create
Capsule: typeof CreateCapsule -
Create
Cylinder: typeof CreateCylinder -
Create
Dashed Lines: typeof CreateDashedLines -
Create
Decal: typeof CreateDecal -
Create
Disc: typeof CreateDisc -
Create
Geodesic: typeof CreateGeodesic -
Create
Goldberg: typeof CreateGoldberg -
Create
Ground: typeof CreateGround -
Create
Ground From Height Map: typeof CreateGroundFromHeightMap -
Create
Ico Sphere: typeof CreateIcoSphere -
Create
Lathe: typeof CreateLathe -
Create
Line System: typeof CreateLineSystem -
Create
Lines: typeof CreateLines -
Create
Plane: typeof CreatePlane -
Create
Polygon: typeof CreatePolygon -
Create
Polyhedron: typeof CreatePolyhedron -
Create
Ribbon: typeof CreateRibbon -
Create
Sphere: typeof CreateSphere -
Create
Tiled Box: typeof CreateTiledBox -
Create
Tiled Ground: typeof CreateTiledGround -
Create
Tiled Plane: typeof CreateTiledPlane -
Create
Torus: typeof CreateTorus -
Create
Torus Knot: typeof CreateTorusKnot -
Create
Tube: typeof CreateTube -
Extrude
Polygon: typeof ExtrudePolygon -
Extrude
Shape: typeof ExtrudeShape -
Extrude
Shape Custom: typeof ExtrudeShapeCustom
Const PHI
Constant Golden Ratio value in Babylon.js
Const Pad Number
Converts a number to string and pads with preceding zeroes until it is of specified length.
Type declaration
-
-
Parameters
-
num: number
-
length: number
Returns string
-
-
Const Plane Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Plane: typeof CreatePlane
Const Polygon Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Polygon: typeof CreatePolygon -
Extrude
Polygon: typeof ExtrudePolygon
Const Polyhedron Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Polyhedron: typeof CreatePolyhedron
Const Ribbon Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Ribbon: typeof CreateRibbon
Const 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)
Const Shape Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Extrude
Shape: typeof ExtrudeShape -
Extrude
Shape Custom: typeof ExtrudeShapeCustom
Const Sphere Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Sphere: typeof CreateSphere
Const Starts With
Checks for a matching suffix at the beginning of a string (for ES5 and lower)
Type declaration
-
-
Parameters
-
str: string
-
suffix: string
Returns boolean
-
-
Const String Tools
Helper to manipulate strings
Type declaration
-
Decode: (buffer: Uint8Array | Uint16Array) => string
-
-
Parameters
-
buffer: Uint8Array | Uint16Array
Returns string
-
-
-
-
Decode
Base64 ToBinary: (base64Data: string) => ArrayBuffer -
-
Parameters
-
base64Data: string
Returns ArrayBuffer
-
-
-
-
Decode
Base64 ToString: (base64Data: string) => string -
-
Parameters
-
base64Data: string
Returns string
-
-
-
-
Encode
Array Buffer ToBase64: (buffer: ArrayBuffer | ArrayBufferView) => string -
-
Parameters
-
buffer: ArrayBuffer | ArrayBufferView
Returns string
-
-
-
-
Ends
With: (str: string, suffix: string) => boolean -
-
Parameters
-
str: string
-
suffix: string
Returns boolean
-
-
-
-
Pad
Number: (num: number, length: number) => string -
-
Parameters
-
num: number
-
length: number
Returns string
-
-
-
-
Starts
With: (str: string, suffix: string) => boolean -
-
Parameters
-
str: string
-
suffix: string
Returns boolean
-
-
-
Const TGATools
Based on jsTGALoader - Javascript loader for TGA file By Vincent Thibault
Type declaration
-
GetTGAHeader: typeof GetTGAHeader
Gets the header of a TGA file
Const 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
Const Tiled Box Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Tiled Box: typeof CreateTiledBox
Const Tiled Plane Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Tiled Plane: typeof CreateTiledPlane
Const 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
Const Torus Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Torus: typeof CreateTorus
Const Torus Knot Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Torus Knot: typeof CreateTorusKnot
Const Transcode Async
Transcodes a loaded image file to compressed pixel data
Type declaration
-
-
Parameters
-
data: ArrayBuffer | ArrayBufferView
-
config: BasisTranscodeConfiguration
Returns Promise<TranscodeResult>
-
-
Const Tube Builder
Class containing static functions to help procedurally build meshes
Type declaration
-
Create
Tube: typeof CreateTube
Const renderable Texture Format ToIndex
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
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/how_to/createbox_per_face_textures_and_colors
- 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/babylon101/discover_basic_elements#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/babylon101/discover_basic_elements#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
-
options: { arc?: number | undefined; backUVs?: Vector4 | undefined; cap?: number | undefined; diameter?: number | undefined; diameterBottom?: number | undefined; diameterTop?: number | undefined; enclose?: boolean | undefined; faceColors?: Color4[] | undefined; faceUV?: Vector4[] | undefined; frontUVs?: Vector4 | undefined; hasRings?: boolean | undefined; height?: number | undefined; sideOrientation?: number | undefined; subdivisions?: number | undefined; tessellation?: number | undefined; updatable?: boolean | undefined } | undefined
defines the options used to create the mesh
-
scene: any
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/how_to/how_to_dynamically_morph_a_mesh#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
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; 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/babylon101/discover_basic_elements#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 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
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
-
options: { height?: number | undefined; subdivisions?: number | undefined; subdivisionsX?: number | undefined; subdivisionsY?: number | undefined; updatable?: boolean | undefined; width?: number | undefined } | undefined
defines the options used to create the mesh
-
scene: any
defines the hosting scene
Returns Mesh
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; onReady?: (mesh: GroundMesh) => void; subdivisions?: number; updatable?: boolean; width?: number }
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 on
Ready?: (mesh: GroundMesh) => void -
-
Parameters
-
mesh: GroundMesh
Returns void
-
-
-
-
Optional subdivisions?: number
-
Optional updatable?: boolean
-
Optional width?: number
-
-
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
-
options: { diameter?: number | undefined; segments?: number | undefined; sideOrientation?: number | undefined } | undefined
defines the options used to create the mesh
-
scene: any
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/babylon101/discover_basic_elements#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 Array<Array<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/babylon101/discover_basic_elements#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/how_to/how_to_dynamically_morph_a_mesh#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/how_to/how_to_dynamically_morph_a_mesh#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/babylon101/discover_basic_elements#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 backUVs?: Vector4
-
Optional depth?: number
-
Optional face
Colors?: Color4[] -
Optional faceUV?: Vector4[]
-
Optional frontUVs?: Vector4
-
Optional holes?: Vector3[][]
-
shape: Vector3[]
-
Optional side
Orientation?: number -
Optional smoothing
Threshold?: number -
Optional updatable?: boolean
-
Optional wrap?: boolean
-
-
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
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/how_to/createbox_per_face_textures_and_colors - 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/babylon101/discover_basic_elements#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/how_to/how_to_dynamically_morph_a_mesh#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/babylon101/discover_basic_elements#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: IScreenshotSize | number
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: IScreenshotSize | number
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: IScreenshotSize | number
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
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)
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: IScreenshotSize | number
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)
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/babylon101/discover_basic_elements#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 arc?: number
-
Optional backUVs?: Vector4
-
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
-
Optional updatable?: boolean
-
-
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 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
- 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 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)
- 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 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/babylon101/discover_basic_elements#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
-
options: { backUVs?: Vector4 | undefined; diameter?: number | undefined; frontUVs?: Vector4 | undefined; sideOrientation?: number | undefined; tessellation?: number | undefined; thickness?: number | undefined; updatable?: boolean | undefined } | undefined
defines the options used to create the mesh
-
scene: any
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/babylon101/discover_basic_elements#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
-
options: { backUVs?: Vector4 | undefined; frontUVs?: Vector4 | undefined; p?: number | undefined; q?: number | undefined; radialSegments?: number | undefined; radius?: number | undefined; sideOrientation?: number | undefined; tube?: number | undefined; tubularSegments?: number | undefined; updatable?: boolean | undefined } | undefined
defines the options used to create the mesh
-
scene: any
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, default null) is a vanilla javascript function. If it is not null, it overrides the parameterradius
- This function is called on each point of the tube path and is passed the index
i
of the i-th point and the distance of this point from the first point of the path. It must return a radius value (positive float) - The parameter
arc
(positive float, maximum 1, default 1) is the ratio to apply to the tube circumference : 2 x PI x 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 - The optional parameter
instance
is an instance of an existing Tube object to be updated with the passedpathArray
parameter : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#tube - 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/babylon101/discover_basic_elements#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; frontUVs?: Vector4; instance?: Mesh; invertUV?: boolean; path: Vector3[]; radius?: number; radiusFunction?: (i: number, distance: number) => number; sideOrientation?: number; tessellation?: number; updatable?: boolean }
defines the options used to create the mesh
-
Optional arc?: number
-
Optional backUVs?: Vector4
-
Optional cap?: number
-
Optional frontUVs?: Vector4
-
Optional instance?: Mesh
-
Optional invertUV?: boolean
-
path: Vector3[]
-
Optional radius?: number
-
Optional radius
Function?: (i: number, distance: number) => number -
-
Parameters
-
i: number
-
distance: number
Returns number
-
-
-
-
Optional side
Orientation?: number -
Optional tessellation?: number
-
Optional updatable?: boolean
-
-
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the tube mesh
- The parameter
Escape Reg Exp
-
Escapes a string so that it is usable as a regular expression
Parameters
-
s: string
string to escape
Returns string
escaped string
-
Extract Between Markers
-
Extracts the characters between two markers (for eg, between "(" and ")"). The function handles nested markers as well as markers inside strings (delimited by ", ' or `) and comments
Parameters
-
markerOpen: string
opening marker
-
markerClose: string
closing marker
-
block: string
code block to parse
-
startIndex: number
starting index in block where the extraction must start. The character at block[startIndex] should be the markerOpen character!
Returns number
index of the last character for the extraction (or -1 if the string is invalid - no matching closing marker found). The string to extract (without the markers) is the string between startIndex + 1 and the returned value (exclusive)
-
Extrude Polygon
-
Creates an extruded polygon mesh, with depth in the Y direction.
- You can set different colors and different images to the top, bottom and extruded side by using the parameters
faceColors
(an array of 3 Color3 elements) andfaceUV
(an array of 3 Vector4 elements)
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; 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
- You can set different colors and different images to the top, bottom and extruded side by using the parameters
Extrude Shape
-
Creates an extruded shape mesh. The extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
- The parameter
shape
is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis. - The parameter
path
is a required array of successive Vector3. This is the axis curve the shape is extruded along. - The parameter
rotation
(float, default 0 radians) is the angle value to rotate the shape each step (each path point), from the former step (so rotation added each step) along the curve. - The parameter
scale
(float, default 1) is the value to scale the shape. - The parameter
closeShape
(boolean, default false) closes the shape when true. - The parameter
closePath
(boolean, default false) closes the path when true and no caps. - 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 - The optional parameter
instance
is an instance of an existing ExtrudedShape object to be updated with the passedshape
,path
,scale
orrotation
parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape - Remember you can only change the shape or path point positions, not their number when updating an extruded shape.
- 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/babylon101/discover_basic_elements#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: { backUVs?: Vector4; cap?: number; closePath?: boolean; closeShape?: boolean; frontUVs?: Vector4; instance?: Mesh; invertUV?: boolean; path: Vector3[]; rotation?: number; scale?: number; shape: Vector3[]; sideOrientation?: number; updatable?: boolean }
defines the options used to create the mesh
-
Optional backUVs?: Vector4
-
Optional cap?: number
-
Optional close
Path?: boolean -
Optional close
Shape?: boolean -
Optional frontUVs?: Vector4
-
Optional instance?: Mesh
-
Optional invertUV?: boolean
-
path: Vector3[]
-
Optional rotation?: number
-
Optional scale?: number
-
shape: Vector3[]
-
Optional side
Orientation?: number -
Optional updatable?: boolean
-
-
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the extruded shape mesh
- The parameter
Extrude Shape Custom
-
Creates an custom extruded shape mesh. The custom extrusion is a parametric shape. It has no predefined shape. Its final shape will depend on the input parameters.
- The parameter
shape
is a required array of successive Vector3. This array depicts the shape to be extruded in its local space : the shape must be designed in the xOy plane and will be extruded along the Z axis. - The parameter
path
is a required array of successive Vector3. This is the axis curve the shape is extruded along. - The parameter
rotationFunction
(JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path - It must returns a float value that will be the rotation in radians applied to the shape on each path point.
- The parameter
scaleFunction
(JS function) is a custom Javascript function called on each path point. This function is passed the position i of the point in the path and the distance of this point from the beginning of the path - It must returns a float value that will be the scale value applied to the shape on each path point
- The parameter
closeShape
(boolean, default false) forces the extrusion underlying ribbon to close all the shape paths in itspathArray
- The parameter
closePath
(boolean, default false) forces the extrusion underlying ribbon to close itspathArray
when no caps - The parameter
ribbonClosePath
(boolean, default false) forces the extrusion underlying ribbon to close all the paths in itspathArray
- depreciated in favor of closeShape - The parameter
ribbonCloseArray
(boolean, default false) forces the extrusion underlying ribbon to close itspathArray
- depreciated in favor of closePath - 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 - The optional parameter
instance
is an instance of an existing ExtrudedShape object to be updated with the passedshape
,path
,scale
orrotation
parameters : https://doc.babylonjs.com/how_to/how_to_dynamically_morph_a_mesh#extruded-shape - Remember you can only change the shape or path point positions, not their number when updating an extruded shape
- 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/babylon101/discover_basic_elements#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: { backUVs?: Vector4; cap?: number; closePath?: boolean; closeShape?: boolean; frontUVs?: Vector4; instance?: Mesh; invertUV?: boolean; path: Vector3[]; ribbonCloseArray?: boolean; ribbonClosePath?: boolean; rotationFunction?: Nullable<(i: number, distance: number) => number>; scaleFunction?: Nullable<(i: number, distance: number) => number>; shape: Vector3[]; sideOrientation?: number; updatable?: boolean }
defines the options used to create the mesh
-
Optional backUVs?: Vector4
-
Optional cap?: number
-
Optional close
Path?: boolean -
Optional close
Shape?: boolean -
Optional frontUVs?: Vector4
-
Optional instance?: Mesh
-
Optional invertUV?: boolean
-
path: Vector3[]
-
Optional ribbon
Close Array?: boolean -
Optional ribbon
Close Path?: boolean -
Optional rotation
Function?: Nullable<(i: number, distance: number) => number> -
Optional scale
Function?: Nullable<(i: number, distance: number) => number> -
shape: Vector3[]
-
Optional side
Orientation?: number -
Optional updatable?: boolean
-
-
Optional scene: Nullable<Scene>
defines the hosting scene
Returns Mesh
the custom extruded shape mesh
- The parameter
Find Backward
-
Finds the first occurrence of a character in a string going backward
Parameters
-
s: string
the string to parse
-
index: number
starting index in the string
-
c: string
the character to find
Returns number
the index of the character if found, else -1
-
From Half Float
-
Converts a half float to a number
Parameters
-
value: number
half float to convert
Returns number
converted half float
-
Generate Base64 String From Pixel Data
-
Transform some pixel data to a base64 string
Parameters
-
pixels: ArrayBufferView
defines the pixel data to transform to base64
-
size: ISize
defines the width and height of the (texture) data
-
Optional invertY: boolean
true if the data must be inverted for the Y coordinate during the conversion
Returns Nullable<string>
The base64 encoded string or null
-
Generate Base64 String From Texture
-
Reads the pixels stored in the webgl texture and returns them as a base64 string
Parameters
-
texture: BaseTexture
defines the texture to read pixels from
-
Optional faceIndex: number
defines the face of the texture to read (in case of cube texture)
-
Optional level: number
defines the LOD level of the texture to read (in case of Mip Maps)
Returns Nullable<string>
The base64 encoded string or null
-
Generate Base64 String From Texture Async
-
Reads the pixels stored in the webgl texture and returns them as a base64 string
Parameters
-
texture: BaseTexture
defines the texture to read pixels from
-
Optional faceIndex: number
defines the face of the texture to read (in case of cube texture)
-
Optional level: number
defines the LOD level of the texture to read (in case of Mip Maps)
Returns Promise<Nullable<string>>
The base64 encoded string or null wrapped in a promise
-
GetDOMText Content
-
Extracts text content from a DOM element hierarchy
Parameters
-
element: HTMLElement
defines the root element
Returns string
a string
-
Get Env Info
-
Gets the environment info from an env file.
Parameters
-
data: ArrayBufferView
The array buffer containing the .env bytes.
Returns Nullable<EnvironmentTextureInfoV2>
the environment file info (the json header) if successfully parsed, normalized to the latest supported version.
-
GetTGAHeader
-
Gets the header of a TGA file
Parameters
-
data: Uint8Array
defines the TGA data
Returns any
the header
-
Is Document Available
-
Check if the document object exists
Returns boolean
true if the document object exists
Is Identifier Char
-
Checks if a character is an identifier character (meaning, if it is 0-9, A-Z, a-z or _)
Parameters
-
c: string
character to check
Returns boolean
true if the character is an identifier character
-
Is Navigator Available
-
Checks if the navigator object exists
Returns boolean
true if the navigator object exists
Is Window Object Exist
-
Checks if the window object exists
Returns boolean
true if the window object exists
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"
Returns string
a pseudo random id
Register Material Plugin
-
Registers a new material plugin through a factory, or updates it. This makes the plugin available to all materials instantiated after its registration.
Parameters
-
pluginName: string
The plugin name
-
factory: PluginMaterialFactory
The factory function which allows to create the plugin
Returns void
-
Remove Comments
-
Removes the comments of a code block
Parameters
-
block: string
code block to parse
Returns string
block with the comments removed
-
Skip Whitespaces
-
Parses a string and skip whitespaces
Parameters
-
s: string
string to parse
-
index: number
index where to start parsing
Returns number
the index after all whitespaces have been skipped
-
To Half Float
-
Converts a number to half float
Parameters
-
value: number
number to convert
Returns number
converted number
-
Unregister All Material Plugins
-
Clear the list of global material plugins
Returns void
Unregister Material Plugin
-
Removes a material plugin from the list of global plugins.
Parameters
-
pluginName: string
The plugin name
Returns boolean
true if the plugin has been removed, else false
-
Upload Env Levels Async
-
Uploads the texture info contained in the env file to the GPU.
Parameters
-
texture: InternalTexture
defines the internal texture to upload to
-
data: ArrayBufferView
defines the data to load
-
info: EnvironmentTextureInfo
defines the texture info retrieved through the GetEnvInfo method
Returns Promise<void>
a promise
-
Upload Env Spherical
-
Uploads spherical polynomials information to the texture.
Parameters
-
texture: InternalTexture
defines the texture we are trying to upload the information to
-
info: EnvironmentTextureInfo
defines the environment texture info retrieved through the GetEnvInfo method
Returns void
-
Upload Levels Async
-
Uploads the levels of image data to the GPU.
Parameters
-
texture: InternalTexture
defines the internal texture to upload to
-
imageData: ArrayBufferView[][]
defines the array buffer views of image data [mipmap][face]
-
Optional imageType: string
the mime type of the image data
Returns Promise<void>
a promise
-
allocate And Copy Typed Buffer
-
Allocate a typed array depending on a texture type. Optionally can copy existing data in the buffer.
Parameters
-
type: number
type of the texture
-
sizeOrDstBuffer: number | ArrayBuffer
size of the array OR an existing buffer that will be used as the destination of the copy (if copyBuffer is provided)
-
Optional sizeInBytes: boolean
true if the size of the array is given in bytes, false if it is the number of elements of the array
-
Optional copyBuffer: ArrayBuffer
if provided, buffer to copy into the destination buffer (either a newly allocated buffer if sizeOrDstBuffer is a number or use sizeOrDstBuffer as the destination buffer otherwise)
Returns ArrayBufferView
the allocated buffer or sizeOrDstBuffer if the latter is an ArrayBuffer
-
class Name
-
Use this className as a decorator on a given class definition to add it a name and optionally its module. You can then use the Tools.getClassName(obj) on an instance to retrieve its class name. This method is the only way to get it done in all cases, even if the .js file declaring the class is minified
Parameters
-
name: string
The name of the class, case should be preserved
-
Optional module: string
The name of the Module hosting the class, optional, but strongly recommended to specify if possible. Case should be preserved.
Returns (target: Object) => void
-
-
Parameters
-
target: Object
Returns void
-
-
-
create Detail Map Plugin
-
Creates an instance of the detail map plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
createPBRAnisotropic Plugin
-
Creates an instance of the anisotropic plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
createPBRBRDFPlugin
-
Creates an instance of the brdf plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
createPBRClear Coat Plugin
-
Creates an instance of the clear coat plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
createPBRSheen Plugin
-
Creates an instance of the sheen plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
createPBRSub Surface Plugin
-
Creates an instance of the sub surface plugin
Parameters
-
material: Material
parent material the plugin will be created for
Returns Nullable<MaterialPluginBase>
the plugin instance or null if the plugin is incompatible with material
-
editable InProperty Page
-
Decorator that flags a property in a node material block as being editable
Parameters
-
displayName: string
-
Optional propertyType: PropertyTypeForEdition
-
Optional groupName: string
-
Optional options: IEditablePropertyOption
Returns (target: any, propertyKey: string) => void
-
-
Parameters
-
target: any
-
propertyKey: string
Returns void
-
-
-
expand ToProperty
-
Parameters
-
callback: string
-
Optional targetKey: Nullable<string>
Returns (target: any, propertyKey: string) => void
-
-
Parameters
-
target: any
-
propertyKey: string
Returns void
-
-
-
extract Min And Max
-
Extracts minimum and maximum values from a list of positions
Parameters
-
positions: FloatArray
defines the positions to use
-
start: number
defines the start index in the positions array
-
count: number
defines the number of positions to handle
-
Optional bias: Nullable<Vector2>
defines bias value to add to the result
-
Optional stride: number
defines the stride size to use (distance between two positions in the positions array)
Returns { maximum: Vector3; minimum: Vector3 }
minimum and maximum values
-
extract Min And Max Indexed
-
Extracts minimum and maximum values from a list of indexed positions
Parameters
-
positions: FloatArray
defines the positions to use
-
indices: IndicesArray
defines the indices to the positions
-
indexStart: number
defines the start index
-
indexCount: number
defines the end index
-
Optional bias: Nullable<Vector2>
defines bias value to add to the result
Returns { maximum: Vector3; minimum: Vector3 }
minimum and maximum values
-
serialize
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsCamera Reference
-
Decorator used to define property that can be serialized as reference to a camera
Parameters
-
Optional sourceName: string
defines the name of the property to decorate
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsColor3
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsColor4
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsColor Curves
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsFresnel Parameters
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsImage Processing Configuration
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsMatrix
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsMesh Reference
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsQuaternion
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsTexture
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsVector2
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
serialize AsVector3
-
Parameters
-
Optional sourceName: string
Returns (target: any, propertyKey: string | symbol) => void
-
-
Parameters
-
target: any
-
propertyKey: string | symbol
Returns void
-
-
-
set And Start Timer
-
A simple version of the timer. Will take options and start the timer immediately after calling it
Parameters
-
options: ITimerOptions<any>
options with which to initialize this timer
Returns Nullable<Observer<any>>
-
Defines how the parser contract is defined. These parsers are used to parse a list of specific assets (like particle systems, etc..)