|
@@ -1,75 +1,75 @@
|
|
|
module INSPECTOR {
|
|
|
-
|
|
|
+
|
|
|
export const 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';
|
|
|
+ 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 : [],
|
|
|
+ 'type_not_defined': {
|
|
|
+ properties: [],
|
|
|
format: () => ''
|
|
|
},
|
|
|
-
|
|
|
- 'Vector2' : {
|
|
|
+
|
|
|
+ 'Vector2': {
|
|
|
type: BABYLON.Vector2,
|
|
|
properties: ['x', 'y'],
|
|
|
- format: (vec : BABYLON.Vector2) => {return `x:${Helpers.Trunc(vec.x)}, y:${Helpers.Trunc(vec.y)}`;}
|
|
|
+ format: (vec: BABYLON.Vector2) => { return `x:${Helpers.Trunc(vec.x)}, y:${Helpers.Trunc(vec.y)}`; }
|
|
|
},
|
|
|
- 'Vector3' : {
|
|
|
+ '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)}`}
|
|
|
+ format: (vec: BABYLON.Vector3) => { return `x:${Helpers.Trunc(vec.x)}, y:${Helpers.Trunc(vec.y)}, z:${Helpers.Trunc(vec.z)}` }
|
|
|
},
|
|
|
- 'Color3' : {
|
|
|
+ 'Color3': {
|
|
|
type: BABYLON.Color3,
|
|
|
- properties : ['r', 'g', 'b'],
|
|
|
- format: (color: BABYLON.Color3) => { return `R:${color.r}, G:${color.g}, B:${color.b}`}
|
|
|
+ properties: ['r', 'g', 'b'],
|
|
|
+ format: (color: BABYLON.Color3) => { return `R:${color.r}, G:${color.g}, B:${color.b}` }
|
|
|
},
|
|
|
- 'Quaternion' : {
|
|
|
+ 'Quaternion': {
|
|
|
type: BABYLON.Quaternion,
|
|
|
- properties : ['x', 'y', 'z', 'w']
|
|
|
+ properties: ['x', 'y', 'z', 'w']
|
|
|
},
|
|
|
- 'Size' : {
|
|
|
+ 'Size': {
|
|
|
type: BABYLON.Size,
|
|
|
- properties :['width', 'height'],
|
|
|
- format: (size:BABYLON.Size) => { return `Size - w:${Helpers.Trunc(size.width)}, h:${Helpers.Trunc(size.height)}`}
|
|
|
+ properties: ['width', 'height'],
|
|
|
+ format: (size: BABYLON.Size) => { return `Size - w:${Helpers.Trunc(size.width)}, h:${Helpers.Trunc(size.height)}` }
|
|
|
},
|
|
|
- 'Texture' : {
|
|
|
+ 'Texture': {
|
|
|
type: BABYLON.Texture,
|
|
|
- properties :[
|
|
|
- 'hasAlpha',
|
|
|
- 'level',
|
|
|
- 'name',
|
|
|
- 'wrapU',
|
|
|
- 'wrapV',
|
|
|
- 'uScale',
|
|
|
- 'vScale',
|
|
|
- 'uAng',
|
|
|
- 'vAng',
|
|
|
- 'wAng',
|
|
|
- 'uOffset',
|
|
|
+ properties: [
|
|
|
+ 'hasAlpha',
|
|
|
+ 'level',
|
|
|
+ 'name',
|
|
|
+ 'wrapU',
|
|
|
+ 'wrapV',
|
|
|
+ 'uScale',
|
|
|
+ 'vScale',
|
|
|
+ 'uAng',
|
|
|
+ 'vAng',
|
|
|
+ 'wAng',
|
|
|
+ 'uOffset',
|
|
|
'vOffset'
|
|
|
],
|
|
|
- format: (tex:BABYLON.Texture) => { return tex.name}
|
|
|
+ format: (tex: BABYLON.Texture) => { return tex.name }
|
|
|
},
|
|
|
-
|
|
|
- 'ArcRotateCamera' : {
|
|
|
+
|
|
|
+ 'ArcRotateCamera': {
|
|
|
type: BABYLON.ArcRotateCamera,
|
|
|
- properties : [
|
|
|
+ properties: [
|
|
|
'position',
|
|
|
- 'alpha',
|
|
|
- 'beta',
|
|
|
+ 'alpha',
|
|
|
+ 'beta',
|
|
|
'radius',
|
|
|
'angularSensibilityX',
|
|
|
'angularSensibilityY',
|
|
|
- 'target',
|
|
|
+ 'target',
|
|
|
|
|
|
'lowerAlphaLimit',
|
|
|
'lowerBetaLimit',
|
|
@@ -82,13 +82,14 @@ module INSPECTOR {
|
|
|
'wheelPrecision',
|
|
|
'allowUpsideDown',
|
|
|
'checkCollisions'
|
|
|
- ]
|
|
|
+ ]
|
|
|
},
|
|
|
|
|
|
- 'FreeCamera' : {
|
|
|
+ 'FreeCamera': {
|
|
|
type: BABYLON.FreeCamera,
|
|
|
- properties : [
|
|
|
+ properties: [
|
|
|
'position',
|
|
|
+ 'rotation',
|
|
|
'ellipsoid',
|
|
|
'applyGravity',
|
|
|
'angularSensibility',
|
|
@@ -98,53 +99,53 @@ module INSPECTOR {
|
|
|
'keysRight',
|
|
|
'onCollide',
|
|
|
'checkCollisions'
|
|
|
- ]
|
|
|
+ ]
|
|
|
},
|
|
|
-
|
|
|
- 'Scene' : {
|
|
|
+
|
|
|
+ 'Scene': {
|
|
|
type: BABYLON.Scene,
|
|
|
- properties:[
|
|
|
- 'actionManager',
|
|
|
- 'activeCamera',
|
|
|
- 'ambientColor',
|
|
|
+ properties: [
|
|
|
+ 'actionManager',
|
|
|
+ 'activeCamera',
|
|
|
+ 'ambientColor',
|
|
|
'clearColor',
|
|
|
'forceWireframe',
|
|
|
'forcePointsCloud',
|
|
|
'forceShowBoundingBoxes',
|
|
|
'useRightHandedSystem',
|
|
|
'hoverCursor',
|
|
|
- 'cameraToUseForPointers',
|
|
|
- 'fogEnabled',
|
|
|
- 'fogColor',
|
|
|
- 'fogDensity',
|
|
|
- 'fogStart',
|
|
|
- 'fogEnd',
|
|
|
- 'shadowsEnabled',
|
|
|
- 'lightsEnabled',
|
|
|
+ 'cameraToUseForPointers',
|
|
|
+ 'fogEnabled',
|
|
|
+ 'fogColor',
|
|
|
+ 'fogDensity',
|
|
|
+ 'fogStart',
|
|
|
+ 'fogEnd',
|
|
|
+ 'shadowsEnabled',
|
|
|
+ 'lightsEnabled',
|
|
|
'collisionsEnabled',
|
|
|
'gravity',
|
|
|
- 'meshUnderPointer',
|
|
|
- 'pointerX',
|
|
|
- 'pointerY',
|
|
|
+ 'meshUnderPointer',
|
|
|
+ 'pointerX',
|
|
|
+ 'pointerY',
|
|
|
'uid'
|
|
|
- ]
|
|
|
+ ]
|
|
|
},
|
|
|
'Mesh': {
|
|
|
type: BABYLON.Mesh,
|
|
|
- properties : [
|
|
|
- 'name',
|
|
|
- 'position',
|
|
|
- 'rotation',
|
|
|
- 'rotationQuaternion',
|
|
|
- 'absolutePosition',
|
|
|
+ properties: [
|
|
|
+ 'name',
|
|
|
+ 'position',
|
|
|
+ 'rotation',
|
|
|
+ 'rotationQuaternion',
|
|
|
+ 'absolutePosition',
|
|
|
'material',
|
|
|
- 'actionManager',
|
|
|
- 'visibility',
|
|
|
- 'isVisible',
|
|
|
- 'isPickable',
|
|
|
+ 'actionManager',
|
|
|
+ 'visibility',
|
|
|
+ 'isVisible',
|
|
|
+ 'isPickable',
|
|
|
'renderingGroupId',
|
|
|
- 'receiveShadows',
|
|
|
- 'renderOutline',
|
|
|
+ 'receiveShadows',
|
|
|
+ 'renderOutline',
|
|
|
'outlineColor',
|
|
|
'outlineWidth',
|
|
|
'renderOverlay',
|
|
@@ -154,102 +155,102 @@ module INSPECTOR {
|
|
|
'useVertexColors',
|
|
|
'layerMask',
|
|
|
'alwaysSelectAsActiveMesh',
|
|
|
- 'ellipsoid',
|
|
|
- 'ellipsoidOffset',
|
|
|
- 'edgesWidth',
|
|
|
- 'edgesColor',
|
|
|
+ 'ellipsoid',
|
|
|
+ 'ellipsoidOffset',
|
|
|
+ 'edgesWidth',
|
|
|
+ 'edgesColor',
|
|
|
'checkCollisions',
|
|
|
'hasLODLevels'
|
|
|
],
|
|
|
- format : (m:BABYLON.Mesh) : string => {return m.name;}
|
|
|
- },
|
|
|
- 'StandardMaterial' : {
|
|
|
+ format: (m: BABYLON.Mesh): string => { return m.name; }
|
|
|
+ },
|
|
|
+ 'StandardMaterial': {
|
|
|
type: BABYLON.StandardMaterial,
|
|
|
- properties : [
|
|
|
- 'name',
|
|
|
+ properties: [
|
|
|
+ 'name',
|
|
|
'alpha',
|
|
|
- 'alphaMode',
|
|
|
- 'wireframe',
|
|
|
- 'isFrozen',
|
|
|
+ 'alphaMode',
|
|
|
+ 'wireframe',
|
|
|
+ 'isFrozen',
|
|
|
'zOffset',
|
|
|
-
|
|
|
- 'ambientColor',
|
|
|
- 'emissiveColor',
|
|
|
- 'diffuseColor',
|
|
|
+
|
|
|
+ 'ambientColor',
|
|
|
+ 'emissiveColor',
|
|
|
+ 'diffuseColor',
|
|
|
'specularColor',
|
|
|
-
|
|
|
- 'specularPower',
|
|
|
- 'useAlphaFromDiffuseTexture',
|
|
|
+
|
|
|
+ 'specularPower',
|
|
|
+ 'useAlphaFromDiffuseTexture',
|
|
|
'linkEmissiveWithDiffuse',
|
|
|
'useSpecularOverAlpha',
|
|
|
-
|
|
|
- 'diffuseFresnelParameters',
|
|
|
- 'opacityFresnelParameters',
|
|
|
- 'reflectionFresnelParameters',
|
|
|
- 'refractionFresnelParameters',
|
|
|
+
|
|
|
+ 'diffuseFresnelParameters',
|
|
|
+ 'opacityFresnelParameters',
|
|
|
+ 'reflectionFresnelParameters',
|
|
|
+ 'refractionFresnelParameters',
|
|
|
'emissiveFresnelParameters',
|
|
|
-
|
|
|
- 'diffuseTexture',
|
|
|
- 'emissiveTexture',
|
|
|
- 'specularTexture',
|
|
|
+
|
|
|
+ 'diffuseTexture',
|
|
|
+ 'emissiveTexture',
|
|
|
+ 'specularTexture',
|
|
|
'ambientTexture',
|
|
|
'bumpTexture',
|
|
|
- 'lightMapTexture',
|
|
|
- 'opacityTexture',
|
|
|
+ 'lightMapTexture',
|
|
|
+ 'opacityTexture',
|
|
|
'reflectionTexture',
|
|
|
- 'refractionTexture'
|
|
|
+ 'refractionTexture'
|
|
|
],
|
|
|
- format : (mat:BABYLON.StandardMaterial) : string => {return mat.name;}
|
|
|
+ format: (mat: BABYLON.StandardMaterial): string => { return mat.name; }
|
|
|
},
|
|
|
- 'PrimitiveAlignment':{
|
|
|
+ 'PrimitiveAlignment': {
|
|
|
type: BABYLON.PrimitiveAlignment,
|
|
|
- properties:['horizontal', 'vertical']
|
|
|
+ properties: ['horizontal', 'vertical']
|
|
|
},
|
|
|
- 'PrimitiveThickness':{
|
|
|
+ 'PrimitiveThickness': {
|
|
|
type: BABYLON.PrimitiveThickness,
|
|
|
- properties:['topPixels', 'leftPixels', 'rightPixels', 'bottomPixels']
|
|
|
+ properties: ['topPixels', 'leftPixels', 'rightPixels', 'bottomPixels']
|
|
|
},
|
|
|
- 'BoundingInfo2D':{
|
|
|
+ 'BoundingInfo2D': {
|
|
|
type: BABYLON.BoundingInfo2D,
|
|
|
- properties:['radius','center', 'extent']
|
|
|
+ properties: ['radius', 'center', 'extent']
|
|
|
},
|
|
|
- 'SolidColorBrush2D':{
|
|
|
+ 'SolidColorBrush2D': {
|
|
|
type: BABYLON.SolidColorBrush2D,
|
|
|
- properties:['color']
|
|
|
+ properties: ['color']
|
|
|
},
|
|
|
- 'GradientColorBrush2D':{
|
|
|
+ 'GradientColorBrush2D': {
|
|
|
type: BABYLON.GradientColorBrush2D,
|
|
|
- properties:['color1', 'color2', 'translation', 'rotation', 'scale']
|
|
|
+ properties: ['color1', 'color2', 'translation', 'rotation', 'scale']
|
|
|
},
|
|
|
- 'PBRMaterial' : {
|
|
|
+ 'PBRMaterial': {
|
|
|
type: BABYLON.PBRMaterial,
|
|
|
properties: [
|
|
|
- 'name',
|
|
|
- 'albedoColor',
|
|
|
- 'albedoTexture',
|
|
|
+ 'name',
|
|
|
+ 'albedoColor',
|
|
|
+ 'albedoTexture',
|
|
|
|
|
|
- 'opacityTexture',
|
|
|
- 'reflectionTexture',
|
|
|
- 'emissiveTexture',
|
|
|
- 'bumpTexture',
|
|
|
- 'lightmapTexture',
|
|
|
+ 'opacityTexture',
|
|
|
+ 'reflectionTexture',
|
|
|
+ 'emissiveTexture',
|
|
|
+ 'bumpTexture',
|
|
|
+ 'lightmapTexture',
|
|
|
|
|
|
- 'opacityFresnelParameters',
|
|
|
- 'emissiveFresnelParameters',
|
|
|
+ 'opacityFresnelParameters',
|
|
|
+ 'emissiveFresnelParameters',
|
|
|
|
|
|
- 'linkEmissiveWithAlbedo',
|
|
|
- 'useLightmapAsShadowmap',
|
|
|
+ 'linkEmissiveWithAlbedo',
|
|
|
+ 'useLightmapAsShadowmap',
|
|
|
|
|
|
- 'useAlphaFromAlbedoTexture',
|
|
|
- 'useSpecularOverAlpha',
|
|
|
- 'useAutoMicroSurfaceFromReflectivityMap',
|
|
|
- 'useLogarithmicDepth',
|
|
|
+ 'useAlphaFromAlbedoTexture',
|
|
|
+ 'useSpecularOverAlpha',
|
|
|
+ 'useAutoMicroSurfaceFromReflectivityMap',
|
|
|
+ 'useLogarithmicDepth',
|
|
|
|
|
|
'reflectivityColor',
|
|
|
'reflectivityTexture',
|
|
|
'reflectionTexture',
|
|
|
'reflectionColor',
|
|
|
-
|
|
|
+
|
|
|
'alpha',
|
|
|
'linkRefractionWithTransparency',
|
|
|
'indexOfRefraction',
|
|
@@ -267,7 +268,7 @@ module INSPECTOR {
|
|
|
'cameraColorCurves'
|
|
|
]
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|