| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425 |
- module INSPECTOR {
- export var PROPERTIES = {
- /** Format the given object :
- * If a format function exists, returns the result of this function.
- * If this function doesn't exists, return the object type instead */
- format: (obj: any) => {
- let type = Helpers.GET_TYPE(obj) || 'type_not_defined';
- if (PROPERTIES[type] && PROPERTIES[type].format) {
- return PROPERTIES[type].format(obj);
- } else {
- return Helpers.GET_TYPE(obj);
- }
- },
- 'type_not_defined': {
- properties: [],
- format: () => ''
- },
- 'Vector2': {
- type: BABYLON.Vector2,
- properties: ['x', 'y'],
- format: (vec: BABYLON.Vector2) => { return `x:${Helpers.Trunc(vec.x)}, y:${Helpers.Trunc(vec.y)}`; }
- },
- 'Vector3': {
- type: BABYLON.Vector3,
- properties: ['x', 'y', 'z'],
- format: (vec: BABYLON.Vector3) => { return `x:${Helpers.Trunc(vec.x)}, y:${Helpers.Trunc(vec.y)}, z:${Helpers.Trunc(vec.z)}` }
- },
- 'Color3': {
- type: BABYLON.Color3,
- properties: ['r', 'g', 'b'],
- format: (color: BABYLON.Color3) => { return `R:${color.r}, G:${color.g}, B:${color.b}` }
- },
- 'Quaternion': {
- type: BABYLON.Quaternion,
- properties: ['x', 'y', 'z', 'w']
- },
- 'Size': {
- type: BABYLON.Size,
- properties: ['width', 'height'],
- format: (size: BABYLON.Size) => { return `Size - w:${Helpers.Trunc(size.width)}, h:${Helpers.Trunc(size.height)}` }
- },
- 'Texture': {
- type: BABYLON.Texture,
- properties: [
- 'hasAlpha',
- 'level',
- 'name',
- 'wrapU',
- 'wrapV',
- 'uScale',
- 'vScale',
- 'uAng',
- 'vAng',
- 'wAng',
- 'uOffset',
- 'vOffset'
- ],
- format: (tex: BABYLON.Texture) => { return tex.name }
- },
- 'MapTexture': {
- type: BABYLON.MapTexture
- },
- 'RenderTargetTexture': {
- type: BABYLON.RenderTargetTexture
- },
- 'DynamicTexture': {
- type: BABYLON.DynamicTexture
- },
- 'BaseTexture': {
- type: BABYLON.BaseTexture
- },
- 'CubeTexture': {
- type: BABYLON.CubeTexture
- },
- 'HDRCubeTexture': {
- type: BABYLON.HDRCubeTexture
- },
- 'FontTexture': {
- type: BABYLON.FontTexture
- },
- 'Sound': {
- type: BABYLON.Sound,
- properties: [
- 'name',
- 'autoplay',
- 'loop',
- 'useCustomAttenuation',
- 'soundTrackId',
- 'spatialSound',
- 'refDistance',
- 'rolloffFactor',
- 'maxDistance',
- 'distanceModel',
- 'isPlaying',
- 'isPaused'
- ]
- },
- 'ArcRotateCamera': {
- type: BABYLON.ArcRotateCamera,
- properties: [
- 'position',
- 'alpha',
- 'beta',
- 'radius',
- 'angularSensibilityX',
- 'angularSensibilityY',
- 'target',
- 'lowerAlphaLimit',
- 'lowerBetaLimit',
- 'upperAlphaLimit',
- 'upperBetaLimit',
- 'lowerRadiusLimit',
- 'upperRadiusLimit',
- 'pinchPrecision',
- 'wheelPrecision',
- 'allowUpsideDown',
- 'checkCollisions'
- ]
- },
- 'FreeCamera': {
- type: BABYLON.FreeCamera,
- properties: [
- 'position',
- 'rotation',
- 'rotationQuaternion',
- 'cameraDirection',
- 'cameraRotation',
- 'ellipsoid',
- 'applyGravity',
- 'angularSensibility',
- 'keysUp',
- 'keysDown',
- 'keysLeft',
- 'keysRight',
- 'checkCollisions',
- 'speed',
- 'lockedTarget',
- 'noRotationConstraint',
- 'fov',
- 'inertia',
- 'minZ', 'maxZ',
- 'layerMask',
- 'mode',
- 'orthoBottom',
- 'orthoTop',
- 'orthoLeft',
- 'orthoRight'
- ]
- },
- 'Scene': {
- type: BABYLON.Scene,
- properties: [
- 'actionManager',
- 'activeCamera',
- 'ambientColor',
- 'clearColor',
- 'forceWireframe',
- 'forcePointsCloud',
- 'forceShowBoundingBoxes',
- 'useRightHandedSystem',
- 'hoverCursor',
- 'cameraToUseForPointers',
- 'fogEnabled',
- 'fogColor',
- 'fogDensity',
- 'fogStart',
- 'fogEnd',
- 'shadowsEnabled',
- 'lightsEnabled',
- 'collisionsEnabled',
- 'gravity',
- 'meshUnderPointer',
- 'pointerX',
- 'pointerY',
- 'uid'
- ]
- },
- 'Mesh': {
- type: BABYLON.Mesh,
- properties: [
- 'name',
- 'position',
- 'rotation',
- 'rotationQuaternion',
- 'absolutePosition',
- 'material',
- 'actionManager',
- 'visibility',
- 'isVisible',
- 'isPickable',
- 'renderingGroupId',
- 'receiveShadows',
- 'renderOutline',
- 'outlineColor',
- 'outlineWidth',
- 'renderOverlay',
- 'overlayColor',
- 'overlayAlpha',
- 'hasVertexAlpha',
- 'useVertexColors',
- 'layerMask',
- 'alwaysSelectAsActiveMesh',
- 'ellipsoid',
- 'ellipsoidOffset',
- 'edgesWidth',
- 'edgesColor',
- 'checkCollisions',
- 'hasLODLevels'
- ],
- format: (m: BABYLON.Mesh): string => { return m.name; }
- },
- 'StandardMaterial': {
- type: BABYLON.StandardMaterial,
- properties: [
- 'name',
- 'alpha',
- 'alphaMode',
- 'wireframe',
- 'isFrozen',
- 'zOffset',
- 'ambientColor',
- 'emissiveColor',
- 'diffuseColor',
- 'specularColor',
- 'specularPower',
- 'useAlphaFromDiffuseTexture',
- 'linkEmissiveWithDiffuse',
- 'useSpecularOverAlpha',
- 'diffuseFresnelParameters',
- 'opacityFresnelParameters',
- 'reflectionFresnelParameters',
- 'refractionFresnelParameters',
- 'emissiveFresnelParameters',
- 'diffuseTexture',
- 'emissiveTexture',
- 'specularTexture',
- 'ambientTexture',
- 'bumpTexture',
- 'lightMapTexture',
- 'opacityTexture',
- 'reflectionTexture',
- 'refractionTexture'
- ],
- format: (mat: BABYLON.StandardMaterial): string => { return mat.name; }
- },
- 'PrimitiveAlignment': {
- type: BABYLON.PrimitiveAlignment,
- properties: ['horizontal', 'vertical']
- },
- 'PrimitiveThickness': {
- type: BABYLON.PrimitiveThickness,
- properties: ['topPixels', 'leftPixels', 'rightPixels', 'bottomPixels']
- },
- 'BoundingInfo2D': {
- type: BABYLON.BoundingInfo2D,
- properties: ['radius', 'center', 'extent']
- },
- 'SolidColorBrush2D': {
- type: BABYLON.SolidColorBrush2D,
- properties: ['color']
- },
- 'GradientColorBrush2D': {
- type: BABYLON.GradientColorBrush2D,
- properties: ['color1', 'color2', 'translation', 'rotation', 'scale']
- },
- 'PBRMaterial': {
- type: BABYLON.PBRMaterial,
- properties: [
- 'name',
- 'albedoColor',
- 'albedoTexture',
- 'opacityTexture',
- 'reflectionTexture',
- 'emissiveTexture',
- 'bumpTexture',
- 'lightmapTexture',
- 'opacityFresnelParameters',
- 'emissiveFresnelParameters',
- 'linkEmissiveWithAlbedo',
- 'useLightmapAsShadowmap',
- 'useAlphaFromAlbedoTexture',
- 'useSpecularOverAlpha',
- 'useAutoMicroSurfaceFromReflectivityMap',
- 'useLogarithmicDepth',
- 'reflectivityColor',
- 'reflectivityTexture',
- 'reflectionTexture',
- 'reflectionColor',
- 'alpha',
- 'linkRefractionWithTransparency',
- 'indexOfRefraction',
- 'microSurface',
- 'useMicroSurfaceFromReflectivityMapAlpha',
- 'directIntensity',
- 'emissiveIntensity',
- 'specularIntensity',
- 'environmentIntensity',
- 'cameraExposure',
- 'cameraContrast',
- 'cameraColorGradingTexture',
- 'cameraColorCurves'
- ]
- },
- 'Canvas2D': {
- type: BABYLON.Canvas2D
- },
- 'Canvas2DEngineBoundData': {
- type: BABYLON.Canvas2DEngineBoundData
- },
- 'Ellipse2D': {
- type: BABYLON.Ellipse2D
- },
- 'Ellipse2DInstanceData': {
- type: BABYLON.Ellipse2DInstanceData
- },
- 'Ellipse2DRenderCache': {
- type: BABYLON.Ellipse2DRenderCache
- },
- 'Group2D': {
- type: BABYLON.Group2D
- },
- 'IntersectInfo2D': {
- type: BABYLON.IntersectInfo2D
- },
- 'Lines2D': {
- type: BABYLON.Lines2D
- },
- 'Lines2DInstanceData': {
- type: BABYLON.Lines2DInstanceData
- },
- 'Lines2DRenderCache': {
- type: BABYLON.Lines2DRenderCache
- },
- 'PrepareRender2DContext': {
- type: BABYLON.PrepareRender2DContext
- },
- 'Prim2DBase': {
- type: BABYLON.Prim2DBase
- },
- 'Prim2DClassInfo': {
- type: BABYLON.Prim2DClassInfo
- },
- 'Prim2DPropInfo': {
- type: BABYLON.Prim2DPropInfo
- },
- 'Rectangle2D': {
- type: BABYLON.Rectangle2D
- },
- 'Rectangle2DInstanceData': {
- type: BABYLON.Rectangle2DInstanceData
- },
- 'Rectangle2DRenderCache': {
- type: BABYLON.Rectangle2DRenderCache
- },
- 'Render2DContext': {
- type: BABYLON.Render2DContext
- },
- 'RenderablePrim2D': {
- type: BABYLON.RenderablePrim2D
- },
- 'ScreenSpaceCanvas2D': {
- type: BABYLON.ScreenSpaceCanvas2D
- },
- 'Shape2D': {
- type: BABYLON.Shape2D
- },
- 'Shape2DInstanceData': {
- type: BABYLON.Shape2DInstanceData
- },
- 'Sprite2D': {
- type: BABYLON.Sprite2D
- },
- 'Sprite2DInstanceData': {
- type: BABYLON.Sprite2DInstanceData
- },
- 'Sprite2DRenderCache': {
- type: BABYLON.Sprite2DRenderCache
- },
- 'Text2D': {
- type: BABYLON.Text2D
- },
- 'Text2DInstanceData': {
- type: BABYLON.Text2DInstanceData
- },
- 'Text2DRenderCache': {
- type: BABYLON.Text2DRenderCache
- },
- 'WorldSpaceCanvas2D': {
- type: BABYLON.WorldSpaceCanvas2D
- },
- 'WorldSpaceCanvas2DNode': {
- type: BABYLON.WorldSpaceCanvas2DNode
- },
- 'PhysicsImpostor': {
- type: BABYLON.PhysicsImpostor,
- properties: [
- 'friction',
- 'mass',
- 'restitution',
- ]
- },
- }
- }
|