소스 검색

Revert "First version of the Interaction support in Canvas2D"

This reverts commit e6fab96e208afdc9e3641eb6262bbd6399fe87a8, reversing
changes made to 9dd9daf61e4a0c1171266016c96a4823ee5d6262.
nockawa 9 년 전
부모
커밋
dced2760bc

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1027
.vs/config/applicationhost.config


+ 0 - 444
Babylon.js.csproj

@@ -1,444 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <Import Project="packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
-  <Import Project="packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props')" />
-  <Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
-  <Import Project="..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>
-    </ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}</ProjectGuid>
-    <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Babylon.js</RootNamespace>
-    <AssemblyName>Babylon.js</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
-    <UseIISExpress>true</UseIISExpress>
-    <IISExpressSSLPort />
-    <IISExpressAnonymousAuthentication />
-    <IISExpressWindowsAuthentication />
-    <IISExpressUseClassicPipelineMode />
-    <UseGlobalApplicationHostFile />
-    <NuGetPackageImportStamp>
-    </NuGetPackageImportStamp>
-    <TypeScriptToolsVersion>1.8</TypeScriptToolsVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
-      <HintPath>packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Web.DynamicData" />
-    <Reference Include="System.Web.Entity" />
-    <Reference Include="System.Web.ApplicationServices" />
-    <Reference Include="System.ComponentModel.DataAnnotations" />
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Web.Extensions" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Drawing" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Xml" />
-    <Reference Include="System.Configuration" />
-    <Reference Include="System.Web.Services" />
-    <Reference Include="System.EnterpriseServices" />
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="assets\BrickWall.png" />
-    <Content Include="assets\brickwall_nh.png" />
-    <Content Include="assets\rock.png" />
-    <Content Include="assets\rock2.png" />
-    <Content Include="assets\rock_nh.png" />
-    <Content Include="index.html" />
-    <Content Include="packages.config" />
-    <Content Include="src\Shaders\legacypbr.fragment.fx" />
-    <Content Include="src\Shaders\legacypbr.vertex.fx" />
-    <Content Include="src\Shaders\pbr.fragment.fx" />
-    <Content Include="src\Shaders\pbr.vertex.fx" />
-    <Content Include="src\Shaders\rect2d.fragment.fx" />
-    <Content Include="src\Shaders\rect2d.vertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\bonesDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\bonesVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\bumpFragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\bumpFragmentFunctions.fx" />
-    <Content Include="src\Shaders\ShadersInclude\clipPlaneFragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\clipPlaneFragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\clipPlaneVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\clipPlaneVertexDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\fogFragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\fogFragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\fogVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\fogVertexDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\fresnelFunction.fx" />
-    <Content Include="src\Shaders\ShadersInclude\helperFunctions.fx" />
-    <Content Include="src\Shaders\ShadersInclude\instancesDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\instancesVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light0Fragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light0FragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light1Fragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light1FragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light2Fragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light2FragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light3Fragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\light3FragmentDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\lightsFragmentFunctions.fx" />
-    <Content Include="src\Shaders\ShadersInclude\logDepthDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\logDepthFragment.fx" />
-    <Content Include="src\Shaders\ShadersInclude\logDepthVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\pointCloudVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\pointCloudVertexDeclaration.fx" />
-    <Content Include="src\Shaders\ShadersInclude\reflectionFunction.fx" />
-    <Content Include="src\Shaders\ShadersInclude\shadowsFragmentFunctions.fx" />
-    <Content Include="src\Shaders\ShadersInclude\shadowsVertex.fx" />
-    <Content Include="src\Shaders\ShadersInclude\shadowsVertexDeclaration.fx" />
-    <Content Include="src\Shaders\sprite2d.fragment.fx" />
-    <Content Include="src\Shaders\sprite2d.vertex.fx" />
-    <Content Include="src\Shaders\text2d.vertex.fx" />
-    <Content Include="src\Shaders\text2d.fragment.fx" />
-    <Content Include="Tools\Gulp\config.json" />
-    <Content Include="dist\preview release\what%27s new.md" />
-    <None Include="Web.Debug.config">
-      <DependentUpon>Web.config</DependentUpon>
-    </None>
-    <None Include="Web.Release.config">
-      <DependentUpon>Web.config</DependentUpon>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <Content Include="src\.gitignore" />
-    <Content Include="src\Shaders\anaglyph.fragment.fx" />
-    <Content Include="src\Shaders\blackAndWhite.fragment.fx" />
-    <Content Include="src\Shaders\blur.fragment.fx" />
-    <Content Include="src\Shaders\chromaticAberration.fragment.fx" />
-    <Content Include="src\Shaders\color.fragment.fx" />
-    <Content Include="src\Shaders\color.vertex.fx" />
-    <Content Include="src\Shaders\colorCorrection.fragment.fx" />
-    <Content Include="src\Shaders\convolution.fragment.fx" />
-    <Content Include="src\Shaders\default.fragment.fx" />
-    <Content Include="src\Shaders\default.vertex.fx" />
-    <Content Include="src\Shaders\depth.fragment.fx" />
-    <Content Include="src\Shaders\depth.vertex.fx" />
-    <Content Include="src\Shaders\depthBoxBlur.fragment.fx" />
-    <Content Include="src\Shaders\depthOfField.fragment.fx" />
-    <Content Include="src\Shaders\displayPass.fragment.fx" />
-    <Content Include="src\Shaders\filter.fragment.fx" />
-    <Content Include="src\Shaders\fxaa.fragment.fx" />
-    <Content Include="src\Shaders\hdr.fragment.fx" />
-    <Content Include="src\Shaders\layer.fragment.fx" />
-    <Content Include="src\Shaders\layer.vertex.fx" />
-    <Content Include="src\Shaders\legacydefault.fragment.fx" />
-    <Content Include="src\Shaders\legacydefault.vertex.fx" />
-    <Content Include="src\Shaders\lensFlare.fragment.fx" />
-    <Content Include="src\Shaders\lensFlare.vertex.fx" />
-    <Content Include="src\Shaders\lensHighlights.fragment.fx" />
-    <Content Include="src\Shaders\line.fragment.fx" />
-    <Content Include="src\Shaders\line.vertex.fx" />
-    <Content Include="src\Shaders\outline.fragment.fx" />
-    <Content Include="src\Shaders\outline.vertex.fx" />
-    <Content Include="src\Shaders\particles.fragment.fx" />
-    <Content Include="src\Shaders\particles.vertex.fx" />
-    <Content Include="src\Shaders\pass.fragment.fx" />
-    <Content Include="src\Shaders\postprocess.vertex.fx" />
-    <Content Include="src\Shaders\procedural.vertex.fx" />
-    <Content Include="src\Shaders\refraction.fragment.fx" />
-    <Content Include="src\Shaders\shadowMap.fragment.fx" />
-    <Content Include="src\Shaders\shadowMap.vertex.fx" />
-    <Content Include="src\Shaders\sprites.fragment.fx" />
-    <Content Include="src\Shaders\sprites.vertex.fx" />
-    <Content Include="src\Shaders\ssao.fragment.fx" />
-    <Content Include="src\Shaders\ssaoCombine.fragment.fx" />
-    <Content Include="src\Shaders\stereoscopicInterlace.fragment.fx" />
-    <Content Include="src\Shaders\tonemap.fragment.fx" />
-    <Content Include="src\Shaders\volumetricLightScattering.fragment.fx" />
-    <Content Include="src\Shaders\volumetricLightScatteringPass.fragment.fx" />
-    <Content Include="src\Shaders\vrDistortionCorrection.fragment.fx" />
-    <Content Include="tsconfig.json" />
-    <Content Include="Web.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <TypeScriptCompile Include="external references\poly2tri.d.ts" />
-    <TypeScriptCompile Include="src\Actions\babylon.action.ts" />
-    <TypeScriptCompile Include="src\Actions\babylon.actionManager.ts" />
-    <TypeScriptCompile Include="src\Actions\babylon.condition.ts" />
-    <TypeScriptCompile Include="src\Actions\babylon.directActions.ts" />
-    <TypeScriptCompile Include="src\Actions\babylon.interpolateValueAction.ts" />
-    <TypeScriptCompile Include="src\Animations\babylon.animatable.ts" />
-    <TypeScriptCompile Include="src\Animations\babylon.animation.ts" />
-    <TypeScriptCompile Include="src\Animations\babylon.easing.ts" />
-    <TypeScriptCompile Include="src\Audio\babylon.analyser.ts" />
-    <TypeScriptCompile Include="src\Audio\babylon.audioEngine.ts" />
-    <TypeScriptCompile Include="src\Audio\babylon.sound.ts" />
-    <TypeScriptCompile Include="src\Audio\babylon.soundtrack.ts" />
-    <TypeScriptCompile Include="src\babylon.engine.ts" />
-    <TypeScriptCompile Include="src\babylon.mixins.ts" />
-    <TypeScriptCompile Include="src\babylon.node.ts" />
-    <TypeScriptCompile Include="src\babylon.scene.ts" />
-    <TypeScriptCompile Include="src\Bones\babylon.bone.ts" />
-    <TypeScriptCompile Include="src\Bones\babylon.skeleton.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.arcRotateCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.arcRotateCameraInputsManager.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.camera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.cameraInputsManager.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.deviceOrientationCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.followCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.freeCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.freeCameraInputsManager.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.gamepadCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.stereoscopicCameras.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.targetCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.touchCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.universalCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\babylon.virtualJoysticksCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.arcrotatecamera.input.gamepad.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.arcrotatecamera.input.keyboard.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.arcrotatecamera.input.mousewheel.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.arcrotatecamera.input.pointers.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.arcrotatecamera.input.vrdeviceorientation.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.deviceorientation.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.gamepad.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.keyboard.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.mouse.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.touch.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.virtualjoystick.ts" />
-    <TypeScriptCompile Include="src\Cameras\Inputs\babylon.freecamera.input.vrdeviceorientation.ts" />
-    <TypeScriptCompile Include="src\Cameras\VR\babylon.vrCameraMetrics.ts" />
-    <TypeScriptCompile Include="src\Cameras\VR\babylon.vrDeviceOrientationCamera.ts" />
-    <TypeScriptCompile Include="src\Cameras\VR\babylon.webVRCamera.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.worldSpaceCanvas2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.shape2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.bounding2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.brushes2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.text2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.sprite2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.rectangle2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.renderablePrim2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.group2d.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.prim2dBase.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.modelRenderCache.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.smartPropertyPrim.ts" />
-    <TypeScriptCompile Include="src\Canvas2d\babylon.canvas2d.ts" />
-    <TypeScriptCompile Include="src\Collisions\babylon.collider.ts" />
-    <TypeScriptCompile Include="src\Collisions\babylon.collisionCoordinator.ts" />
-    <TypeScriptCompile Include="src\Collisions\babylon.collisionWorker.ts" />
-    <TypeScriptCompile Include="src\Collisions\babylon.pickingInfo.ts" />
-    <TypeScriptCompile Include="src\Culling\babylon.boundingBox.ts" />
-    <TypeScriptCompile Include="src\Culling\babylon.boundingInfo.ts" />
-    <TypeScriptCompile Include="src\Culling\babylon.boundingSphere.ts" />
-    <TypeScriptCompile Include="src\Culling\babylon.ray.ts" />
-    <TypeScriptCompile Include="src\Culling\Octrees\babylon.octree.ts" />
-    <TypeScriptCompile Include="src\Culling\Octrees\babylon.octreeBlock.ts" />
-    <TypeScriptCompile Include="src\Debug\babylon.debugLayer.ts" />
-    <TypeScriptCompile Include="src\Debug\babylon.skeletonViewer.ts" />
-    <TypeScriptCompile Include="src\Layer\babylon.layer.ts" />
-    <TypeScriptCompile Include="src\LensFlare\babylon.lensFlare.ts" />
-    <TypeScriptCompile Include="src\LensFlare\babylon.lensFlareSystem.ts" />
-    <TypeScriptCompile Include="src\Lights\babylon.directionalLight.ts" />
-    <TypeScriptCompile Include="src\Lights\babylon.hemisphericLight.ts" />
-    <TypeScriptCompile Include="src\Lights\babylon.light.ts" />
-    <TypeScriptCompile Include="src\Lights\babylon.pointLight.ts" />
-    <TypeScriptCompile Include="src\Lights\babylon.spotLight.ts" />
-    <TypeScriptCompile Include="src\Lights\Shadows\babylon.shadowGenerator.ts" />
-    <TypeScriptCompile Include="src\Loading\babylon.sceneLoader.ts" />
-    <TypeScriptCompile Include="src\Loading\Plugins\babylon.babylonFileLoader.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.effect.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.fresnelParameters.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.material.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.materialHelper.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.multiMaterial.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.pbrMaterial.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.shaderMaterial.ts" />
-    <TypeScriptCompile Include="src\Materials\babylon.standardMaterial.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.baseTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.cubeTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.fontTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.dynamicTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.hdrcubetexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.mapTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.mirrorTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.rawTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.refractionTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.renderTargetTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.texture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\babylon.videoTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\Procedurals\babylon.customProceduralTexture.ts" />
-    <TypeScriptCompile Include="src\Materials\Textures\Procedurals\babylon.proceduralTexture.ts" />
-    <TypeScriptCompile Include="src\Math\babylon.math.SIMD.ts" />
-    <TypeScriptCompile Include="src\Math\babylon.math.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.abstractMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.csg.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.geometry.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.groundMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.instancedMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.linesMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.mesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.mesh.vertexData.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.meshBuilder.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.meshLODLevel.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.meshSimplification.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.polygonMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.subMesh.ts" />
-    <TypeScriptCompile Include="src\Mesh\babylon.vertexBuffer.ts" />
-    <TypeScriptCompile Include="src\Particles\babylon.particle.ts" />
-    <TypeScriptCompile Include="src\Particles\babylon.particleSystem.ts" />
-    <TypeScriptCompile Include="src\Particles\babylon.solidParticle.ts" />
-    <TypeScriptCompile Include="src\Particles\babylon.solidParticleSystem.ts" />
-    <TypeScriptCompile Include="src\Physics\babylon.physicsEngine.ts" />
-    <TypeScriptCompile Include="src\Physics\babylon.physicsImpostor.ts" />
-    <TypeScriptCompile Include="src\Physics\babylon.physicsJoint.ts" />
-    <TypeScriptCompile Include="src\Physics\Plugins\babylon.cannonJSPlugin.ts" />
-    <TypeScriptCompile Include="src\Physics\Plugins\babylon.oimoJSPlugin.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.anaglyphPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.blackAndWhitePostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.blurPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.colorCorrectionPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.convolutionPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.displayPassPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.filterPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.fxaaPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.hdrRenderingPipeline.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.lensRenderingPipeline.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.passPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.postProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.postProcessManager.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.refractionPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.ssaoRenderingPipeline.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.stereoscopicInterlacePostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.tonemapPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.volumetricLightScatteringPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\babylon.vrDistortionCorrectionPostProcess.ts" />
-    <TypeScriptCompile Include="src\PostProcess\RenderPipeline\babylon.postProcessRenderEffect.ts" />
-    <TypeScriptCompile Include="src\PostProcess\RenderPipeline\babylon.postProcessRenderPass.ts" />
-    <TypeScriptCompile Include="src\PostProcess\RenderPipeline\babylon.postProcessRenderPipeline.ts" />
-    <TypeScriptCompile Include="src\PostProcess\RenderPipeline\babylon.postProcessRenderPipelineManager.ts" />
-    <TypeScriptCompile Include="src\Probes\babylon.reflectionProbe.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.boundingBoxRenderer.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.depthRenderer.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.edgesRenderer.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.outlineRenderer.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.renderingGroup.ts" />
-    <TypeScriptCompile Include="src\Rendering\babylon.renderingManager.ts" />
-    <TypeScriptCompile Include="src\Sprites\babylon.sprite.ts" />
-    <TypeScriptCompile Include="src\Sprites\babylon.spriteManager.ts" />
-    <TypeScriptCompile Include="src\States\babylon.alphaCullingState.ts" />
-    <TypeScriptCompile Include="src\States\babylon.depthCullingState.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.andOrNotEvaluator.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.assetsManager.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.database.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.decorators.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.filesInput.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.gamepads.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.loadingScreen.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.observable.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.dynamicFloatArray.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.sceneOptimizer.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.sceneSerializer.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.rectPackingMap.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.stringDictionary.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.smartArray.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.tags.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.tools.dds.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.tools.tga.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.tools.ts" />
-    <TypeScriptCompile Include="src\Tools\babylon.virtualJoystick.ts" />
-    <TypeScriptCompile Include="src\Tools\HDR\babylon.tools.cubemaptosphericalpolynomial.ts" />
-    <TypeScriptCompile Include="src\Tools\HDR\babylon.tools.hdr.ts" />
-    <TypeScriptCompile Include="src\Tools\HDR\babylon.tools.panoramaToCubemap.ts" />
-    <TypeScriptCompile Include="src\Tools\HDR\babylon.tools.pmremgenerator.ts" />
-    <TypeScriptCompile Include="typescript\MainClass.ts" />
-    <TypeScriptCompile Include="typescript\ManipulatorInteractionHelper.ts" />
-    <TypeScriptCompile Include="typescript\Radix.ts" />
-    <TypeScriptCompile Include="typescript\SimpleInteractionHelper.ts" />
-    <TypeScriptCompile Include="typescript\SymbolicVisualHelper.ts" />
-  </ItemGroup>
-  <ItemGroup>
-    <Service Include="{4A0DDDB5-7A95-4FBF-97CC-616D07737A77}" />
-  </ItemGroup>
-  <PropertyGroup>
-    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
-    <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
-  </PropertyGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
-    <TypeScriptTarget>ES5</TypeScriptTarget>
-    <TypeScriptJSXEmit>None</TypeScriptJSXEmit>
-    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
-    <TypeScriptNoImplicitAny>False</TypeScriptNoImplicitAny>
-    <TypeScriptModuleKind>
-    </TypeScriptModuleKind>
-    <TypeScriptRemoveComments>False</TypeScriptRemoveComments>
-    <TypeScriptOutFile />
-    <TypeScriptOutDir />
-    <TypeScriptGeneratesDeclarations>False</TypeScriptGeneratesDeclarations>
-    <TypeScriptNoEmitOnError>True</TypeScriptNoEmitOnError>
-    <TypeScriptSourceMap>True</TypeScriptSourceMap>
-    <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators>
-    <TypeScriptMapRoot />
-    <TypeScriptSourceRoot />
-  </PropertyGroup>
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets')" />
-  <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
-  <ProjectExtensions>
-    <VisualStudio>
-      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
-        <WebProjectProperties>
-          <UseIIS>False</UseIIS>
-          <AutoAssignPort>True</AutoAssignPort>
-          <DevelopmentServerPort>58598</DevelopmentServerPort>
-          <DevelopmentServerVPath>/</DevelopmentServerVPath>
-          <IISUrl>http://localhost:58598/</IISUrl>
-          <NTLMAuthentication>False</NTLMAuthentication>
-          <UseCustomServer>False</UseCustomServer>
-          <CustomServerUrl>
-          </CustomServerUrl>
-          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
-        </WebProjectProperties>
-      </FlavorProperties>
-    </VisualStudio>
-  </ProjectExtensions>
-  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
-    <PropertyGroup>
-      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
-    </PropertyGroup>
-    <Error Condition="!Exists('.\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '.\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
-    <Error Condition="!Exists('.\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '.\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
-    <Error Condition="!Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
-    <Error Condition="!Exists('packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props'))" />
-  </Target>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-</Project>

+ 0 - 22
Babylon.js.sln

@@ -1,22 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Babylon.js", "Babylon.js.csproj", "{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Any CPU = Debug|Any CPU
-		Release|Any CPU = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{FF5C7EB0-3C10-48A7-93AA-3EE78FDB5CA4}.Release|Any CPU.Build.0 = Release|Any CPU
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal

+ 0 - 35
Properties/AssemblyInfo.cs

@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Babylon.js")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Babylon.js")]
-[assembly: AssemblyCopyright("Copyright ©  2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ff5c7eb0-3c10-48a7-93aa-3ee78fdb5ca4")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers 
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 0 - 30
Web.Debug.config

@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
-
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
-  <!--
-    In the example below, the "SetAttributes" transform will change the value of 
-    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
-    finds an attribute "name" that has a value of "MyDB".
-    
-    <connectionStrings>
-      <add name="MyDB" 
-        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
-        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
-    </connectionStrings>
-  -->
-  <system.web>
-    <!--
-      In the example below, the "Replace" transform will replace the entire 
-      <customErrors> section of your web.config file.
-      Note that because there is only one customErrors section under the 
-      <system.web> node, there is no need to use the "xdt:Locator" attribute.
-      
-      <customErrors defaultRedirect="GenericError.htm"
-        mode="RemoteOnly" xdt:Transform="Replace">
-        <error statusCode="500" redirect="InternalError.htm"/>
-      </customErrors>
-    -->
-  </system.web>
-</configuration>

+ 0 - 31
Web.Release.config

@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
-
-<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
-  <!--
-    In the example below, the "SetAttributes" transform will change the value of 
-    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator 
-    finds an attribute "name" that has a value of "MyDB".
-    
-    <connectionStrings>
-      <add name="MyDB" 
-        connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" 
-        xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
-    </connectionStrings>
-  -->
-  <system.web>
-    <compilation xdt:Transform="RemoveAttributes(debug)" />
-    <!--
-      In the example below, the "Replace" transform will replace the entire 
-      <customErrors> section of your web.config file.
-      Note that because there is only one customErrors section under the 
-      <system.web> node, there is no need to use the "xdt:Locator" attribute.
-      
-      <customErrors defaultRedirect="GenericError.htm"
-        mode="RemoteOnly" xdt:Transform="Replace">
-        <error statusCode="500" redirect="InternalError.htm"/>
-      </customErrors>
-    -->
-  </system.web>
-</configuration>

+ 0 - 63
Web.config

@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  For more information on how to configure your ASP.NET application, please visit
-  http://go.microsoft.com/fwlink/?LinkId=169433
-  -->
-<configuration>
-	<system.webServer>
-		<caching enabled="false"/>
-		<staticContent>
-			<mimeMap fileExtension=".hdr" mimeType="application/hdr" />
-			<mimeMap fileExtension=".obj" mimeType="application/obj" />
-			<mimeMap fileExtension=".dds" mimeType="application/dds" />
-			<mimeMap fileExtension=".tga" mimeType="application/tga" />
-			<mimeMap fileExtension=".fx" mimeType="application/fx" />
-			<mimeMap fileExtension=".babylon" mimeType="application/babylon" />
-			<mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" />
-			<mimeMap fileExtension=".babylonbinarymeshdata" mimeType="application/babylonbinarymeshdata" />
-			<mimeMap fileExtension=".webp" mimeType="image/webp" />
-			<mimeMap fileExtension=".wdp" mimeType="image/vnd.ms-photo" />
-		</staticContent>
-		<httpCompression>
-			<dynamicTypes>
-				<clear />
-				<add enabled="true" mimeType="text/*"/>
-				<add enabled="true" mimeType="message/*"/>
-				<add enabled="true" mimeType="application/x-javascript"/>
-				<add enabled="true" mimeType="application/javascript"/>
-				<add enabled="true" mimeType="application/json"/>
-				<add enabled="true" mimeType="application/atom+xml"/>
-				<add enabled="true" mimeType="application/atom+xml;charset=utf-8"/>
-				<add enabled="true" mimeType="application/babylonmeshdata" />
-				<add enabled="true" mimeType="application/babylon"/>
-				<add enabled="false" mimeType="*/*"/>
-			</dynamicTypes>
-			<staticTypes>
-				<clear />
-				<add enabled="true" mimeType="text/*"/>
-				<add enabled="true" mimeType="message/*"/>
-				<add enabled="true" mimeType="application/javascript"/>
-				<add enabled="true" mimeType="application/atom+xml"/>
-				<add enabled="true" mimeType="application/xaml+xml"/>
-				<add enabled="true" mimeType="application/json"/>
-				<add enabled="true" mimeType="application/babylonmeshdata" />
-				<add enabled="true" mimeType="application/babylon"/>
-				<add enabled="false" mimeType="*/*"/>
-			</staticTypes>
-		</httpCompression>
-	</system.webServer>
-  <system.web>
-    <compilation debug="true" targetFramework="4.5.2"/>
-    <httpRuntime targetFramework="4.5.2"/>
-  </system.web>
-  <system.codedom>
-    <compilers>
-      <compiler language="c#;cs;csharp" extension=".cs"
-        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
-        warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
-      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
-        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
-        warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
-    </compilers>
-  </system.codedom>
-</configuration>

BIN
assets/BrickWall.png


BIN
assets/brickwall_nh.png


BIN
assets/rock.png


BIN
assets/rock2.png


BIN
assets/rock_nh.png


+ 0 - 212
index.html

@@ -1,212 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title></title>
-    <meta charset="utf-8" />
-
-<!--    <script src="src/babylon.js"></script>-->
-    <script src="src/Math/babylon.math.js"></script>
-    <script src="src/Math/babylon.math.simd.js"></script>
-    <script src="src/Tools/babylon.decorators.js"></script>
-    <script src="src/Tools/babylon.observable.js"></script>
-    <script src="src/Tools/babylon.database.js"></script>
-    <script src="src/Tools/babylon.tools.tga.js"></script>
-    <script src="src/Tools/babylon.tools.dds.js"></script>
-    <script src="src/Tools/babylon.stringDictionary.js"></script>
-    <script src="src/Tools/babylon.smartArray.js"></script>
-    <script src="src/Tools/babylon.dynamicFloatArray.js"></script>
-    <script src="src/Tools/babylon.tools.js"></script>
-    <script src="src/Tools/babylon.rectPackingMap.js"></script>
-    <script src="src/states/babylon.alphaCullingState.js"></script>
-    <script src="src/Canvas2d/babylon.bounding2d.js"></script>
-    <script src="src/Canvas2d/babylon.brushes2d.js"></script>
-    <script src="src/Canvas2d/babylon.smartPropertyPrim.js"></script>
-    <script src="src/Canvas2d/babylon.prim2dBase.js"></script>
-    <script src="src/Canvas2d/babylon.modelRenderCache.js"></script>
-    <script src="src/Canvas2d/babylon.renderablePrim2d.js"></script>
-    <script src="src/Canvas2d/babylon.shape2d.js"></script>
-    <script src="src/Canvas2d/babylon.group2d.js"></script>
-    <script src="src/Canvas2d/babylon.rectangle2d.js"></script>
-    <script src="src/Canvas2d/babylon.sprite2d.js"></script>
-    <script src="src/Canvas2d/babylon.text2d.js"></script>
-    <script src="src/Canvas2d/babylon.canvas2d.js"></script>
-    <script src="src/states/babylon.depthCullingState.js"></script>
-    <script src="src/babylon.engine.js"></script>
-    <script src="src/babylon.node.js"></script>
-    <script src="src/Tools/babylon.filesInput.js"></script>
-    <script src="src/Collisions/babylon.pickingInfo.js"></script>
-    <script src="src/Culling/babylon.boundingSphere.js"></script>
-    <script src="src/Culling/babylon.boundingBox.js"></script>
-    <script src="src/Culling/babylon.boundingInfo.js"></script>
-    <script src="src/Culling/babylon.ray.js"></script>
-    <script src="src/Mesh/babylon.abstractMesh.js"></script>
-    <script src="src/Lights/babylon.light.js"></script>
-    <script src="src/Lights/babylon.pointLight.js"></script>
-    <script src="src/Lights/babylon.spotLight.js"></script>
-    <script src="src/Lights/babylon.hemisphericLight.js"></script>
-    <script src="src/Lights/babylon.directionalLight.js"></script>
-    <script src="src/Lights/Shadows/babylon.shadowGenerator.js"></script>
-    <script src="src/Collisions/babylon.collider.js"></script>
-    <script src="src/Collisions/babylon.collisionCoordinator.js"></script>
-    <script src="src/Collisions/babylon.collisionWorker.js"></script>
-    <script src="src/Cameras/babylon.camera.js"></script>
-    <script src="src/Cameras/babylon.camerainputsmanager.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.mouse.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.keyboard.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.touch.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.deviceorientation.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.vrdeviceorientation.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.gamepad.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.virtualjoystick.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.keyboard.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.mousewheel.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.pointers.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.gamepad.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.vrdeviceorientation.js"></script>
-    <script src="src/Cameras/babylon.targetCamera.js"></script>
-    <script src="src/Cameras/babylon.followCamera.js"></script>
-    <script src="src/Cameras/babylon.freeCamera.js"></script>
-    <script src="src/Cameras/babylon.freeCameraInputsManager.js"></script>
-    <script src="src/Cameras/babylon.touchCamera.js"></script>
-    <script src="src/Cameras/babylon.arcRotateCamera.js"></script>
-    <script src="src/Cameras/babylon.arcRotateCameraInputsManager.js"></script>
-    <script src="src/Cameras/babylon.universalCamera.js"></script>
-    <script src="src/Cameras/babylon.deviceOrientationCamera.js"></script>
-    <script src="src/Tools/babylon.gamepads.js"></script>
-    <script src="src/Cameras/babylon.gamepadCamera.js"></script>
-    <script src="src/Rendering/babylon.renderingManager.js"></script>
-    <script src="src/Rendering/babylon.renderingGroup.js"></script>
-    <script src="src/babylon.scene.js"></script>
-    <script src="src/Mesh/babylon.vertexBuffer.js"></script>
-    <script src="src/Mesh/babylon.instancedMesh.js"></script>
-    <script src="src/Mesh/babylon.mesh.js"></script>
-    <script src="src/Mesh/babylon.meshBuilder.js"></script>
-    <script src="src/Canvas2d/babylon.worldspacecanvas2d.js"></script>
-    <script src="src/Mesh/babylon.groundMesh.js"></script>
-    <script src="src/Mesh/babylon.subMesh.js"></script>
-    <script src="src/Materials/textures/babylon.baseTexture.js"></script>
-    <script src="src/Materials/textures/babylon.texture.js"></script>
-    <script src="src/Materials/textures/babylon.cubeTexture.js"></script>
-    <script src="src/Materials/textures/babylon.renderTargetTexture.js"></script>
-    <script src="src/Materials/textures/procedurals/babylon.proceduralTexture.js"></script>
-    <script src="src/Materials/textures/procedurals/babylon.customProceduralTexture.js"></script>
-    <script src="src/Materials/textures/babylon.mirrorTexture.js"></script>
-    <script src="src/Materials/textures/babylon.refractionTexture.js"></script>
-    <script src="src/Materials/textures/babylon.fontTexture.js"></script>
-    <script src="src/Materials/textures/babylon.mapTexture.js"></script>
-    <script src="src/Materials/textures/babylon.dynamicTexture.js"></script>
-    <script src="src/Materials/textures/babylon.videoTexture.js"></script>
-    <script src="src/Materials/babylon.effect.js"></script>
-    <script src="src/Materials/babylon.materialHelper.js"></script>
-    <script src="src/Materials/babylon.fresnelParameters.js"></script>
-    <script src="src/Materials/babylon.material.js"></script>
-    <script src="src/Materials/babylon.standardMaterial.js"></script>
-    <script src="src/Materials/babylon.pbrMaterial.js"></script>
-    <script src="src/Materials/babylon.multiMaterial.js"></script>
-    <script src="src/Loading/babylon.sceneLoader.js"></script>
-    <script src="src/Loading/Plugins/babylon.babylonFileLoader.js"></script>
-    <script src="src/Sprites/babylon.spriteManager.js"></script>
-    <script src="src/Sprites/babylon.sprite.js"></script>
-    <script src="src/Layer/babylon.layer.js"></script>
-    <script src="src/Particles/babylon.particle.js"></script>
-    <script src="src/Particles/babylon.particleSystem.js"></script>
-    <script src="src/Particles/babylon.solidParticle.js"></script>
-    <script src="src/Particles/babylon.solidParticleSystem.js"></script>
-    <script src="src/Animations/babylon.animation.js"></script>
-    <script src="src/Animations/babylon.animatable.js"></script>
-    <script src="src/Animations/babylon.easing.js"></script>
-    <script src="src/Culling/Octrees/babylon.octree.js"></script>
-    <script src="src/Culling/Octrees/babylon.octreeBlock.js"></script>
-    <script src="src/Bones/babylon.bone.js"></script>
-    <script src="src/Bones/babylon.skeleton.js"></script>
-    <script src="src/PostProcess/babylon.postProcess.js"></script>
-    <script src="src/PostProcess/babylon.postProcessManager.js"></script>
-    <script src="src/PostProcess/babylon.passPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.blurPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.refractionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.blackAndWhitePostProcess.js"></script>
-    <script src="src/PostProcess/babylon.convolutionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.filterPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.fxaaPostProcess.js"></script>
-    <script src="src/LensFlare/babylon.lensFlare.js"></script>
-    <script src="src/LensFlare/babylon.lensFlareSystem.js"></script>
-    <script src="src/Physics/Plugins/babylon.cannonJSPlugin.js"></script>
-    <script src="src/Physics/Plugins/babylon.oimoJSPlugin.js"></script>
-    <script src="src/Physics/babylon.physicsImpostor.js"></script>
-    <script src="src/Physics/babylon.physicsEngine.js"></script>
-    <script src="src/Physics/babylon.physicsJoint.js"></script>
-    <script src="src/Tools/babylon.sceneSerializer.js"></script>
-    <script src="src/Mesh/babylon.csg.js"></script>
-    <script src="src/PostProcess/babylon.vrDistortionCorrectionPostProcess.js"></script>
-    <script src="src/Tools/babylon.virtualJoystick.js"></script>
-    <script src="src/Cameras/babylon.virtualJoysticksCamera.js"></script>
-    <script src="src/Materials/babylon.shaderMaterial.js"></script>
-    <script src="src/Mesh/babylon.mesh.vertexData.js"></script>
-    <script src="src/PostProcess/babylon.anaglyphPostProcess.js"></script>
-    <script src="src/Tools/babylon.tags.js"></script>
-    <script src="src/Tools/babylon.andOrNotEvaluator.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPass.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderEffect.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPipeline.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPipelineManager.js"></script>
-    <script src="src/PostProcess/babylon.displayPassPostProcess.js"></script>
-    <script src="src/Rendering/babylon.boundingBoxRenderer.js"></script>
-    <script src="src/Actions/babylon.condition.js"></script>
-    <script src="src/Actions/babylon.action.js"></script>
-    <script src="src/Actions/babylon.actionManager.js"></script>
-    <script src="src/Actions/babylon.interpolateValueAction.js"></script>
-    <script src="src/Actions/babylon.directActions.js"></script>
-    <script src="src/Mesh/babylon.geometry.js"></script>
-    <script src="src/Mesh/babylon.linesMesh.js"></script>
-    <script src="src/Rendering/babylon.outlineRenderer.js"></script>
-    <script src="src/Tools/babylon.assetsManager.js"></script>
-    <script src="src/Cameras/VR/babylon.vrCameraMetrics.js"></script>
-    <script src="src/Cameras/VR/babylon.vrDeviceOrientationCamera.js"></script>
-    <script src="src/Cameras/VR/babylon.webVRCamera.js"></script>
-    <script src="src/Tools/babylon.sceneOptimizer.js"></script>
-    <script src="src/Mesh/babylon.meshLODLevel.js"></script>
-    <script src="src/Audio/babylon.audioEngine.js"></script>
-    <script src="src/Audio/babylon.sound.js"></script>
-    <script src="src/Audio/babylon.soundtrack.js"></script>
-    <script src="src/Debug/babylon.skeletonViewer.js"></script>
-    <script src="src/Debug/babylon.debugLayer.js"></script>
-    <script src="src/Materials/Textures/babylon.rawTexture.js"></script>
-    <script src="src/Mesh/babylon.polygonMesh.js"></script>
-    <script src="src/Mesh/babylon.meshSimplification.js"></script>
-    <script src="src/Audio/babylon.analyser.js"></script>
-    <script src="src/Rendering/babylon.depthRenderer.js"></script>
-    <script src="src/PostProcess/babylon.ssaoRenderingPipeline.js"></script>
-    <script src="src/PostProcess/babylon.volumetricLightScatteringPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.lensRenderingPipeline.js"></script>
-    <script src="src/PostProcess/babylon.colorCorrectionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.stereoscopicInterlacePostProcess.js"></script>
-    <script src="src/Cameras/babylon.stereoscopicCameras.js"></script>
-    <script src="src/PostProcess/babylon.hdrRenderingPipeline.js"></script>
-    <script src="src/Rendering/babylon.edgesRenderer.js"></script>
-    <script src="src/Tools/babylon.loadingScreen.js"></script>
-    <script src="src/Probes/babylon.reflectionProbe.js"></script>
-    <script src="src/tools/hdr/babylon.tools.pmremGenerator.js"></script>
-    <script src="src/tools/hdr/babylon.tools.cubemapToSphericalPolynomial.js"></script>
-    <script src="src/tools/hdr/babylon.tools.panoramaToCubemap.js"></script>
-    <script src="src/tools/hdr/babylon.tools.hdr.js"></script>
-    <script src="src/materials/textures/babylon.hdrCubeTexture.js"></script>
-</head>
-<body>
-    <!--<p style="font-family: 'Lucida Console'; font-size:20pt">ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
-    <canvas width="100" height="14" id="canvas2d"></canvas>-->
-    <canvas width="600" height="600" id="renderCanvas"></canvas>
-
-    <script src="http://code.jquery.com/jquery.js"></script>
-
-    <script src="typescript/Radix.js"></script>
-    <script src="typescript/SymbolicVisualHelper.js"></script>
-    <script src="typescript/ManipulatorInteractionHelper.js"></script>
-    <script src="typescript/SimpleInteractionHelper.js"></script>
-
-    <script src="typescript/MainClass.js"></script>
-
-    <script type="text/ecmascript">
-        var p = new Sandbox.MainClass();
-        p.start();
-    </script>
-</html>

+ 0 - 209
min.html

@@ -1,209 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title></title>
-    <meta charset="utf-8" />
-
-    <script src="src/babylon.js"></script>
-    <!--<script src="src/Math/babylon.math.js"></script>
-    <script src="src/Math/babylon.math.simd.js"></script>
-    <script src="src/Tools/babylon.decorators.js"></script>
-    <script src="src/Tools/babylon.observable.js"></script>
-    <script src="src/Tools/babylon.database.js"></script>
-    <script src="src/Tools/babylon.tools.tga.js"></script>
-    <script src="src/Tools/babylon.tools.dds.js"></script>
-    <script src="src/Tools/babylon.stringDictionary.js"></script>
-    <script src="src/Tools/babylon.smartArray.js"></script>
-    <script src="src/Tools/babylon.dynamicFloatArray.js"></script>
-    <script src="src/Tools/babylon.tools.js"></script>
-    <script src="src/Tools/babylon.rectPackingMap.js"></script>
-    <script src="src/states/babylon.alphaCullingState.js"></script>
-    <script src="src/Canvas2d/babylon.bounding2d.js"></script>
-    <script src="src/Canvas2d/babylon.brushes2d.js"></script>
-    <script src="src/Canvas2d/babylon.smartPropertyPrim.js"></script>
-    <script src="src/Canvas2d/babylon.prim2dBase.js"></script>
-    <script src="src/Canvas2d/babylon.modelRenderCache.js"></script>
-    <script src="src/Canvas2d/babylon.renderablePrim2d.js"></script>
-    <script src="src/Canvas2d/babylon.group2d.js"></script>
-    <script src="src/Canvas2d/babylon.rectangle2d.js"></script>
-    <script src="src/Canvas2d/babylon.sprite2d.js"></script>
-    <script src="src/Canvas2d/babylon.canvas2d.js"></script>
-    <script src="src/states/babylon.depthCullingState.js"></script>
-    <script src="src/babylon.engine.js"></script>
-    <script src="src/babylon.node.js"></script>
-    <script src="src/Tools/babylon.filesInput.js"></script>
-    <script src="src/Collisions/babylon.pickingInfo.js"></script>
-    <script src="src/Culling/babylon.boundingSphere.js"></script>
-    <script src="src/Culling/babylon.boundingBox.js"></script>
-    <script src="src/Culling/babylon.boundingInfo.js"></script>
-    <script src="src/Culling/babylon.ray.js"></script>
-    <script src="src/Mesh/babylon.abstractMesh.js"></script>
-    <script src="src/Lights/babylon.light.js"></script>
-    <script src="src/Lights/babylon.pointLight.js"></script>
-    <script src="src/Lights/babylon.spotLight.js"></script>
-    <script src="src/Lights/babylon.hemisphericLight.js"></script>
-    <script src="src/Lights/babylon.directionalLight.js"></script>
-    <script src="src/Lights/Shadows/babylon.shadowGenerator.js"></script>
-    <script src="src/Collisions/babylon.collider.js"></script>
-    <script src="src/Collisions/babylon.collisionCoordinator.js"></script>
-    <script src="src/Collisions/babylon.collisionWorker.js"></script>
-    <script src="src/Cameras/babylon.camera.js"></script>
-    <script src="src/Cameras/babylon.camerainputsmanager.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.mouse.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.keyboard.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.touch.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.deviceorientation.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.vrdeviceorientation.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.gamepad.js"></script>
-    <script src="src/cameras/inputs/babylon.freecamera.input.virtualjoystick.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.keyboard.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.mousewheel.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.pointers.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.gamepad.js"></script>
-    <script src="src/cameras/inputs/babylon.arcrotatecamera.input.vrdeviceorientation.js"></script>
-    <script src="src/Cameras/babylon.targetCamera.js"></script>
-    <script src="src/Cameras/babylon.followCamera.js"></script>
-    <script src="src/Cameras/babylon.freeCamera.js"></script>
-    <script src="src/Cameras/babylon.freeCameraInputsManager.js"></script>
-    <script src="src/Cameras/babylon.touchCamera.js"></script>
-    <script src="src/Cameras/babylon.arcRotateCamera.js"></script>
-    <script src="src/Cameras/babylon.arcRotateCameraInputsManager.js"></script>
-    <script src="src/Cameras/babylon.universalCamera.js"></script>
-    <script src="src/Cameras/babylon.deviceOrientationCamera.js"></script>
-    <script src="src/Tools/babylon.gamepads.js"></script>
-    <script src="src/Cameras/babylon.gamepadCamera.js"></script>
-    <script src="src/Rendering/babylon.renderingManager.js"></script>
-    <script src="src/Rendering/babylon.renderingGroup.js"></script>
-    <script src="src/babylon.scene.js"></script>
-    <script src="src/Mesh/babylon.vertexBuffer.js"></script>
-    <script src="src/Mesh/babylon.instancedMesh.js"></script>
-    <script src="src/Mesh/babylon.mesh.js"></script>
-    <script src="src/Mesh/babylon.meshBuilder.js"></script>
-    <script src="src/Mesh/babylon.groundMesh.js"></script>
-    <script src="src/Mesh/babylon.subMesh.js"></script>
-    <script src="src/Materials/textures/babylon.baseTexture.js"></script>
-    <script src="src/Materials/textures/babylon.texture.js"></script>
-    <script src="src/Materials/textures/babylon.cubeTexture.js"></script>
-    <script src="src/Materials/textures/babylon.renderTargetTexture.js"></script>
-    <script src="src/Materials/textures/procedurals/babylon.proceduralTexture.js"></script>
-    <script src="src/Materials/textures/procedurals/babylon.customProceduralTexture.js"></script>
-    <script src="src/Materials/textures/babylon.mirrorTexture.js"></script>
-    <script src="src/Materials/textures/babylon.refractionTexture.js"></script>
-    <script src="src/Materials/textures/babylon.fontTexture.js"></script>
-    <script src="src/Materials/textures/babylon.mapTexture.js"></script>
-    <script src="src/Materials/textures/babylon.dynamicTexture.js"></script>
-    <script src="src/Materials/textures/babylon.videoTexture.js"></script>
-    <script src="src/Materials/babylon.effect.js"></script>
-    <script src="src/Materials/babylon.materialHelper.js"></script>
-    <script src="src/Materials/babylon.fresnelParameters.js"></script>
-    <script src="src/Materials/babylon.material.js"></script>
-    <script src="src/Materials/babylon.standardMaterial.js"></script>
-    <script src="src/Materials/babylon.pbrMaterial.js"></script>
-    <script src="src/Materials/babylon.multiMaterial.js"></script>
-    <script src="src/Loading/babylon.sceneLoader.js"></script>
-    <script src="src/Loading/Plugins/babylon.babylonFileLoader.js"></script>
-    <script src="src/Sprites/babylon.spriteManager.js"></script>
-    <script src="src/Sprites/babylon.sprite.js"></script>
-    <script src="src/Layer/babylon.layer.js"></script>
-    <script src="src/Particles/babylon.particle.js"></script>
-    <script src="src/Particles/babylon.particleSystem.js"></script>
-    <script src="src/Particles/babylon.solidParticle.js"></script>
-    <script src="src/Particles/babylon.solidParticleSystem.js"></script>
-    <script src="src/Animations/babylon.animation.js"></script>
-    <script src="src/Animations/babylon.animatable.js"></script>
-    <script src="src/Animations/babylon.easing.js"></script>
-    <script src="src/Culling/Octrees/babylon.octree.js"></script>
-    <script src="src/Culling/Octrees/babylon.octreeBlock.js"></script>
-    <script src="src/Bones/babylon.bone.js"></script>
-    <script src="src/Bones/babylon.skeleton.js"></script>
-    <script src="src/PostProcess/babylon.postProcess.js"></script>
-    <script src="src/PostProcess/babylon.postProcessManager.js"></script>
-    <script src="src/PostProcess/babylon.passPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.blurPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.refractionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.blackAndWhitePostProcess.js"></script>
-    <script src="src/PostProcess/babylon.convolutionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.filterPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.fxaaPostProcess.js"></script>
-    <script src="src/LensFlare/babylon.lensFlare.js"></script>
-    <script src="src/LensFlare/babylon.lensFlareSystem.js"></script>
-    <script src="src/Physics/Plugins/babylon.cannonJSPlugin.js"></script>
-    <script src="src/Physics/Plugins/babylon.oimoJSPlugin.js"></script>
-    <script src="src/Physics/babylon.physicsImpostor.js"></script>
-    <script src="src/Physics/babylon.physicsEngine.js"></script>
-    <script src="src/Physics/babylon.physicsJoint.js"></script>
-    <script src="src/Tools/babylon.sceneSerializer.js"></script>
-    <script src="src/Mesh/babylon.csg.js"></script>
-    <script src="src/PostProcess/babylon.vrDistortionCorrectionPostProcess.js"></script>
-    <script src="src/Tools/babylon.virtualJoystick.js"></script>
-    <script src="src/Cameras/babylon.virtualJoysticksCamera.js"></script>
-    <script src="src/Materials/babylon.shaderMaterial.js"></script>
-    <script src="src/Mesh/babylon.mesh.vertexData.js"></script>
-    <script src="src/PostProcess/babylon.anaglyphPostProcess.js"></script>
-    <script src="src/Tools/babylon.tags.js"></script>
-    <script src="src/Tools/babylon.andOrNotEvaluator.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPass.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderEffect.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPipeline.js"></script>
-    <script src="src/PostProcess/RenderPipeline/babylon.postProcessRenderPipelineManager.js"></script>
-    <script src="src/PostProcess/babylon.displayPassPostProcess.js"></script>
-    <script src="src/Rendering/babylon.boundingBoxRenderer.js"></script>
-    <script src="src/Actions/babylon.condition.js"></script>
-    <script src="src/Actions/babylon.action.js"></script>
-    <script src="src/Actions/babylon.actionManager.js"></script>
-    <script src="src/Actions/babylon.interpolateValueAction.js"></script>
-    <script src="src/Actions/babylon.directActions.js"></script>
-    <script src="src/Mesh/babylon.geometry.js"></script>
-    <script src="src/Mesh/babylon.linesMesh.js"></script>
-    <script src="src/Rendering/babylon.outlineRenderer.js"></script>
-    <script src="src/Tools/babylon.assetsManager.js"></script>
-    <script src="src/Cameras/VR/babylon.vrCameraMetrics.js"></script>
-    <script src="src/Cameras/VR/babylon.vrDeviceOrientationCamera.js"></script>
-    <script src="src/Cameras/VR/babylon.webVRCamera.js"></script>
-    <script src="src/Tools/babylon.sceneOptimizer.js"></script>
-    <script src="src/Mesh/babylon.meshLODLevel.js"></script>
-    <script src="src/Audio/babylon.audioEngine.js"></script>
-    <script src="src/Audio/babylon.sound.js"></script>
-    <script src="src/Audio/babylon.soundtrack.js"></script>
-    <script src="src/Debug/babylon.skeletonViewer.js"></script>
-    <script src="src/Debug/babylon.debugLayer.js"></script>
-    <script src="src/Materials/Textures/babylon.rawTexture.js"></script>
-    <script src="src/Mesh/babylon.polygonMesh.js"></script>
-    <script src="src/Mesh/babylon.meshSimplification.js"></script>
-    <script src="src/Audio/babylon.analyser.js"></script>
-    <script src="src/Rendering/babylon.depthRenderer.js"></script>
-    <script src="src/PostProcess/babylon.ssaoRenderingPipeline.js"></script>
-    <script src="src/PostProcess/babylon.volumetricLightScatteringPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.lensRenderingPipeline.js"></script>
-    <script src="src/PostProcess/babylon.colorCorrectionPostProcess.js"></script>
-    <script src="src/PostProcess/babylon.stereoscopicInterlacePostProcess.js"></script>
-    <script src="src/Cameras/babylon.stereoscopicCameras.js"></script>
-    <script src="src/PostProcess/babylon.hdrRenderingPipeline.js"></script>
-    <script src="src/Rendering/babylon.edgesRenderer.js"></script>
-    <script src="src/Tools/babylon.loadingScreen.js"></script>
-    <script src="src/Probes/babylon.reflectionProbe.js"></script>
-    <script src="src/tools/hdr/babylon.tools.pmremGenerator.js"></script>
-    <script src="src/tools/hdr/babylon.tools.cubemapToSphericalPolynomial.js"></script>
-    <script src="src/tools/hdr/babylon.tools.panoramaToCubemap.js"></script>
-    <script src="src/tools/hdr/babylon.tools.hdr.js"></script>
-    <script src="src/materials/textures/babylon.hdrCubeTexture.js"></script>-->
-</head>
-<body>
-    <p style="font-family: 'Lucida Console'; font-size:8pt">ABCDEFGHIJKLMNOPQRSTUVWXYZ</p>
-    <canvas width="100" height="14" id="canvas2d"></canvas>
-    <canvas width="600" height="600" id="renderCanvas"></canvas>
-
-    <script src="http://code.jquery.com/jquery.js"></script>
-
-    <script src="typescript/Radix.js"></script>
-    <script src="typescript/SymbolicVisualHelper.js"></script>
-    <script src="typescript/ManipulatorInteractionHelper.js"></script>
-    <script src="typescript/SimpleInteractionHelper.js"></script>
-
-    <script src="typescript/MainClass.js"></script>
-
-    <script type="text/ecmascript">
-        var p = new Sandbox.MainClass();
-        p.start();
-    </script>
-</html>

+ 0 - 5
packages.config

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net452" />
-  <package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net452" developmentDependency="true" />
-</packages>

+ 0 - 21
tsconfig.json

@@ -1,21 +0,0 @@
-{
-    "compilerOptions": {
-        "experimentalDecorators": true,
-        "target": "es5",
-        "sourceMap": true
-    },
-    "exclude": [
-        "Exporters",
-        "bin",
-        "dist",
-        "assets",
-        "external references",
-        "loaders",
-        "obj",
-        "packages",
-        "materialsLibrary",
-        "proceduralTexturesLibrary",
-        "serializers",
-        "Tools"
-    ]
-}

+ 0 - 269
typescript/MainClass.js

@@ -1,269 +0,0 @@
-/// <reference path="simpleinteractionhelper.ts" />
-var __extends = (this && this.__extends) || function (d, b) {
-    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
-    function __() { this.constructor = d; }
-    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-};
-var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
-    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
-    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
-    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
-    return c > 3 && r && Object.defineProperty(target, key, r), r;
-};
-var Sandbox;
-(function (Sandbox) {
-    var Vector2 = BABYLON.Vector2;
-    var Group2D = BABYLON.Group2D;
-    var Canvas2D = BABYLON.Canvas2D;
-    var Size = BABYLON.Size;
-    var PrimitivePointerInfo = BABYLON.PrimitivePointerInfo;
-    var TestA = (function () {
-        function TestA() {
-        }
-        TestA = __decorate([
-            className("TestA")
-        ], TestA);
-        return TestA;
-    }());
-    Sandbox.TestA = TestA;
-    var TestB = (function (_super) {
-        __extends(TestB, _super);
-        function TestB() {
-            _super.apply(this, arguments);
-        }
-        TestB = __decorate([
-            className("TestB")
-        ], TestB);
-        return TestB;
-    }(TestA));
-    Sandbox.TestB = TestB;
-    function className(name) {
-        return function (target) {
-            target["__bjsclassName__"] = name;
-        };
-    }
-    Sandbox.className = className;
-    function getClassName(object) {
-        var name = null;
-        if (object instanceof Object) {
-            var classObj = Object.getPrototypeOf(object);
-            name = classObj.constructor["__bjsclassName__"];
-        }
-        if (!name) {
-            name = typeof object;
-        }
-        return name;
-    }
-    Sandbox.getClassName = getClassName;
-    var MainClass = (function () {
-        function MainClass() {
-        }
-        MainClass.prototype.start = function () {
-            BABYLON.Engine.CodeRepository = "/src/";
-            BABYLON.Engine.ShadersRepository = "/src/Shaders/";
-            if (BABYLON.Engine.isSupported() === false) {
-                console.log("web browser doesn't support WebGL");
-                return;
-            }
-            var tb = new TestB();
-            var res = getClassName(tb);
-            res = getClassName(12);
-            var pb = Object.getPrototypeOf(tb);
-            var pa = Object.getPrototypeOf(pb);
-            var nameB = pb.constructor["__className__"];
-            var nameA = pa.constructor["__className__"];
-            // Get the canvas element from our HTML below
-            var htmlCanvasElement = document.querySelector("#renderCanvas");
-            //var canvas2d = <HTMLCanvasElement>document.querySelector("#canvas2d");
-            //var context = canvas2d.getContext("2d");
-            //context.font = "8pt Lucida Console";
-            //context.fillStyle = "red";
-            //context.textBaseline = 'top';
-            //context.fillText("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 0);
-            // Load the BABYLON 3D engine
-            this.engine = new BABYLON.Engine(htmlCanvasElement, true);
-            // Now create a basic Babylon Scene object
-            this.scene = new BABYLON.Scene(this.engine);
-            //this.scene.debugLayer.show();
-            //var instData = new BABYLON.Rectangle2DInstanceData();
-            //instData._instancesArray = new Float32Array(100);
-            //instData._instanceOffset = 0;
-            //instData.zBias = 1;
-            //instData.transform = Matrix.Identity();
-            //instData.properties = new Vector3(1, 2, 3);
-            //var effect = this.engine.createEffect({ vertex: "rect2d", fragment: "rect2d" }, ["zBias", "transform", "properties"], [], [], "");
-            //var node = instData.getClassTreeInfo();
-            //setTimeout(() => {
-            //    var offsets = node.classContent.getOffsetLocations(effect);
-            //    },
-            //    1000);
-            // Change the scene background color to green.
-            this.scene.clearColor = new BABYLON.Color3(56 / 256, 87 / 256, 145 / 256);
-            // This creates and positions a free camera
-            var hpi = Math.PI / 2;
-            this.camera = new BABYLON.ArcRotateCamera("camera1", -hpi, hpi, 150, new BABYLON.Vector3(0, 0, 0), this.scene);
-            this.camera.setTarget(BABYLON.Vector3.Zero());
-            this.camera.attachControl(htmlCanvasElement);
-            //this.scene.debugLayer.show();
-            var canvas = Canvas2D.CreateScreenSpace(this.scene, "ScreenCanvas", new Vector2(0, 100), new Size(600, 600), Canvas2D.CACHESTRATEGY_DONTCACHE);
-            canvas.backgroundFill = Canvas2D.GetSolidColorBrushFromHex("#C0808080");
-            canvas.backgroundRoundRadius = 50;
-            var g1 = Group2D.CreateGroup2D(canvas, "g1", new Vector2(300, 300), new Size(600, 600));
-            g1.pointerEventObservable.add(function (d, s) {
-                if (s.mask === PrimitivePointerInfo.PointerDown) {
-                    canvas.setPointerCapture(d.pointerId, d.relatedTarget);
-                }
-                else if (s.mask === PrimitivePointerInfo.PointerUp) {
-                    canvas.releasePointerCapture(d.pointerId, d.relatedTarget);
-                }
-                console.log("Pointer Down on " + d.relatedTarget.id);
-            }, PrimitivePointerInfo.PointerDown | PrimitivePointerInfo.PointerUp);
-            //var text = Text2D.Create(g1, "text", 100, 100, "20pt Lucida Console", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
-            //text.origin = new Vector2(0.0, 1.0);
-            var rectList = Array();
-            var ss = 600;
-            var rs = 100;
-            for (var i = 0; i < 50; i++) {
-                var posX = Math.random() * ss;
-                var posY = Math.random() * ss;
-                var w = Math.random() * rs;
-                var h = Math.random() * rs;
-                var rect = BABYLON.Rectangle2D.Create(g1, "rect" + i.toString(), posX, posY, w, h, BABYLON.Canvas2D.GetSolidColorBrush(new BABYLON.Color4(Math.random(), Math.random(), Math.random(), 1)));
-                rect.roundRadius = Math.random() * Math.min(rect.size.width, rect.size.height) * 0.4;
-                rect.origin = new Vector2(0.5, 0.5);
-                rectList.push(rect);
-            }
-            var z = canvas.getActualZOffset();
-            z = g1.getActualZOffset();
-            z = rectList[0].getActualZOffset();
-            z = rectList[1].getActualZOffset();
-            setInterval(function () {
-                //g1.rotation += 0.003;
-                //rectList.forEach(r => r.rotation += 0.003);
-                //rectList[49].position = new Vector2(rectList[49].position.x + 0.1, rectList[49].position.y+0.6);
-                //                sprite.rotation += 0.005;
-                //rect.rotation += 0.005;
-            }, 10);
-            //var ii = new IntersectInfo2D();
-            //htmlCanvasElement.addEventListener("pointerdown", (event: PointerEvent) => {
-            //    var pickPos = new Vector2(event.offsetX, canvas.actualSize.height - event.offsetY);
-            //    ii.pickPosition = pickPos;
-            //    ii.findFirstOnly = false;
-            //    if (canvas.intersect(ii)) {
-            //        console.log(`pickPos: ${pickPos.toString()}, intersect: ${ii.intersectedPrimitives[0].prim.id} at: ${ii.intersectedPrimitives[0].intersectionLocation.toString()}`);
-            //    }
-            //});
-            //var texture = new Texture("assets/rock2.png", this.scene, true, true, Texture.NEAREST_SAMPLINGMODE);
-            //var sprite = Sprite2D.Create(canvas, "sprite1", 250, 250, texture, new Size(128, 128), new Vector2(0,0));
-            //sprite.origin = Vector2.Zero();
-            //var canvas = Canvas2D.CreateWorldSpace(this.scene, "ScreenCanvas", new Vector3(0, 0, 0), Quaternion.RotationYawPitchRoll(Math.PI / 4, Math.PI/4, 0), new Size(100, 100), 4, Mesh.DEFAULTSIDE, Canvas2D.CACHESTRATEGY_CANVAS);
-            //canvas.backgroundFill = Canvas2D.GetSolidColorBrushFromHex("#C0C0C040");
-            //canvas.backgroundRoundRadius = 50;
-            //var g1 = Group2D.CreateGroup2D(canvas, "group", Vector2.Zero(), null);
-            //g1.scale = 4;
-            //var rect = Rectangle2D.Create(g1, "rect", 50, 50, 25, 25, null, Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            //rect.borderThickness = 2;
-            //rect.roundRadius = 2;
-            //var insideRect = Rectangle2D.Create(rect, "insideRect", 0, 0, 10, 10, Canvas2D.GetSolidColorBrushFromHex("#0040F0FF"));
-            //insideRect.roundRadius = 1;
-            //setInterval(() => {
-            //    rect.rotation += 0.01;
-            //}, 10);
-            //let canvas2 = Canvas2D.CreateScreenSpace(this.scene, "ScreenCanvas", new Vector2(0, 0), new Size(this.engine.getRenderWidth(), this.engine.getRenderHeight()), Canvas2D.CACHESTRATEGY_DONTCACHE);
-            //var g1 = Group2D.CreateGroup2D(canvas2, "g1", new Vector2(0, 100));
-            ////g1.rotation = Math.PI / 5;
-            //var g2 = Group2D.CreateGroup2D(g1, "g2", new Vector2(0, 0), new Size(500, 500));
-            //var texture = new Texture("assets/rock2.png", this.scene, true, true, Texture.NEAREST_SAMPLINGMODE);
-            //var sprite = Sprite2D.Create(g2, "sprite1", 250, 250, texture, new Size(128, 128), new Vector2(0,0));
-            ////sprite.invertY = true;
-            //sprite.origin = Vector2.Zero();
-            //var r = Rectangle2D.Create(g1, "rect1", 200, 200, 90, 90, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)));
-            //r.origin = new Vector2(0, 1);
-            //r.roundRadius = 0;
-            //var r3 = Rectangle2D.Create(g1, "rect3", 200, 50, 200, 90, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.9, 0.9, 1)));
-            //r3.origin = new Vector2(0, 0);
-            //r3.roundRadius = 0;
-            //let rrList = new Array<Rectangle2D>();
-            //for (let i = 0; i < 20; i++) {
-            //    let rr = Rectangle2D.Create(g1, `rr${i}`, 20 + i*20, 50, 40, 40, Canvas2D.GetSolidColorBrush(new Color4(0.3 + i/40, i/20, 0.1, 1)));
-            //    rr.origin = new Vector2(0, 0);
-            //    rr.roundRadius = 0;
-            //    rrList.push(rr);
-            //}
-            ////var r5 = Rectangle2D.Create(g2, "rect3", 10, 10, 50, 50, null, Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            ////r5.origin = new Vector2(0, 0);
-            ////r5.roundRadius = 1;
-            ////var r2 = Rectangle2D.Create(g2, "rect1", 110, 10, 200, 200, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)), Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            ////r2.borderThickness = 10;
-            ////r2.origin = new Vector2(0, 0);
-            ////r2.roundRadius = 10;
-            //var text = Text2D.Create(g1, "text", 0, 0, "20pt Lucida Console", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
-            //let wc = Canvas2D.CreateWorldSpace(this.scene, "worldSpace", new Vector3(0, 0, 100), Quaternion.Identity(), new Size(100, 100), 4, Mesh.DEFAULTSIDE, Canvas2D.CACHESTRATEGY_CANVAS);
-            //var r4 = Rectangle2D.Create(wc, "rect1", -40, 10, 200, 200, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)), Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            //r4.borderThickness = 10;
-            //r4.rotation = 0.2;
-            //r4.origin = new Vector2(0, 0);
-            //r4.roundRadius = 10;
-            //            setInterval(() => {
-            //                rrList.forEach(r => r.rotation += 0.009);
-            ////                g2.position = new Vector2(g2.position.x + 0.1, g2.position.y);
-            ////                sprite.rotation += 0.005;
-            ////                g1.scale += 0.001;
-            ////                r3.position = new Vector2(r3.position.x + 0.0, r3.position.y + 0.1);
-            //                //text.position = new Vector2(text.position.x + 0.0, text.position.y + 0.1);
-            //                //r.rotation += 0.005;
-            //                //r3.rotation -= 0.005;
-            ////                g1.scale += 0.0001;
-            //}, 10);
-            // This creates a light, aiming 0,1,0 - to the sky.
-            //var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), this.scene);
-            //var light = new BABYLON.DirectionalLight("light1", new BABYLON.Vector3(0, 0, 1), this.scene);
-            var light = new BABYLON.PointLight("light1", new BABYLON.Vector3(50, 50, -70), this.scene);
-            //light.intensity = 10;
-            //light.intensity = 0.5;
-            //light.specular = new BABYLON.Color3(0, 0, 0);
-            var self = this;
-            //var box = Mesh.CreateBox("box", 1, this.scene);
-            //box.position = new Vector3(1, 2, 3);
-            ////this.scene.constantlyUpdateMeshUnderPointer = true;
-            //var box2 = Mesh.CreateBox("box", 2, this.scene);
-            //box2.position = new Vector3(-5, 0, 0);
-            //box2.parent = box;
-            //var mtl = new StandardMaterial("mtl", this.scene);
-            //mtl.diffuseColor = new Color3(0, 1, 0);
-            //box2.material = mtl;
-            //var sih = new SimpleInteractionHelper(this.scene);
-            //var points = new Array<Vector3>();
-            //points.push(new Vector3(0, 0, 0));
-            //points.push(new Vector3(0, 1, 0));
-            //points.push(new Vector3(1, 1, 0));
-            //points.push(new Vector3(1, 0, 0));
-            //points.push(new Vector3(0, 0, 0));
-            //var lineMesh = Mesh.CreateLines("lines", points, this.scene);
-            //lineMesh.geometry.boundingBias = new Vector2(0, 0.01);
-            // Register a render loop to repeatedly render the scene
-            this.engine.runRenderLoop(function () {
-                htmlCanvasElement.width = window.innerWidth - 20;
-                htmlCanvasElement.height = window.innerHeight - 20;
-                if (self.scene) {
-                    self.scene.render();
-                }
-            });
-            // Watch for browser/canvas resize events
-            window.addEventListener("resize", function () {
-                if (self.scene) {
-                    self.engine.resize();
-                }
-            });
-            this.scene.registerBeforeRender(function () {
-                //light.position = camera.position;
-                //mousemov = false;
-            });
-            this.scene.afterRender = function () {
-            };
-        };
-        return MainClass;
-    }());
-    Sandbox.MainClass = MainClass;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=MainClass.js.map

+ 0 - 337
typescript/MainClass.ts

@@ -1,337 +0,0 @@
-/// <reference path="simpleinteractionhelper.ts" />
-
-module Sandbox {
-    import Vector2 = BABYLON.Vector2;
-    import Mesh = BABYLON.Mesh;
-    import Vector3 = BABYLON.Vector3;
-    import Color4 = BABYLON.Color4;
-    import StringDictionary = BABYLON.StringDictionary;
-    import Group2D = BABYLON.Group2D;
-    import Rectangle2D = BABYLON.Rectangle2D;
-    import Canvas2D = BABYLON.Canvas2D;
-    import Texture = BABYLON.Texture;
-    import Sprite2D = BABYLON.Sprite2D;
-    import Size = BABYLON.Size;
-    import Text2D = BABYLON.Text2D;
-    import Matrix = BABYLON.Matrix;
-    import Quaternion = BABYLON.Quaternion;
-    import StandardMaterial = BABYLON.StandardMaterial;
-    import Color3 = BABYLON.Color3;
-    import IntersectInfo2D = BABYLON.IntersectInfo2D;
-    import PrimitivePointerInfo = BABYLON.PrimitivePointerInfo;
-
-    @className("TestA")
-    export class TestA {
-        a: number;
-    }
-
-    @className("TestB")
-    export class TestB extends TestA {
-        b: number;
-    }
-
-    export function className(name: string): (target: Object) => void {
-        return (target: Object) => {
-            target["__bjsclassName__"] = name;
-        }
-    }
-
-    export function getClassName(object): string {
-        let name = null;
-        if (object instanceof Object) {
-            let classObj = Object.getPrototypeOf(object);
-            name = classObj.constructor["__bjsclassName__"];
-        }
-        if (!name) {
-            name = typeof object;
-        }
-
-        return name;
-    }
-
-    export class MainClass {
-        engine: BABYLON.Engine;
-        scene: BABYLON.Scene;
-        camera: BABYLON.TargetCamera;
-        start() {
-            BABYLON.Engine.CodeRepository = "/src/";
-            BABYLON.Engine.ShadersRepository = "/src/Shaders/";
-
-            if (BABYLON.Engine.isSupported() === false) {
-                console.log("web browser doesn't support WebGL");
-                return;
-            }
-
-            var tb = new TestB();
-
-            let res = getClassName(tb);
-            res = getClassName(12);
-
-            let pb = Object.getPrototypeOf(tb);
-            let pa = Object.getPrototypeOf(pb);
-
-            let nameB = pb.constructor["__className__"];
-            let nameA = pa.constructor["__className__"];
-
-            // Get the canvas element from our HTML below
-            var htmlCanvasElement = <HTMLCanvasElement>document.querySelector("#renderCanvas");
-
-            //var canvas2d = <HTMLCanvasElement>document.querySelector("#canvas2d");
-            //var context = canvas2d.getContext("2d");
-            //context.font = "8pt Lucida Console";
-            //context.fillStyle = "red";
-            //context.textBaseline = 'top';
-            //context.fillText("ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0, 0);
-
-            // Load the BABYLON 3D engine
-            this.engine = new BABYLON.Engine(htmlCanvasElement, true);
-
-            // Now create a basic Babylon Scene object
-            this.scene = new BABYLON.Scene(this.engine);
-
-            //this.scene.debugLayer.show();
-
-            //var instData = new BABYLON.Rectangle2DInstanceData();
-            //instData._instancesArray = new Float32Array(100);
-            //instData._instanceOffset = 0;
-
-            //instData.zBias = 1;
-            //instData.transform = Matrix.Identity();
-            //instData.properties = new Vector3(1, 2, 3);
-
-
-            //var effect = this.engine.createEffect({ vertex: "rect2d", fragment: "rect2d" }, ["zBias", "transform", "properties"], [], [], "");
-            //var node = instData.getClassTreeInfo();
-
-            //setTimeout(() => {
-            //    var offsets = node.classContent.getOffsetLocations(effect);
-
-            //    },
-            //    1000);
-            // Change the scene background color to green.
-            this.scene.clearColor = new BABYLON.Color3(56 / 256, 87 / 256, 145 / 256);
-
-            // This creates and positions a free camera
-            var hpi = Math.PI / 2;
-            this.camera = new BABYLON.ArcRotateCamera("camera1", -hpi, hpi, 150, new BABYLON.Vector3(0, 0, 0), this.scene);
-            this.camera.setTarget(BABYLON.Vector3.Zero());
-
-            this.camera.attachControl(htmlCanvasElement);
-
-            //this.scene.debugLayer.show();
-
-            let canvas = Canvas2D.CreateScreenSpace(this.scene, "ScreenCanvas", new Vector2(0, 100), new Size(600, 600), Canvas2D.CACHESTRATEGY_DONTCACHE);
-            canvas.backgroundFill = Canvas2D.GetSolidColorBrushFromHex("#C0808080");
-            canvas.backgroundRoundRadius = 50;
-
-            var g1 = Group2D.CreateGroup2D(canvas, "g1", new Vector2(300, 300), new Size(600, 600));
-
-            g1.pointerEventObservable.add((d, s) => {
-                if (s.mask === PrimitivePointerInfo.PointerDown) {
-                    canvas.setPointerCapture(d.pointerId, d.relatedTarget);
-                }
-                else if (s.mask === PrimitivePointerInfo.PointerUp) {
-                    canvas.releasePointerCapture(d.pointerId, d.relatedTarget);
-                }
-                console.log(`Pointer Down on ${d.relatedTarget.id}`);
-
-            }, PrimitivePointerInfo.PointerDown|PrimitivePointerInfo.PointerUp);
-
-            //var text = Text2D.Create(g1, "text", 100, 100, "20pt Lucida Console", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
-            //text.origin = new Vector2(0.0, 1.0);
-
-
-
-            var rectList = Array<Rectangle2D>();
-            var ss = 600;
-            var rs = 100;
-
-            for (var i = 0; i < 50; i++) {
-                var posX = Math.random() * ss;
-                var posY = Math.random() * ss;
-
-                var w = Math.random() * rs;
-                var h = Math.random() * rs;
-
-                var rect = BABYLON.Rectangle2D.Create(g1, "rect" + i.toString(), posX, posY, w, h,
-                    BABYLON.Canvas2D.GetSolidColorBrush(new BABYLON.Color4(Math.random(), Math.random(), Math.random(), 1)));
-                rect.roundRadius = Math.random() * Math.min(rect.size.width, rect.size.height) * 0.4;
-                rect.origin = new Vector2(0.5, 0.5);
-
-                rectList.push(rect);
-            }
-
-            let z = canvas.getActualZOffset();
-            z = g1.getActualZOffset();
-            z = rectList[0].getActualZOffset();
-            z = rectList[1].getActualZOffset();
-
-            setInterval(() => {
-                //g1.rotation += 0.003;
-                //rectList.forEach(r => r.rotation += 0.003);
-                //rectList[49].position = new Vector2(rectList[49].position.x + 0.1, rectList[49].position.y+0.6);
-
-//                sprite.rotation += 0.005;
-                //rect.rotation += 0.005;
-
-            }, 10);
-
-            //var ii = new IntersectInfo2D();
-            //htmlCanvasElement.addEventListener("pointerdown", (event: PointerEvent) => {
-            //    var pickPos = new Vector2(event.offsetX, canvas.actualSize.height - event.offsetY);
-            //    ii.pickPosition = pickPos;
-            //    ii.findFirstOnly = false;
-            //    if (canvas.intersect(ii)) {
-            //        console.log(`pickPos: ${pickPos.toString()}, intersect: ${ii.intersectedPrimitives[0].prim.id} at: ${ii.intersectedPrimitives[0].intersectionLocation.toString()}`);
-            //    }
-
-            //});
-
-            //var texture = new Texture("assets/rock2.png", this.scene, true, true, Texture.NEAREST_SAMPLINGMODE);
-            //var sprite = Sprite2D.Create(canvas, "sprite1", 250, 250, texture, new Size(128, 128), new Vector2(0,0));
-            //sprite.origin = Vector2.Zero();
-
-            //var canvas = Canvas2D.CreateWorldSpace(this.scene, "ScreenCanvas", new Vector3(0, 0, 0), Quaternion.RotationYawPitchRoll(Math.PI / 4, Math.PI/4, 0), new Size(100, 100), 4, Mesh.DEFAULTSIDE, Canvas2D.CACHESTRATEGY_CANVAS);
-            //canvas.backgroundFill = Canvas2D.GetSolidColorBrushFromHex("#C0C0C040");
-            //canvas.backgroundRoundRadius = 50;
-
-            //var g1 = Group2D.CreateGroup2D(canvas, "group", Vector2.Zero(), null);
-            //g1.scale = 4;
-
-            //var rect = Rectangle2D.Create(g1, "rect", 50, 50, 25, 25, null, Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            //rect.borderThickness = 2;
-            //rect.roundRadius = 2;
-
-            //var insideRect = Rectangle2D.Create(rect, "insideRect", 0, 0, 10, 10, Canvas2D.GetSolidColorBrushFromHex("#0040F0FF"));
-            //insideRect.roundRadius = 1;
-
-            //setInterval(() => {
-            //    rect.rotation += 0.01;
-            //}, 10);
-
-
-            //let canvas2 = Canvas2D.CreateScreenSpace(this.scene, "ScreenCanvas", new Vector2(0, 0), new Size(this.engine.getRenderWidth(), this.engine.getRenderHeight()), Canvas2D.CACHESTRATEGY_DONTCACHE);
-
-            //var g1 = Group2D.CreateGroup2D(canvas2, "g1", new Vector2(0, 100));
-            ////g1.rotation = Math.PI / 5;
-
-            //var g2 = Group2D.CreateGroup2D(g1, "g2", new Vector2(0, 0), new Size(500, 500));
-
-
-
-            //var texture = new Texture("assets/rock2.png", this.scene, true, true, Texture.NEAREST_SAMPLINGMODE);
-            //var sprite = Sprite2D.Create(g2, "sprite1", 250, 250, texture, new Size(128, 128), new Vector2(0,0));
-            ////sprite.invertY = true;
-            //sprite.origin = Vector2.Zero();
-
-            //var r = Rectangle2D.Create(g1, "rect1", 200, 200, 90, 90, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)));
-            //r.origin = new Vector2(0, 1);
-            //r.roundRadius = 0;
-
-            //var r3 = Rectangle2D.Create(g1, "rect3", 200, 50, 200, 90, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.9, 0.9, 1)));
-            //r3.origin = new Vector2(0, 0);
-            //r3.roundRadius = 0;
-
-            //let rrList = new Array<Rectangle2D>();
-            //for (let i = 0; i < 20; i++) {
-            //    let rr = Rectangle2D.Create(g1, `rr${i}`, 20 + i*20, 50, 40, 40, Canvas2D.GetSolidColorBrush(new Color4(0.3 + i/40, i/20, 0.1, 1)));
-            //    rr.origin = new Vector2(0, 0);
-            //    rr.roundRadius = 0;
-            //    rrList.push(rr);
-            //}
-
-
-            ////var r5 = Rectangle2D.Create(g2, "rect3", 10, 10, 50, 50, null, Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            ////r5.origin = new Vector2(0, 0);
-            ////r5.roundRadius = 1;
-            ////var r2 = Rectangle2D.Create(g2, "rect1", 110, 10, 200, 200, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)), Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            ////r2.borderThickness = 10;
-            ////r2.origin = new Vector2(0, 0);
-            ////r2.roundRadius = 10;
-
-            //var text = Text2D.Create(g1, "text", 0, 0, "20pt Lucida Console", "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
-
-            //let wc = Canvas2D.CreateWorldSpace(this.scene, "worldSpace", new Vector3(0, 0, 100), Quaternion.Identity(), new Size(100, 100), 4, Mesh.DEFAULTSIDE, Canvas2D.CACHESTRATEGY_CANVAS);
-
-            //var r4 = Rectangle2D.Create(wc, "rect1", -40, 10, 200, 200, Canvas2D.GetSolidColorBrush(new Color4(0.3, 0.3, 0.9, 1)), Canvas2D.GetGradientColorBrush(new Color4(0.9, 0.3, 0.9, 1), new Color4(1.0, 1.0, 1.0, 1)));
-            //r4.borderThickness = 10;
-            //r4.rotation = 0.2;
-            //r4.origin = new Vector2(0, 0);
-            //r4.roundRadius = 10;
-
-
-
-//            setInterval(() => {
-//                rrList.forEach(r => r.rotation += 0.009);
-
-////                g2.position = new Vector2(g2.position.x + 0.1, g2.position.y);
-////                sprite.rotation += 0.005;
-////                g1.scale += 0.001;
-////                r3.position = new Vector2(r3.position.x + 0.0, r3.position.y + 0.1);
-//                //text.position = new Vector2(text.position.x + 0.0, text.position.y + 0.1);
-//                //r.rotation += 0.005;
-//                //r3.rotation -= 0.005;
-////                g1.scale += 0.0001;
-            //}, 10);
-
-            // This creates a light, aiming 0,1,0 - to the sky.
-            //var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), this.scene);
-            //var light = new BABYLON.DirectionalLight("light1", new BABYLON.Vector3(0, 0, 1), this.scene);
-            var light = new BABYLON.PointLight("light1", new BABYLON.Vector3(50, 50, -70), this.scene);
-            //light.intensity = 10;
-            //light.intensity = 0.5;
-            //light.specular = new BABYLON.Color3(0, 0, 0);
-
-            var self = this;
-
-            //var box = Mesh.CreateBox("box", 1, this.scene);
-            //box.position = new Vector3(1, 2, 3);
-            ////this.scene.constantlyUpdateMeshUnderPointer = true;
-
-            //var box2 = Mesh.CreateBox("box", 2, this.scene);
-            //box2.position = new Vector3(-5, 0, 0);
-            //box2.parent = box;
-
-            //var mtl = new StandardMaterial("mtl", this.scene);
-            //mtl.diffuseColor = new Color3(0, 1, 0);
-            //box2.material = mtl;
-
-            //var sih = new SimpleInteractionHelper(this.scene);
-
-            //var points = new Array<Vector3>();
-            //points.push(new Vector3(0, 0, 0));
-            //points.push(new Vector3(0, 1, 0));
-            //points.push(new Vector3(1, 1, 0));
-            //points.push(new Vector3(1, 0, 0));
-            //points.push(new Vector3(0, 0, 0));
-
-            //var lineMesh = Mesh.CreateLines("lines", points, this.scene);
-            //lineMesh.geometry.boundingBias = new Vector2(0, 0.01);
-
-            // Register a render loop to repeatedly render the scene
-            this.engine.runRenderLoop(function () {
-                htmlCanvasElement.width = window.innerWidth-20;
-                htmlCanvasElement.height = window.innerHeight-20;
-                if (self.scene) {
-                    self.scene.render();
-                }
-            });
-            
-            // Watch for browser/canvas resize events
-            window.addEventListener("resize", function () {
-                if (self.scene) {
-                    self.engine.resize();
-                }
-            });
-
-            this.scene.registerBeforeRender(function () {
-                //light.position = camera.position;
-                //mousemov = false;
-            });
-
-            this.scene.afterRender = function () {
-            };
-
-        }
-    }
-}

+ 0 - 145
typescript/Manipulator.js

@@ -1,145 +0,0 @@
-var Vector4 = BABYLON.Vector2;
-var Sandbox;
-(function (Sandbox) {
-    var Vector3 = BABYLON.Vector3;
-    var Matrix = BABYLON.Matrix;
-    var Plane = BABYLON.Plane;
-    var ManipulatorInteractionHelper = (function () {
-        function ManipulatorInteractionHelper(scene) {
-            this._scene = scene;
-        }
-        ManipulatorInteractionHelper.prototype.hasManipulatedMode = function (value) {
-            return (this._manipulatedMode & value) !== 0;
-        };
-        ManipulatorInteractionHelper.prototype.hasManFlags = function (value) {
-            return (this._flags & value) !== 0;
-        };
-        ManipulatorInteractionHelper.ComputeRayHit = function (ray, distance) {
-            return ray.origin.add(ray.direction.multiplyByFloats(distance, distance, distance));
-        };
-        ManipulatorInteractionHelper.prototype.doPos = function (mouse) {
-            var v = Vector3.Zero();
-            var ray = this._scene.createPickingRay(mouse.x, mouse.y, Matrix.Identity(), this._scene.activeCamera);
-            if (this.hasManipulatedMode(16 /* PlaneSelectionXY */ | 32 /* PlaneSelectionXZ */ | 64 /* PlaneSelectionYZ */)) {
-                var pl0;
-                var hit;
-                if (this.hasManipulatedMode(16 /* PlaneSelectionXY */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                }
-                else if (this.hasManipulatedMode(32 /* PlaneSelectionXZ */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._view));
-                }
-                else if (this.hasManipulatedMode(64 /* PlaneSelectionYZ */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                }
-                else {
-                }
-                var clip = 0.06;
-                //Check if the plane is too parallel to the ray
-                if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) < clip) {
-                    return;
-                }
-                //Make the intersection
-                var distance = ray.intersectsPlane(pl0);
-                hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                //Check if it's the first call
-                if (this.hasManFlags(2 /* FirstHit */)) {
-                    this._flags &= ~2 /* FirstHit */;
-                    this._prevHit = hit;
-                    return;
-                }
-                //Compute the vector
-                v = hit.subtract(this._prevHit);
-            }
-            else if ((this._manipulatedMode & (1 /* ArrowX */ | 2 /* ArrowY */ | 4 /* ArrowZ */)) != 0) {
-                var pl0, pl1;
-                var hit;
-                var s;
-                if (this.hasManFlags(2 /* FirstHit */)) {
-                    var res = this.setupIntersectionPlanes(this._manipulatedMode);
-                    pl0 = res.p0;
-                    pl1 = res.p1;
-                    if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) > Math.abs(Vector3.Dot(pl1.normal, ray.direction))) {
-                        var distance = ray.intersectsPlane(pl0);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        this._flags &= ~3 /* Plane2 */;
-                    }
-                    else {
-                        var distance = ray.intersectsPlane(pl1);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        this._flags |= 3 /* Plane2 */;
-                    }
-                    this._flags &= ~2 /* FirstHit */;
-                    this._prevHit = hit;
-                    return;
-                }
-                else {
-                    var axis;
-                    var res = this.setupIntersectionPlane(this._manipulatedMode, this.hasManFlags(3 /* Plane2 */));
-                    pl0 = res.plane;
-                    axis = res.axis;
-                    var distance = ray.intersectsPlane(pl0);
-                    hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                    v = hit.subtract(this._prevHit);
-                    s = Vector3.Dot(axis, v);
-                    v = axis.multiplyByFloats(s, s, s);
-                }
-            }
-            if (this.translationStep !== 0.0) {
-                v.x -= v.x % this.translationStep;
-                v.y -= v.y % this.translationStep;
-                v.z -= v.z % this.translationStep;
-            }
-            var mtx = this._firstTransform;
-            mtx.setTranslation(mtx.getTranslation().add(v));
-            this._pos = mtx.getTranslation();
-            //TODO
-            //this._manipulatedObject.SetSmartPropertyValue(this._manipulatedTransform, mtx);
-        };
-        ManipulatorInteractionHelper.prototype.setupIntersectionPlane = function (mode, plane2) {
-            var res = this.setupIntersectionPlanes(mode);
-            var pl = plane2 ? res.p1 : res.p0;
-            var axis;
-            switch (mode) {
-                case 1 /* ArrowX */:
-                    axis = this._right;
-                    break;
-                case 2 /* ArrowY */:
-                    axis = this._up;
-                    break;
-                case 4 /* ArrowZ */:
-                    axis = this._view;
-                    break;
-                default:
-                    axis = Vector3.Zero();
-                    break;
-            }
-            return { plane: pl, axis: axis };
-        };
-        ManipulatorInteractionHelper.prototype.setupIntersectionPlanes = function (mode) {
-            var p0, p1;
-            switch (mode) {
-                case 1 /* ArrowX */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                    break;
-                case 2 /* ArrowY */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                    break;
-                case 4 /* ArrowZ */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._up));
-                    break;
-            }
-            return { p0: p0, p1: p1 };
-        };
-        ManipulatorInteractionHelper.prototype.attachManipulatedNode = function (node) {
-        };
-        ManipulatorInteractionHelper.prototype.detachManipulatedNode = function (node) {
-        };
-        return ManipulatorInteractionHelper;
-    }());
-    Sandbox.ManipulatorInteractionHelper = ManipulatorInteractionHelper;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=Manipulator.js.map

+ 0 - 370
typescript/ManipulatorInteractionHelper.js

@@ -1,370 +0,0 @@
-var Vector4 = BABYLON.Vector2;
-var Sandbox;
-(function (Sandbox) {
-    var Vector2 = BABYLON.Vector2;
-    var Vector3 = BABYLON.Vector3;
-    var Matrix = BABYLON.Matrix;
-    var Plane = BABYLON.Plane;
-    var AbstractMesh = BABYLON.AbstractMesh;
-    var Quaternion = BABYLON.Quaternion;
-    var PointerEventTypes = BABYLON.PointerEventTypes;
-    /**
-     * This class is used to manipulated a single node.
-     * Right now only node of type AbstractMesh is support.
-     * In the future, manipulation on multiple selection could be possible.
-     *
-     * A manipulation start when left clicking and moving the mouse. It can be cancelled if the right mouse button is clicked before releasing the left one (this feature is only possible if noPreventContextMenu is false).
-     * Per default translation is peformed when manipulating the arrow (axis or cone) or the plane anchor. If you press the shift key it will switch to rotation manipulation. The Shift key can be toggle while manipulating, the current manipulation is accept and a new one starts.
-     *
-     * You can set the rotation/translationStep (in radian) to enable snapping.
-     *
-     * The current implementation of this class creates a radix with all the features selected.
-     */
-    var ManipulatorInteractionHelper = (function () {
-        function ManipulatorInteractionHelper(scene) {
-            var _this = this;
-            this.noPreventContextMenu = false;
-            this._flags = 0;
-            this._rotationFactor = 1;
-            this._scene = scene;
-            this._radix = new Sandbox.Radix(scene);
-            this._shiftKeyState = false;
-            this._scene.onBeforeRenderObservable.add(function (e, s) { return _this.onBeforeRender(e, s); });
-            this._scene.onPointerObservable.add(function (e, s) { return _this.onPointer(e, s); }, -1, true);
-            window.oncontextmenu = function (ev) {
-                if (!_this.noPreventContextMenu) {
-                    ev.preventDefault();
-                }
-            };
-        }
-        /**
-         * Attach a node to manipulate. Right now, only manipulation on a single node is supported, but this api will allow manipulation on a multiple selection in the future.
-         * @param node
-         */
-        ManipulatorInteractionHelper.prototype.attachManipulatedNode = function (node) {
-            this._manipulatedNode = node;
-            this._radix.show();
-        };
-        /**
-         * Detach the node to manipulate. Right now, only manipulation on a single node is supported, but this api will allow manipulation on a multiple selection in the future.
-         */
-        ManipulatorInteractionHelper.prototype.detachManipulatedNode = function (node) {
-            this._manipulatedNode = null;
-            this._radix.hide();
-        };
-        ManipulatorInteractionHelper.prototype.onBeforeRender = function (scene, state) {
-            this.renderManipulator();
-        };
-        ManipulatorInteractionHelper.prototype.onPointer = function (e, state) {
-            if (!this._manipulatedNode) {
-                return;
-            }
-            var rayPos = this.getRayPosition(e.event);
-            var shiftKeyState = e.event.shiftKey;
-            // Detect Modifier Key changes for shift while manipulating: commit and start a new manipulation
-            if (this.hasManFlags(1 /* DragMode */) && shiftKeyState !== this._shiftKeyState) {
-                this.beginDrag(rayPos, e.event);
-            }
-            // Mouse move
-            if (e.type === PointerEventTypes.POINTERMOVE) {
-                // Right button release while left is down => cancel the manipulation. only processed when the context menu is not showed during manipulation
-                if (!this.noPreventContextMenu && e.event.button === 2 && e.event.buttons === 1) {
-                    this.setManipulatedNodeWorldMatrix(this._firstTransform);
-                    this.setManFlags(8 /* Exiting */);
-                }
-                else if (this.hasManFlags(1 /* DragMode */) && !this.hasManFlags(8 /* Exiting */)) {
-                    state.skipNextObservers = true;
-                    if (shiftKeyState || this.hasManipulatedMode(1792 /* Rotations */)) {
-                        this.doRot(rayPos);
-                    }
-                    else {
-                        this.doPos(rayPos);
-                    }
-                }
-                else {
-                    this._radix.highlighted = this._radix.intersect(rayPos);
-                }
-            }
-            else if (e.type === PointerEventTypes.POINTERDOWN && e.event.button === 0) {
-                this._manipulatedMode = this._radix.intersect(rayPos);
-                if (this._manipulatedMode !== 0 /* None */) {
-                    state.skipNextObservers = true;
-                    this.beginDrag(rayPos, e.event);
-                    if (this.hasManipulatedMode(1792 /* Rotations */)) {
-                        this.doRot(rayPos);
-                    }
-                    else {
-                        this.doPos(rayPos);
-                    }
-                }
-            }
-            else if (e.type === PointerEventTypes.POINTERUP) {
-                if (this.hasManFlags(1 /* DragMode */)) {
-                    state.skipNextObservers = true;
-                }
-                this._radix.highlighted = this._radix.intersect(rayPos);
-                // Left up: end manipulation
-                if (e.event.button === 0) {
-                    this.endDragMode();
-                }
-            }
-        };
-        ManipulatorInteractionHelper.prototype.beginDrag = function (rayPos, event) {
-            this._firstMousePos = rayPos;
-            this._prevMousePos = this._firstMousePos.clone();
-            this._shiftKeyState = event.shiftKey;
-            var mtx = this.getManipulatedNodeWorldMatrix();
-            this._pos = mtx.getTranslation();
-            this._right = mtx.getRow(0).toVector3();
-            this._up = mtx.getRow(1).toVector3();
-            this._view = mtx.getRow(2).toVector3();
-            this._oldPos = this._pos.clone();
-            this._firstTransform = mtx.clone();
-            this._flags |= 2 /* FirstHit */ | 1 /* DragMode */;
-        };
-        ManipulatorInteractionHelper.prototype.endDragMode = function () {
-            this.clearManFlags(1 /* DragMode */ | 8 /* Exiting */);
-        };
-        ManipulatorInteractionHelper.prototype.doRot = function (rayPos) {
-            if (this.hasManFlags(2 /* FirstHit */)) {
-                this.clearManFlags(2 /* FirstHit */);
-                return;
-            }
-            var dx = rayPos.x - this._prevMousePos.x;
-            var dy = rayPos.y - this._prevMousePos.y;
-            var cr = this._scene.getEngine().getRenderingCanvasClientRect();
-            var ax = (dx / cr.width) * Math.PI * 2 * this._rotationFactor;
-            var ay = (dy / cr.height) * Math.PI * 2 * this._rotationFactor;
-            if (this.rotationStep) {
-                var rem = ax % this.rotationStep;
-                ax -= rem;
-                rem = ay % this.rotationStep;
-                ay -= rem;
-            }
-            var mtx = Matrix.Identity();
-            if (this.hasManipulatedMode(1 /* ArrowX */ | 256 /* RotationX */)) {
-                mtx = Matrix.RotationX(ay);
-            }
-            else if (this.hasManipulatedMode(2 /* ArrowY */ | 512 /* RotationY */)) {
-                mtx = Matrix.RotationY(ay);
-            }
-            else if (this.hasManipulatedMode(4 /* ArrowZ */ | 1024 /* RotationZ */)) {
-                mtx = Matrix.RotationZ(ay);
-            }
-            else {
-                if (this.hasManipulatedMode(/*RadixFeatures.CenterSquare |*/ 16 /* PlaneSelectionXY */ | 32 /* PlaneSelectionXZ */)) {
-                    mtx = mtx.multiply(Matrix.RotationX(ay));
-                }
-                if (this.hasManipulatedMode(16 /* PlaneSelectionXY */ | 64 /* PlaneSelectionYZ */)) {
-                    mtx = mtx.multiply(Matrix.RotationY(ax));
-                }
-                if (this.hasManipulatedMode(32 /* PlaneSelectionXZ */)) {
-                    mtx = mtx.multiply(Matrix.RotationZ(ay));
-                }
-                if (this.hasManipulatedMode(/*RadixFeatures.CenterSquare |*/ 32 /* PlaneSelectionXZ */)) {
-                    mtx = mtx.multiply(Matrix.RotationZ(ax));
-                }
-            }
-            var tmtx = mtx.multiply(this._firstTransform);
-            this.setManipulatedNodeWorldMatrix(tmtx);
-        };
-        ManipulatorInteractionHelper.prototype.doPos = function (rayPos) {
-            var v = Vector3.Zero();
-            var ray = this._scene.createPickingRay(rayPos.x, rayPos.y, Matrix.Identity(), this._scene.activeCamera);
-            if (this.hasManipulatedMode(16 /* PlaneSelectionXY */ | 32 /* PlaneSelectionXZ */ | 64 /* PlaneSelectionYZ */)) {
-                var pl0;
-                var hit;
-                if (this.hasManipulatedMode(16 /* PlaneSelectionXY */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                }
-                else if (this.hasManipulatedMode(32 /* PlaneSelectionXZ */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._view));
-                }
-                else if (this.hasManipulatedMode(64 /* PlaneSelectionYZ */)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                }
-                else {
-                }
-                var clip = 0.06;
-                //Check if the plane is too parallel to the ray
-                if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) < clip) {
-                    return;
-                }
-                //Make the intersection
-                var distance = ray.intersectsPlane(pl0);
-                hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                //Check if it's the first call
-                if (this.hasManFlags(2 /* FirstHit */)) {
-                    this._flags &= ~2 /* FirstHit */;
-                    this._prevHit = hit;
-                    return;
-                }
-                //Compute the vector
-                v = hit.subtract(this._prevHit);
-            }
-            else if ((this._manipulatedMode & (1 /* ArrowX */ | 2 /* ArrowY */ | 4 /* ArrowZ */)) !== 0) {
-                var pl0, pl1;
-                var hit;
-                var s;
-                if (this.hasManFlags(2 /* FirstHit */)) {
-                    var res = this.setupIntersectionPlanes(this._manipulatedMode);
-                    pl0 = res.p0;
-                    pl1 = res.p1;
-                    if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) > Math.abs(Vector3.Dot(pl1.normal, ray.direction))) {
-                        var distance = ray.intersectsPlane(pl0);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        var number = ~4 /* Plane2 */;
-                        this._flags &= number;
-                    }
-                    else {
-                        var distance = ray.intersectsPlane(pl1);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        this._flags |= 4 /* Plane2 */;
-                    }
-                    this._flags &= ~2 /* FirstHit */;
-                    this._prevHit = hit;
-                    return;
-                }
-                else {
-                    var axis;
-                    var res = this.setupIntersectionPlane(this._manipulatedMode, this.hasManFlags(4 /* Plane2 */));
-                    pl0 = res.plane;
-                    axis = res.axis;
-                    var distance = ray.intersectsPlane(pl0);
-                    hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                    v = hit.subtract(this._prevHit);
-                    s = Vector3.Dot(axis, v);
-                    v = axis.multiplyByFloats(s, s, s);
-                }
-            }
-            if (this.translationStep) {
-                v.x -= v.x % this.translationStep;
-                v.y -= v.y % this.translationStep;
-                v.z -= v.z % this.translationStep;
-            }
-            var mtx = this._firstTransform.clone();
-            mtx.setTranslation(mtx.getTranslation().add(v));
-            this._pos = mtx.getTranslation();
-            this.setManipulatedNodeWorldMatrix(mtx);
-        };
-        ManipulatorInteractionHelper.prototype.hasManipulatedMode = function (value) {
-            return (this._manipulatedMode & value) !== 0;
-        };
-        ManipulatorInteractionHelper.prototype.hasManFlags = function (value) {
-            return (this._flags & value) !== 0;
-        };
-        ManipulatorInteractionHelper.prototype.clearManFlags = function (values) {
-            this._flags &= ~values;
-            return this._flags;
-        };
-        ManipulatorInteractionHelper.prototype.setManFlags = function (values) {
-            this._flags |= values;
-            return this._flags;
-        };
-        ManipulatorInteractionHelper.ComputeRayHit = function (ray, distance) {
-            return ray.origin.add(ray.direction.multiplyByFloats(distance, distance, distance));
-        };
-        ManipulatorInteractionHelper.prototype.setManipulatedNodeWorldMatrix = function (mtx) {
-            if (!this._manipulatedNode) {
-                return null;
-            }
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                var mesh = this._manipulatedNode;
-                if (mesh.parent) {
-                    mtx = mtx.multiply(mesh.parent.getWorldMatrix().clone().invert());
-                }
-                var pos = Vector3.Zero();
-                var scale = Vector3.Zero();
-                var rot = new Quaternion();
-                mtx.decompose(scale, rot, pos);
-                mesh.position = pos;
-                mesh.rotationQuaternion = rot;
-                mesh.scaling = scale;
-            }
-        };
-        ManipulatorInteractionHelper.prototype.getManipulatedNodeWorldMatrix = function () {
-            if (!this._manipulatedNode) {
-                return null;
-            }
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                return this._manipulatedNode.getWorldMatrix();
-            }
-        };
-        ManipulatorInteractionHelper.prototype.setupIntersectionPlane = function (mode, plane2) {
-            var res = this.setupIntersectionPlanes(mode);
-            var pl = plane2 ? res.p1 : res.p0;
-            var axis;
-            switch (mode) {
-                case 1 /* ArrowX */:
-                    axis = this._right;
-                    break;
-                case 2 /* ArrowY */:
-                    axis = this._up;
-                    break;
-                case 4 /* ArrowZ */:
-                    axis = this._view;
-                    break;
-                default:
-                    axis = Vector3.Zero();
-                    break;
-            }
-            return { plane: pl, axis: axis };
-        };
-        ManipulatorInteractionHelper.prototype.setupIntersectionPlanes = function (mode) {
-            var p0, p1;
-            switch (mode) {
-                case 1 /* ArrowX */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                    break;
-                case 2 /* ArrowY */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                    break;
-                case 4 /* ArrowZ */:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._up));
-                    break;
-            }
-            return { p0: p0, p1: p1 };
-        };
-        ManipulatorInteractionHelper.prototype.getRayPosition = function (event) {
-            var canvasRect = this._scene.getEngine().getRenderingCanvasClientRect();
-            var x = event.clientX - canvasRect.left;
-            var y = event.clientY - canvasRect.top;
-            return new Vector2(x, y);
-        };
-        ManipulatorInteractionHelper.prototype.renderManipulator = function () {
-            if (!this._manipulatedNode) {
-                return;
-            }
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                var mesh = this._manipulatedNode;
-                var worldMtx = mesh.getWorldMatrix();
-                var l = Vector3.Distance(this._scene.activeCamera.position, worldMtx.getTranslation());
-                var vpWidth = this._scene.getEngine().getRenderWidth();
-                var s = this.fromScreenToWorld(vpWidth / 100, l) * 20;
-                var scale = Vector3.Zero();
-                var position = Vector3.Zero();
-                var rotation = Quaternion.Identity();
-                var res = Matrix.Scaling(s, s, s).multiply(worldMtx);
-                res.decompose(scale, rotation, position);
-                this._radix.setWorld(position, rotation, scale);
-            }
-        };
-        ManipulatorInteractionHelper.prototype.fromScreenToWorld = function (l, z) {
-            var camera = this._scene.activeCamera;
-            var r0 = this._scene.createPickingRay(0, 0, Matrix.Identity(), camera, true);
-            var r1 = this._scene.createPickingRay(l, 0, Matrix.Identity(), camera, true);
-            var p0 = ManipulatorInteractionHelper.evalPosition(r0, z);
-            var p1 = ManipulatorInteractionHelper.evalPosition(r1, z);
-            return p1.x - p0.x;
-        };
-        ManipulatorInteractionHelper.evalPosition = function (ray, u) {
-            return ray.origin.add(ray.direction.multiplyByFloats(u, u, u));
-        };
-        return ManipulatorInteractionHelper;
-    }());
-    Sandbox.ManipulatorInteractionHelper = ManipulatorInteractionHelper;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=ManipulatorInteractionHelper.js.map

+ 0 - 498
typescript/ManipulatorInteractionHelper.ts

@@ -1,498 +0,0 @@
-import Vector4 = BABYLON.Vector2;
-
-module Sandbox {
-    import Vector2 = BABYLON.Vector2;
-    import Vector3 = BABYLON.Vector3;
-    import Matrix = BABYLON.Matrix;
-    import Ray = BABYLON.Ray;
-    import Plane = BABYLON.Plane;
-    import Scene = BABYLON.Scene;
-    import Node = BABYLON.Node;
-    import AbstractMesh = BABYLON.AbstractMesh;
-    import Quaternion = BABYLON.Quaternion;
-    import EventState = BABYLON.EventState;
-    import PointerInfo = BABYLON.PointerInfo;
-    import PointerEventTypes = BABYLON.PointerEventTypes;
-
-    /**
-     * This class is used to manipulated a single node.
-     * Right now only node of type AbstractMesh is support.
-     * In the future, manipulation on multiple selection could be possible.
-     *
-     * A manipulation start when left clicking and moving the mouse. It can be cancelled if the right mouse button is clicked before releasing the left one (this feature is only possible if noPreventContextMenu is false).
-     * Per default translation is peformed when manipulating the arrow (axis or cone) or the plane anchor. If you press the shift key it will switch to rotation manipulation. The Shift key can be toggle while manipulating, the current manipulation is accept and a new one starts.
-     *
-     * You can set the rotation/translationStep (in radian) to enable snapping.
-     *
-     * The current implementation of this class creates a radix with all the features selected.
-     */
-    export class ManipulatorInteractionHelper {
-
-        /**
-         * Rotation Step in Radian to perform rotation with the given step instead of a smooth one.
-         * Set back to null/undefined to disable
-         */
-        rotationStep: number;
-
-        /**
-         * Translation Step in World unit to perform translation at the given step instread of a smooth one.
-         * Set back to null/undefined to disable
-         */
-        translationStep: number;
-
-        /**
-         * Set to true if you want the context menu to be displayed while manipulating. The manipulation cancel feature (which is triggered by a right click) won't work in this case. Default value is false (context menu is not showed when right clicking during manipulation) and this should fit most of the cases.
-         */
-        noPreventContextMenu: boolean;
-
-        /**
-         * Attach a node to manipulate. Right now, only manipulation on a single node is supported, but this api will allow manipulation on a multiple selection in the future.
-         * @param node
-         */
-        attachManipulatedNode(node: Node) {
-            this._manipulatedNode = node;
-            this._radix.show();
-        }
-
-        /**
-         * Detach the node to manipulate. Right now, only manipulation on a single node is supported, but this api will allow manipulation on a multiple selection in the future.
-         */
-        detachManipulatedNode(node: Node) {
-            this._manipulatedNode = null;
-            this._radix.hide();
-        }
-
-        constructor(scene: Scene) {
-            this.noPreventContextMenu = false;
-            this._flags = 0;
-            this._rotationFactor = 1;
-            this._scene = scene;
-            this._radix = new Radix(scene);
-            this._shiftKeyState = false;
-
-            this._scene.onBeforeRenderObservable.add((e, s) => this.onBeforeRender(e, s));
-            this._scene.onPointerObservable.add((e, s) => this.onPointer(e, s), -1, true);
-
-            window.oncontextmenu = ev => {
-                if (!this.noPreventContextMenu) {
-                    ev.preventDefault();
-                }
-            };
-        }
-
-        private onBeforeRender(scene: Scene, state: EventState) {
-            this.renderManipulator();
-        }
-
-        private onPointer(e: PointerInfo, state: EventState) {
-            if (!this._manipulatedNode) {
-                return;
-            }
-
-            var rayPos = this.getRayPosition(e.event);
-            var shiftKeyState = e.event.shiftKey;
-
-            // Detect Modifier Key changes for shift while manipulating: commit and start a new manipulation
-            if (this.hasManFlags(ManFlags.DragMode) && shiftKeyState !== this._shiftKeyState) {
-                this.beginDrag(rayPos, <PointerEvent>e.event);
-            }
-
-            // Mouse move
-            if (e.type === PointerEventTypes.POINTERMOVE) {
-
-                // Right button release while left is down => cancel the manipulation. only processed when the context menu is not showed during manipulation
-                if (!this.noPreventContextMenu && e.event.button === 2 && e.event.buttons === 1) {
-                    this.setManipulatedNodeWorldMatrix(this._firstTransform);
-                    this.setManFlags(ManFlags.Exiting);
-                }
-
-                else if (this.hasManFlags(ManFlags.DragMode) && !this.hasManFlags(ManFlags.Exiting)) {
-                    state.skipNextObservers = true;
-
-                    if (shiftKeyState || this.hasManipulatedMode(RadixFeatures.Rotations)) {
-                        this.doRot(rayPos);
-                    } else {
-                        this.doPos(rayPos);
-                    }
-                } else {
-                    this._radix.highlighted = this._radix.intersect(rayPos);
-                }
-            }
-
-            // Left button down
-            else if (e.type === PointerEventTypes.POINTERDOWN && e.event.button === 0) {
-                this._manipulatedMode = this._radix.intersect(rayPos);
-
-                if (this._manipulatedMode !== RadixFeatures.None) {
-                    state.skipNextObservers = true;
-                    this.beginDrag(rayPos, <PointerEvent>e.event);
-
-                    if (this.hasManipulatedMode(RadixFeatures.Rotations)) {
-                        this.doRot(rayPos);
-                    } else {
-                        this.doPos(rayPos);
-                    }
-                }
-            }
-
-            else if (e.type === PointerEventTypes.POINTERUP) {
-                if (this.hasManFlags(ManFlags.DragMode)) {
-                    state.skipNextObservers = true;
-                }
-                this._radix.highlighted = this._radix.intersect(rayPos);
-
-                // Left up: end manipulation
-                if (e.event.button === 0) {
-                    this.endDragMode();
-                }
-            }
-        }
-
-        private beginDrag(rayPos: Vector2, event: PointerEvent) {
-            this._firstMousePos = rayPos;
-            this._prevMousePos = this._firstMousePos.clone();
-            this._shiftKeyState = event.shiftKey;
-
-            var mtx = this.getManipulatedNodeWorldMatrix();
-            this._pos = mtx.getTranslation();
-            this._right = mtx.getRow(0).toVector3();
-            this._up = mtx.getRow(1).toVector3();
-            this._view = mtx.getRow(2).toVector3();
-
-            this._oldPos = this._pos.clone();
-            this._firstTransform = mtx.clone();
-            this._flags |= ManFlags.FirstHit | ManFlags.DragMode;
-        }
-
-        private endDragMode() {
-            this.clearManFlags(ManFlags.DragMode | ManFlags.Exiting);
-        }
-
-        private doRot(rayPos: Vector2) {
-            if (this.hasManFlags(ManFlags.FirstHit)) {
-                this.clearManFlags(ManFlags.FirstHit);
-                return;
-            }
-
-            var dx = rayPos.x - this._prevMousePos.x;
-            var dy = rayPos.y - this._prevMousePos.y;
-
-            var cr = this._scene.getEngine().getRenderingCanvasClientRect();
-
-            var ax = (dx / cr.width) * Math.PI * 2 * this._rotationFactor;
-            var ay = (dy / cr.height) * Math.PI * 2 * this._rotationFactor;
-
-            if (this.rotationStep) {
-                var rem = ax % this.rotationStep;
-                ax -= rem;
-
-                rem = ay % this.rotationStep;
-                ay -= rem;
-            }
-
-            var mtx = Matrix.Identity();
-
-            if (this.hasManipulatedMode(RadixFeatures.ArrowX | RadixFeatures.RotationX)) {
-                mtx = Matrix.RotationX(ay);
-            }
-
-            else if (this.hasManipulatedMode(RadixFeatures.ArrowY | RadixFeatures.RotationY)) {
-                mtx = Matrix.RotationY(ay);
-            }
-
-            else if (this.hasManipulatedMode(RadixFeatures.ArrowZ | RadixFeatures.RotationZ)) {
-                mtx = Matrix.RotationZ(ay);
-            }
-
-            else {
-                if (this.hasManipulatedMode(/*RadixFeatures.CenterSquare |*/ RadixFeatures.PlaneSelectionXY | RadixFeatures.PlaneSelectionXZ)) {
-                    mtx = mtx.multiply(Matrix.RotationX(ay));
-                }
-
-                if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionXY | RadixFeatures.PlaneSelectionYZ)) {
-                    mtx = mtx.multiply(Matrix.RotationY(ax));
-                }
-
-                if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionXZ)) {
-                    mtx = mtx.multiply(Matrix.RotationZ(ay));
-                }
-
-                if (this.hasManipulatedMode(/*RadixFeatures.CenterSquare |*/ RadixFeatures.PlaneSelectionXZ)) {
-                    mtx = mtx.multiply(Matrix.RotationZ(ax));
-                }
-
-            }
-
-            var tmtx = mtx.multiply(this._firstTransform);
-            this.setManipulatedNodeWorldMatrix(tmtx);
-        }
-
-        private doPos(rayPos: Vector2) {
-            var v = Vector3.Zero();
-            var ray = this._scene.createPickingRay(rayPos.x, rayPos.y, Matrix.Identity(), this._scene.activeCamera);
-
-            if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionXY | RadixFeatures.PlaneSelectionXZ | RadixFeatures.PlaneSelectionYZ)) {
-                var pl0: Plane;
-                var hit: Vector3;
-
-                if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionXY)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                }
-                else if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionXZ)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._view));
-                }
-                else if (this.hasManipulatedMode(RadixFeatures.PlaneSelectionYZ)) {
-                    pl0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                }
-                else {
-                    // TODO Exception
-                }
-
-                var clip = 0.06;
-
-                //Check if the plane is too parallel to the ray
-                if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) < clip) {
-                    return;
-                }
-
-                //Make the intersection
-                let distance = ray.intersectsPlane(pl0);
-                hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-
-                //Check if it's the first call
-                if (this.hasManFlags(ManFlags.FirstHit)) {
-                    this._flags &= ~ManFlags.FirstHit;
-                    this._prevHit = hit;
-                    return;
-                }
-
-                //Compute the vector
-                v = hit.subtract(this._prevHit);
-            }
-
-            else if ((this._manipulatedMode & (RadixFeatures.ArrowX | RadixFeatures.ArrowY | RadixFeatures.ArrowZ)) !== 0) {
-                var pl0: Plane, pl1: Plane;
-                var hit: Vector3;
-                var s: number;
-
-                if (this.hasManFlags(ManFlags.FirstHit)) {
-                    let res = this.setupIntersectionPlanes(this._manipulatedMode);
-                    pl0 = res.p0;
-                    pl1 = res.p1;
-
-                    if (Math.abs(Vector3.Dot(pl0.normal, ray.direction)) > Math.abs(Vector3.Dot(pl1.normal, ray.direction))) {
-                        let distance = ray.intersectsPlane(pl0);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        let number = ~ManFlags.Plane2;
-                        this._flags &= number;
-                    }
-                    else {
-                        let distance = ray.intersectsPlane(pl1);
-                        hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                        this._flags |= ManFlags.Plane2;
-                    }
-
-                    this._flags &= ~ManFlags.FirstHit;
-                    this._prevHit = hit;
-                    return;
-                }
-                else {
-                    var axis: Vector3;
-                    let res = this.setupIntersectionPlane(this._manipulatedMode, this.hasManFlags(ManFlags.Plane2));
-                    pl0 = res.plane;
-                    axis = res.axis;
-
-                    let distance = ray.intersectsPlane(pl0);
-                    hit = ManipulatorInteractionHelper.ComputeRayHit(ray, distance);
-                    v = hit.subtract(this._prevHit);
-                    s = Vector3.Dot(axis, v);
-                    v = axis.multiplyByFloats(s, s, s);
-                }
-            }
-
-            if (this.translationStep) {
-                v.x -= v.x % this.translationStep;
-                v.y -= v.y % this.translationStep;
-                v.z -= v.z % this.translationStep;
-            }
-
-            var mtx = this._firstTransform.clone();
-            mtx.setTranslation(mtx.getTranslation().add(v));
-            this._pos = mtx.getTranslation();
-
-            this.setManipulatedNodeWorldMatrix(mtx);
-        }
-
-        private hasManipulatedMode(value: RadixFeatures): boolean {
-            return (this._manipulatedMode & value) !== 0;
-        }
-
-        private hasManFlags(value: ManFlags): boolean {
-            return (this._flags & value) !== 0;
-        }
-
-        private clearManFlags(values: ManFlags): ManFlags {
-            this._flags &= ~values;
-            return this._flags;
-        }
-
-        private setManFlags(values: ManFlags): ManFlags {
-            this._flags |= values;
-            return this._flags;
-        }
-
-        private static ComputeRayHit(ray: Ray, distance: number): Vector3 {
-            return ray.origin.add(ray.direction.multiplyByFloats(distance, distance, distance));
-        }
-
-        private setManipulatedNodeWorldMatrix(mtx: Matrix) {
-            if (!this._manipulatedNode) {
-                return null;
-            }
-
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                var mesh = <AbstractMesh>this._manipulatedNode;
-
-                if (mesh.parent) {
-                    mtx = mtx.multiply(mesh.parent.getWorldMatrix().clone().invert());
-                }
-
-                var pos = Vector3.Zero();
-                var scale = Vector3.Zero();
-                var rot = new Quaternion();
-                mtx.decompose(scale, rot, pos);
-                mesh.position = pos;
-                mesh.rotationQuaternion = rot;
-                mesh.scaling = scale;
-            }          
-        }        
-
-        private getManipulatedNodeWorldMatrix(): Matrix {
-            if (!this._manipulatedNode) {
-                return null;
-            }
-
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                return this._manipulatedNode.getWorldMatrix();
-            }
-        }
-
-        private setupIntersectionPlane(mode: RadixFeatures, plane2: boolean): any {
-            var res = this.setupIntersectionPlanes(mode);
-
-            var pl = plane2 ? res.p1 : res.p0;
-            var axis: Vector3;
-
-            switch (mode) {
-                case RadixFeatures.ArrowX:
-                    axis = this._right;
-                    break;
-                case RadixFeatures.ArrowY:
-                    axis = this._up;
-                    break;
-                case RadixFeatures.ArrowZ:
-                    axis = this._view;
-                    break;
-                default:
-                    axis = Vector3.Zero();
-                    break;
-            }
-
-            return { plane: pl, axis: axis };
-        }
-
-        private setupIntersectionPlanes(mode: RadixFeatures): any {
-            var p0: Plane, p1: Plane;
-
-            switch (mode) {
-                case RadixFeatures.ArrowX:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._right), this._pos.add(this._up));
-                    break;
-
-                case RadixFeatures.ArrowY:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._up), this._pos.add(this._view));
-                    break;
-
-                case RadixFeatures.ArrowZ:
-                    p0 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._right));
-                    p1 = Plane.FromPoints(this._pos, this._pos.add(this._view), this._pos.add(this._up));
-                    break;
-            }
-
-            return { p0: p0, p1: p1 };
-        }
-
-        private getRayPosition(event: MouseEvent): Vector2 {
-            var canvasRect = this._scene.getEngine().getRenderingCanvasClientRect();
-
-            var x = event.clientX - canvasRect.left;
-            var y = event.clientY - canvasRect.top;
-
-            return new Vector2(x, y);
-        }
-
-        private renderManipulator() {
-            if (!this._manipulatedNode) {
-                return;
-            }
-
-            if (this._manipulatedNode instanceof AbstractMesh) {
-                var mesh = <AbstractMesh>this._manipulatedNode;
-                var worldMtx = mesh.getWorldMatrix();
-                var l = Vector3.Distance(this._scene.activeCamera.position, worldMtx.getTranslation());
-                let vpWidth = this._scene.getEngine().getRenderWidth();
-                var s = this.fromScreenToWorld(vpWidth / 100, l) * 20;
-                var scale = Vector3.Zero();
-                var position = Vector3.Zero();
-                var rotation = Quaternion.Identity();
-
-                var res = Matrix.Scaling(s, s, s).multiply(worldMtx);
-
-                res.decompose(scale, rotation, position);
-
-                this._radix.setWorld(position, rotation, scale);
-            }
-        }
-
-        private fromScreenToWorld(l: number, z: number): number {
-            let camera = this._scene.activeCamera;
-            let r0 = this._scene.createPickingRay(0, 0, Matrix.Identity(), camera, true);
-            let r1 = this._scene.createPickingRay(l, 0, Matrix.Identity(), camera, true);
-
-            var p0 = ManipulatorInteractionHelper.evalPosition(r0, z);
-            var p1 = ManipulatorInteractionHelper.evalPosition(r1, z);
-
-            return p1.x - p0.x;
-        }
-
-        private static evalPosition(ray: Ray, u: number): Vector3 {
-            return ray.origin.add(ray.direction.multiplyByFloats(u, u, u));
-        }
-
-        private _flags: ManFlags;
-        private _firstMousePos: Vector2;
-        private _prevMousePos: Vector2;
-        private _shiftKeyState: boolean;
-        private _pos: Vector3;
-        private _right: Vector3;
-        private _up: Vector3;
-        private _view: Vector3;
-        private _oldPos: Vector3;
-        private _prevHit: Vector3;
-        private _firstTransform: Matrix;
-        private _scene: Scene;
-        private _manipulatedMode: RadixFeatures;
-        private _rotationFactor: number;
-        private _manipulatedNode: Node;
-        private _radix: Radix;
-    }
-
-    const enum ManFlags {
-        DragMode = 0x01,
-        FirstHit = 0x02,
-        Plane2 = 0x04,
-        Exiting = 0x08
-    }
-}

+ 0 - 459
typescript/Radix.js

@@ -1,459 +0,0 @@
-var Sandbox;
-(function (Sandbox) {
-    var Color3 = BABYLON.Color3;
-    var StandardMaterial = BABYLON.StandardMaterial;
-    var Matrix = BABYLON.Matrix;
-    var Mesh = BABYLON.Mesh;
-    var Vector3 = BABYLON.Vector3;
-    var Quaternion = BABYLON.Quaternion;
-    var VertexData = BABYLON.VertexData;
-    var LinesMesh = BABYLON.LinesMesh;
-    /**
-     * This class create the visual geometry to display a manipulation radix in a viewport.
-     * It also implements the logic to handler intersection, hover on feature.
-     */
-    var Radix = (function () {
-        /**
-         * Create a new Radix instance. The length/radius members are optionals and the default value should suit most cases
-         * @param scene the owner Scene
-         * @param features the feature the radix must display
-         * @param arrowLength the length of a row of an axis, include the rotation cylinder (if any), but always exclude the arrow cone
-         * @param coneLength the length of the arrow cone. this is also the length taken for the rotation cylinder (if any)
-         * @param coneRadius the radius of the arrow cone
-         * @param planeSelectionLength the length of the selection plane
-         */
-        function Radix(scene, features, arrowLength, coneLength, coneRadius, planeSelectionLength) {
-            if (features === void 0) { features = 7 /* ArrowsXYZ */ | 112 /* AllPlanesSelection */ | 1792 /* Rotations */; }
-            this._scene = scene;
-            this._arrowLength = arrowLength ? arrowLength : 1;
-            this._coneLength = coneLength ? coneLength : 0.2;
-            this._coneRadius = coneRadius ? coneRadius : 0.1;
-            this._planeSelectionLength = planeSelectionLength ? planeSelectionLength : (this._arrowLength / 5.0);
-            this._wireSelectionThreshold = 0.05;
-            this._light1 = new BABYLON.PointLight("ManipulatorLight", new BABYLON.Vector3(50, 50, 70), this._scene);
-            this._light1.id = "***SceneManipulatorLight***";
-            this._light2 = new BABYLON.PointLight("ManipulatorLight", new BABYLON.Vector3(-50, -50, -70), this._scene);
-            this._light2.id = "***SceneManipulatorLight***";
-            this._xArrowColor = new Color3(Radix.pc, Radix.sc / 2, Radix.sc);
-            this._yArrowColor = new Color3(Radix.sc, Radix.pc, Radix.sc / 2);
-            this._zArrowColor = new Color3(Radix.sc / 2, Radix.sc, Radix.pc);
-            this._xyPlaneSelectionColor = new Color3(Radix.pc / 1.1, Radix.pc / 1.3, Radix.sc);
-            this._xzPlaneSelectionColor = new Color3(Radix.pc / 1.1, Radix.sc, Radix.pc / 1.3);
-            this._yzPlaneSelectionColor = new Color3(Radix.sc, Radix.pc / 1.3, Radix.pc / 1.1);
-            var materials = [];
-            materials.push({ name: "arrowX", color: this.xArrowColor });
-            materials.push({ name: "arrowY", color: this.yArrowColor });
-            materials.push({ name: "arrowZ", color: this.zArrowColor });
-            materials.push({ name: "planeXY", color: this.xyPlaneSelectionColor });
-            materials.push({ name: "planeXZ", color: this.xzPlaneSelectionColor });
-            materials.push({ name: "planeYZ", color: this.yzPlaneSelectionColor });
-            materials.push({ name: "rotationX", color: this.xArrowColor.clone() });
-            materials.push({ name: "rotationY", color: this.yArrowColor.clone() });
-            materials.push({ name: "rotationZ", color: this.zArrowColor.clone() });
-            this._materials = [];
-            for (var _i = 0, materials_1 = materials; _i < materials_1.length; _i++) {
-                var matData = materials_1[_i];
-                var mtl = new StandardMaterial(matData.name + "RadixMaterial", this._scene);
-                mtl.diffuseColor = matData.color;
-                this._materials[matData.name] = mtl;
-            }
-            this._features = features;
-            this._rootMesh = new Mesh("radixRoot", this._scene);
-            this._rootMesh.renderingGroupId = 1;
-            this.constructGraphicalObjects();
-        }
-        Object.defineProperty(Radix.prototype, "wireSelectionThreshold", {
-            /**
-             * Set/get the Wire Selection Threshold, set a bigger value to improve tolerance while picking a wire mesh
-             */
-            get: function () {
-                return this._wireSelectionThreshold;
-            },
-            set: function (value) {
-                this._wireSelectionThreshold = value;
-                var meshes = this._rootMesh.getChildMeshes(true, function (m) { return m instanceof LinesMesh; });
-                for (var _i = 0, meshes_1 = meshes; _i < meshes_1.length; _i++) {
-                    var mesh = meshes_1[_i];
-                    var lm = mesh;
-                    if (lm) {
-                        lm.intersectionThreshold = value;
-                    }
-                }
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "xArrowColor", {
-            /**
-             * Get/set the colors of the X Arrow
-             */
-            get: function () {
-                return this._xArrowColor;
-            },
-            set: function (value) {
-                this._xArrowColor = value;
-                this.updateMaterial("arrowX", value);
-                this.updateMaterial("rotationX", value);
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "yArrowColor", {
-            /**
-             * Get/set the colors of the Y Arrow
-             */
-            get: function () {
-                return this._yArrowColor;
-            },
-            set: function (value) {
-                this._yArrowColor = value;
-                this.updateMaterial("arrowY", value);
-                this.updateMaterial("rotationY", value);
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "zArrowColor", {
-            /**
-             * Get/set the colors of the Z Arrow
-             */
-            get: function () {
-                return this._zArrowColor;
-            },
-            set: function (value) {
-                this._zArrowColor = value;
-                this.updateMaterial("arrowZ", value);
-                this.updateMaterial("rotationZ", value);
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "xyPlaneSelectionColor", {
-            /**
-             * Get/set the colors of the XY Plane selection anchor
-             */
-            get: function () {
-                return this._xyPlaneSelectionColor;
-            },
-            set: function (value) {
-                this._xyPlaneSelectionColor = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "xzPlaneSelectionColor", {
-            /**
-             * Get/set the colors of the XZ Plane selection anchor
-             */
-            get: function () {
-                return this._xzPlaneSelectionColor;
-            },
-            set: function (value) {
-                this._xzPlaneSelectionColor = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "yzPlaneSelectionColor", {
-            /**
-             * Get/set the colors of the YZ Plane selection anchor
-             */
-            get: function () {
-                return this._yzPlaneSelectionColor;
-            },
-            set: function (value) {
-                this._yzPlaneSelectionColor = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "highlighted", {
-            /**
-             * Get/set the feature of the Radix that are/must be highlighted
-             * @returns {}
-             */
-            get: function () {
-                return this._highlighted;
-            },
-            set: function (value) {
-                this.updateMaterialFromHighlighted(1 /* ArrowX */, value, "arrowX");
-                this.updateMaterialFromHighlighted(2 /* ArrowY */, value, "arrowY");
-                this.updateMaterialFromHighlighted(4 /* ArrowZ */, value, "arrowZ");
-                this.updateMaterialFromHighlighted(16 /* PlaneSelectionXY */, value, "planeXY");
-                this.updateMaterialFromHighlighted(32 /* PlaneSelectionXZ */, value, "planeXZ");
-                this.updateMaterialFromHighlighted(64 /* PlaneSelectionYZ */, value, "planeYZ");
-                this.updateMaterialFromHighlighted(256 /* RotationX */, value, "rotationX");
-                this.updateMaterialFromHighlighted(512 /* RotationY */, value, "rotationY");
-                this.updateMaterialFromHighlighted(1024 /* RotationZ */, value, "rotationZ");
-                this._highlighted = value;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(Radix.prototype, "features", {
-            /**
-             * Get the Radix Features that were selected upon creation
-             */
-            get: function () {
-                return this._features;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        /**
-         * make an intersection test between a point position in the viwport and the Radix, return the feature that is intersected, if any.
-         * only the closer Radix Feature is picked.
-         * @param pos the viewport position to create the picking ray from.
-         */
-        Radix.prototype.intersect = function (pos) {
-            var hit = 0 /* None */;
-            var closest = Number.MAX_VALUE;
-            // Arrows
-            if (this.hasFeature(1 /* ArrowX */)) {
-                var dist = this.intersectMeshes(pos, "arrowX", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 1 /* ArrowX */;
-                }
-            }
-            if (this.hasFeature(2 /* ArrowY */)) {
-                var dist = this.intersectMeshes(pos, "arrowY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 2 /* ArrowY */;
-                }
-            }
-            if (this.hasFeature(4 /* ArrowZ */)) {
-                var dist = this.intersectMeshes(pos, "arrowZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 4 /* ArrowZ */;
-                }
-            }
-            // Planes
-            if (this.hasFeature(16 /* PlaneSelectionXY */)) {
-                var dist = this.intersectMeshes(pos, "planeXY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 16 /* PlaneSelectionXY */;
-                }
-            }
-            if (this.hasFeature(32 /* PlaneSelectionXZ */)) {
-                var dist = this.intersectMeshes(pos, "planeXZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 32 /* PlaneSelectionXZ */;
-                }
-            }
-            if (this.hasFeature(64 /* PlaneSelectionYZ */)) {
-                var dist = this.intersectMeshes(pos, "planeYZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 64 /* PlaneSelectionYZ */;
-                }
-            }
-            // Rotation
-            if (this.hasFeature(256 /* RotationX */)) {
-                var dist = this.intersectMeshes(pos, "rotationX", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 256 /* RotationX */;
-                }
-            }
-            if (this.hasFeature(512 /* RotationY */)) {
-                var dist = this.intersectMeshes(pos, "rotationY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 512 /* RotationY */;
-                }
-            }
-            if (this.hasFeature(1024 /* RotationZ */)) {
-                var dist = this.intersectMeshes(pos, "rotationZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = 1024 /* RotationZ */;
-                }
-            }
-            return hit;
-        };
-        /**
-         * Set the world coordinate of where the Axis should be displayed
-         * @param position the position
-         * @param rotation the rotation quaternion
-         * @param scale the scale (should be uniform)
-         */
-        Radix.prototype.setWorld = function (position, rotation, scale) {
-            this._rootMesh.position = position;
-            this._rootMesh.rotationQuaternion = rotation;
-            this._rootMesh.scaling = scale;
-        };
-        /**
-         * Display the Radix on screen
-         */
-        Radix.prototype.show = function () {
-            this.setVisibleState(this._rootMesh, true);
-        };
-        /**
-         * Hide the Radix from the screen
-         */
-        Radix.prototype.hide = function () {
-            this.setVisibleState(this._rootMesh, false);
-        };
-        Radix.prototype.setVisibleState = function (mesh, state) {
-            var _this = this;
-            mesh.isVisible = state;
-            mesh.getChildMeshes(true).forEach(function (m) { return _this.setVisibleState(m, state); });
-        };
-        Radix.prototype.intersectMeshes = function (pos, startName, currentClosest) {
-            var meshes = this._rootMesh.getChildMeshes(true, function (m) { return m.name.indexOf(startName) === 0; });
-            for (var _i = 0, meshes_2 = meshes; _i < meshes_2.length; _i++) {
-                var mesh = meshes_2[_i];
-                var ray = this._scene.createPickingRay(pos.x, pos.y, mesh.getWorldMatrix(), this._scene.activeCamera);
-                var pi = mesh.intersects(ray, false);
-                if (pi.hit && pi.distance < currentClosest) {
-                    currentClosest = pi.distance;
-                }
-            }
-            return currentClosest;
-        };
-        Radix.prototype.constructGraphicalObjects = function () {
-            var hp = Math.PI / 2;
-            if (this.hasFeature(1 /* ArrowX */)) {
-                this.constructArrow(1 /* ArrowX */, "arrowX", Matrix.RotationZ(-hp));
-            }
-            if (this.hasFeature(2 /* ArrowY */)) {
-                this.constructArrow(2 /* ArrowY */, "arrowY", Matrix.Identity());
-            }
-            if (this.hasFeature(4 /* ArrowZ */)) {
-                this.constructArrow(4 /* ArrowZ */, "arrowZ", Matrix.RotationX(hp));
-            }
-            if (this.hasFeature(16 /* PlaneSelectionXY */)) {
-                this.constructPlaneSelection(16 /* PlaneSelectionXY */, "planeXY", Matrix.Identity());
-            }
-            if (this.hasFeature(32 /* PlaneSelectionXZ */)) {
-                this.constructPlaneSelection(32 /* PlaneSelectionXZ */, "planeXZ", Matrix.RotationX(hp));
-            }
-            if (this.hasFeature(64 /* PlaneSelectionYZ */)) {
-                this.constructPlaneSelection(64 /* PlaneSelectionYZ */, "planeYZ", Matrix.RotationY(-hp));
-            }
-            if (this.hasFeature(256 /* RotationX */)) {
-                this.constructRotation(256 /* RotationX */, "rotationX", Matrix.RotationZ(-hp));
-            }
-            if (this.hasFeature(512 /* RotationY */)) {
-                this.constructRotation(512 /* RotationY */, "rotationY", Matrix.Identity());
-            }
-            if (this.hasFeature(1024 /* RotationZ */)) {
-                this.constructRotation(1024 /* RotationZ */, "rotationZ", Matrix.RotationX(hp));
-            }
-        };
-        Radix.prototype.constructArrow = function (feature, name, transform) {
-            var mtl = this.getMaterial(name);
-            var hasRot;
-            switch (feature) {
-                case 1 /* ArrowX */:
-                    hasRot = this.hasFeature(256 /* RotationX */);
-                    break;
-                case 2 /* ArrowY */:
-                    hasRot = this.hasFeature(512 /* RotationY */);
-                    break;
-                case 4 /* ArrowZ */:
-                    hasRot = this.hasFeature(1024 /* RotationZ */);
-                    break;
-            }
-            var rotation = Quaternion.FromRotationMatrix(transform);
-            var points = new Array();
-            points.push(0, hasRot ? this._coneLength : 0, 0);
-            points.push(0, this._arrowLength - this._coneLength, 0);
-            var wireMesh = new LinesMesh(name + "Wire", this._scene);
-            wireMesh.rotationQuaternion = rotation;
-            wireMesh.parent = this._rootMesh;
-            wireMesh.color = mtl.diffuseColor;
-            wireMesh.renderingGroupId = 1;
-            wireMesh.intersectionThreshold = this.wireSelectionThreshold;
-            wireMesh.isPickable = false;
-            var vd = new VertexData();
-            vd.positions = points;
-            vd.indices = [0, 1];
-            vd.applyToMesh(wireMesh);
-            var arrow = Mesh.CreateCylinder(name + "Cone", this._coneLength, 0, this._coneRadius, 18, 1, this._scene, false);
-            arrow.position = Vector3.TransformCoordinates(new Vector3(0, this._arrowLength - (this._coneLength / 2), 0), transform);
-            arrow.rotationQuaternion = rotation;
-            arrow.material = mtl;
-            arrow.parent = this._rootMesh;
-            arrow.renderingGroupId = 1;
-            arrow.isPickable = false;
-            this.addSymbolicMeshToLit(arrow);
-        };
-        Radix.prototype.constructPlaneSelection = function (feature, name, transform) {
-            var mtl = this.getMaterial(name);
-            var points = new Array();
-            points.push(new Vector3(this._arrowLength - this._planeSelectionLength, this._arrowLength, 0));
-            points.push(new Vector3(this._arrowLength, this._arrowLength, 0));
-            points.push(new Vector3(this._arrowLength, this._arrowLength - this._planeSelectionLength, 0));
-            var wireMesh = Mesh.CreateLines(name + "Plane", points, this._scene);
-            wireMesh.parent = this._rootMesh;
-            wireMesh.color = mtl.diffuseColor;
-            wireMesh.rotationQuaternion = Quaternion.FromRotationMatrix(transform);
-            wireMesh.renderingGroupId = 1;
-            wireMesh.intersectionThreshold = this.wireSelectionThreshold;
-            wireMesh.isPickable = false;
-        };
-        Radix.prototype.constructRotation = function (feature, name, transform) {
-            var mtl = this.getMaterial(name);
-            var rotCyl = Mesh.CreateCylinder(name + "Cylinder", this._coneLength, this._coneRadius, this._coneRadius, 18, 1, this._scene, false);
-            rotCyl.material = mtl;
-            rotCyl.position = Vector3.TransformCoordinates(new Vector3(0, this._coneLength / 2, 0), transform);
-            rotCyl.rotationQuaternion = Quaternion.FromRotationMatrix(transform);
-            rotCyl.parent = this._rootMesh;
-            rotCyl.renderingGroupId = 1;
-            rotCyl.isPickable = false;
-            this.addSymbolicMeshToLit(rotCyl);
-        };
-        Radix.prototype.addSymbolicMeshToLit = function (mesh) {
-            var _this = this;
-            this._light1.includedOnlyMeshes.push(mesh);
-            this._light2.includedOnlyMeshes.push(mesh);
-            this._scene.lights.map(function (l) { if ((l !== _this._light1) && (l !== _this._light2))
-                l.excludedMeshes.push(mesh); });
-        };
-        Radix.prototype.hasFeature = function (value) {
-            return (this._features & value) !== 0;
-        };
-        Radix.prototype.hasHighlightedFeature = function (value) {
-            return (this._highlighted & value) !== 0;
-        };
-        Radix.prototype.updateMaterial = function (name, color) {
-            var mtl = this.getMaterial(name);
-            if (mtl) {
-                mtl.diffuseColor = color;
-            }
-        };
-        Radix.prototype.updateMaterialFromHighlighted = function (feature, highlighted, name) {
-            if (!this.hasFeature(feature)) {
-                return;
-            }
-            if ((this._highlighted & feature) !== (highlighted & feature)) {
-                var mtl = this.getMaterial(name);
-                if ((highlighted & feature) !== 0) {
-                    mtl.diffuseColor.r *= 1.8;
-                    mtl.diffuseColor.g *= 1.8;
-                    mtl.diffuseColor.b *= 1.8;
-                }
-                else {
-                    mtl.diffuseColor.r /= 1.8;
-                    mtl.diffuseColor.g /= 1.8;
-                    mtl.diffuseColor.b /= 1.8;
-                }
-            }
-        };
-        Radix.prototype.getMaterial = function (name) {
-            var mtl = this._materials[name];
-            return mtl;
-        };
-        Radix.pc = 0.6;
-        Radix.sc = 0.2;
-        return Radix;
-    }());
-    Sandbox.Radix = Radix;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=Radix.js.map

+ 0 - 575
typescript/Radix.ts

@@ -1,575 +0,0 @@
-module Sandbox {
-    import Color3 = BABYLON.Color3;
-    import StandardMaterial = BABYLON.StandardMaterial;
-    import Scene = BABYLON.Scene;
-    import Matrix = BABYLON.Matrix;
-    import Mesh = BABYLON.Mesh;
-    import Vector3 = BABYLON.Vector3;
-    import Quaternion = BABYLON.Quaternion;
-    import VertexData = BABYLON.VertexData;
-    import LinesMesh = BABYLON.LinesMesh;
-    import PointLight = BABYLON.PointLight;
-    import AbstractMesh = BABYLON.AbstractMesh;
-    import Ray = BABYLON.Ray;
-    import Vector2 = BABYLON.Vector2;
-
-    export const enum RadixFeatures {
-        None = 0,
-
-        /**
-         * Display the Arrow that follows the X Axis
-         */
-        ArrowX = 0x0001,
-
-        /**
-         * Display the Arrow that follows the Y Axis
-         */
-        ArrowY = 0x0002,
-
-        /**
-         * Display the Arrow that follows the Z Axis
-         */
-        ArrowZ = 0x0004,
-
-        /**
-         * Display the Arrow that follows the XYZ Axis
-         */
-        ArrowsXYZ = 0x0007,
-
-        /**
-         * Display the anchor that allow XY plane manipulation
-         */
-        PlaneSelectionXY = 0x0010,
-
-        /**
-         * Display the anchor that allow XZ plane manipulation
-         */
-        PlaneSelectionXZ = 0x0020,
-
-        /**
-         * Display the anchor that allow YZ plane manipulation
-         */
-        PlaneSelectionYZ = 0x0040,
-
-        /**
-         * Display all the anchors that allow plane manipulation
-         */
-        AllPlanesSelection = 0x0070,
-
-        /**
-         * Display the rotation cylinder that allows rotation manipulation along the X Axis
-         */
-        RotationX = 0x0100,
-
-        /**
-         * Display the rotation cylinder that allows rotation manipulation along the Y Axis
-         */
-        RotationY = 0x0200,
-
-        /**
-         * Display the rotation cylinder that allows rotation manipulation along the A Axis
-         */
-        RotationZ = 0x0400,
-
-        /**
-         * Display all rotation cylinders
-         */
-        Rotations = 0x0700,
-
-        //CenterSquare = 0x1000 NOT SUPPORTED RIGHT NOW
-    }
-
-    /**
-     * This class create the visual geometry to display a manipulation radix in a viewport.
-     * It also implements the logic to handler intersection, hover on feature.
-     */
-    export class Radix {
-        private static pc = 0.6;
-        private static sc = 0.2;
-
-        /**
-         * Set/get the Wire Selection Threshold, set a bigger value to improve tolerance while picking a wire mesh
-         */
-        get wireSelectionThreshold(): number {
-            return this._wireSelectionThreshold;
-        }
-
-        set wireSelectionThreshold(value: number) {
-            this._wireSelectionThreshold = value;
-
-            let meshes = this._rootMesh.getChildMeshes(true, m => m instanceof LinesMesh);
-            for (var mesh of meshes) {
-                var lm = <LinesMesh>mesh;
-                if (lm) {
-                    lm.intersectionThreshold = value;
-                }
-            }
-        }
-
-        /**
-         * Get/set the colors of the X Arrow
-         */
-        get xArrowColor(): Color3 {
-            return this._xArrowColor;
-        }
-
-        set xArrowColor(value: Color3) {
-            this._xArrowColor = value;
-            this.updateMaterial("arrowX", value);
-            this.updateMaterial("rotationX", value);
-        }
-
-        /**
-         * Get/set the colors of the Y Arrow
-         */
-        get yArrowColor(): Color3 {
-            return this._yArrowColor;
-        }
-
-        set yArrowColor(value: Color3) {
-            this._yArrowColor = value;
-            this.updateMaterial("arrowY", value);
-            this.updateMaterial("rotationY", value);
-        }
-
-        /**
-         * Get/set the colors of the Z Arrow
-         */
-        get zArrowColor(): Color3 {
-            return this._zArrowColor;
-        }
-
-        set zArrowColor(value: Color3) {
-            this._zArrowColor = value;
-            this.updateMaterial("arrowZ", value);
-            this.updateMaterial("rotationZ", value);
-        }
-
-        /**
-         * Get/set the colors of the XY Plane selection anchor
-         */
-        get xyPlaneSelectionColor(): Color3 {
-            return this._xyPlaneSelectionColor;
-        }
-
-        set xyPlaneSelectionColor(value: Color3) {
-            this._xyPlaneSelectionColor = value;
-        }
-
-        /**
-         * Get/set the colors of the XZ Plane selection anchor
-         */
-        get xzPlaneSelectionColor(): Color3 {
-            return this._xzPlaneSelectionColor;
-        }
-
-        set xzPlaneSelectionColor(value: Color3) {
-            this._xzPlaneSelectionColor = value;
-        }
-
-        /**
-         * Get/set the colors of the YZ Plane selection anchor
-         */
-        get yzPlaneSelectionColor(): Color3 {
-            return this._yzPlaneSelectionColor;
-        }
-
-        set yzPlaneSelectionColor(value: Color3) {
-            this._yzPlaneSelectionColor = value;
-        }
-
-        /**
-         * Get/set the feature of the Radix that are/must be highlighted
-         * @returns {} 
-         */
-        get highlighted(): RadixFeatures {
-            return this._highlighted;
-        }
-
-        set highlighted(value: RadixFeatures) {
-            this.updateMaterialFromHighlighted(RadixFeatures.ArrowX, value, "arrowX");
-            this.updateMaterialFromHighlighted(RadixFeatures.ArrowY, value, "arrowY");
-            this.updateMaterialFromHighlighted(RadixFeatures.ArrowZ, value, "arrowZ");
-            this.updateMaterialFromHighlighted(RadixFeatures.PlaneSelectionXY, value, "planeXY");
-            this.updateMaterialFromHighlighted(RadixFeatures.PlaneSelectionXZ, value, "planeXZ");
-            this.updateMaterialFromHighlighted(RadixFeatures.PlaneSelectionYZ, value, "planeYZ");
-            this.updateMaterialFromHighlighted(RadixFeatures.RotationX, value, "rotationX");
-            this.updateMaterialFromHighlighted(RadixFeatures.RotationY, value, "rotationY");
-            this.updateMaterialFromHighlighted(RadixFeatures.RotationZ, value, "rotationZ");
-
-            this._highlighted = value;
-        }
-
-        /**
-         * Get the Radix Features that were selected upon creation
-         */
-        get features(): RadixFeatures {
-            return this._features;
-        }
-
-        /**
-         * Create a new Radix instance. The length/radius members are optionals and the default value should suit most cases
-         * @param scene the owner Scene
-         * @param features the feature the radix must display
-         * @param arrowLength the length of a row of an axis, include the rotation cylinder (if any), but always exclude the arrow cone
-         * @param coneLength the length of the arrow cone. this is also the length taken for the rotation cylinder (if any)
-         * @param coneRadius the radius of the arrow cone
-         * @param planeSelectionLength the length of the selection plane
-         */
-        constructor(scene: Scene, features: RadixFeatures = RadixFeatures.ArrowsXYZ | RadixFeatures.AllPlanesSelection | RadixFeatures.Rotations, arrowLength?: number, coneLength?: number, coneRadius?: number, planeSelectionLength?: number) {
-            this._scene = scene;
-            this._arrowLength = arrowLength ? arrowLength : 1;
-            this._coneLength = coneLength ? coneLength : 0.2;
-            this._coneRadius = coneRadius ? coneRadius : 0.1;
-            this._planeSelectionLength = planeSelectionLength ? planeSelectionLength : (this._arrowLength / 5.0);
-
-            this._wireSelectionThreshold = 0.05;
-
-            this._light1 = new BABYLON.PointLight("ManipulatorLight", new BABYLON.Vector3(50, 50, 70), this._scene);
-            this._light1.id = "***SceneManipulatorLight***";
-            this._light2 = new BABYLON.PointLight("ManipulatorLight", new BABYLON.Vector3(-50, -50, -70), this._scene);
-            this._light2.id = "***SceneManipulatorLight***";
-
-            this._xArrowColor = new Color3(Radix.pc, Radix.sc / 2, Radix.sc);
-            this._yArrowColor = new Color3(Radix.sc, Radix.pc, Radix.sc / 2);
-            this._zArrowColor = new Color3(Radix.sc / 2, Radix.sc, Radix.pc);
-
-            this._xyPlaneSelectionColor = new Color3(Radix.pc / 1.1, Radix.pc / 1.3, Radix.sc);
-            this._xzPlaneSelectionColor = new Color3(Radix.pc / 1.1, Radix.sc, Radix.pc / 1.3);
-            this._yzPlaneSelectionColor = new Color3(Radix.sc, Radix.pc / 1.3, Radix.pc / 1.1);
-
-            var materials = [];
-            materials.push({ name: "arrowX", color: this.xArrowColor });
-            materials.push({ name: "arrowY", color: this.yArrowColor });
-            materials.push({ name: "arrowZ", color: this.zArrowColor });
-            materials.push({ name: "planeXY", color: this.xyPlaneSelectionColor });
-            materials.push({ name: "planeXZ", color: this.xzPlaneSelectionColor });
-            materials.push({ name: "planeYZ", color: this.yzPlaneSelectionColor });
-            materials.push({ name: "rotationX", color: this.xArrowColor.clone() });
-            materials.push({ name: "rotationY", color: this.yArrowColor.clone() });
-            materials.push({ name: "rotationZ", color: this.zArrowColor.clone() });
-
-            this._materials = [];
-            for (var matData of materials) {
-                var mtl = new StandardMaterial(matData.name + "RadixMaterial", this._scene);
-                mtl.diffuseColor = matData.color;
-
-                this._materials[matData.name] = mtl;
-            }
-
-            this._features = features;
-            this._rootMesh = new Mesh("radixRoot", this._scene);
-            this._rootMesh.renderingGroupId = 1;
-
-            this.constructGraphicalObjects();
-        }
-
-        /**
-         * make an intersection test between a point position in the viwport and the Radix, return the feature that is intersected, if any.
-         * only the closer Radix Feature is picked.
-         * @param pos the viewport position to create the picking ray from.
-         */
-        intersect(pos: Vector2): RadixFeatures {
-            let hit = RadixFeatures.None;
-            let closest = Number.MAX_VALUE;
-
-            // Arrows
-            if (this.hasFeature(RadixFeatures.ArrowX)) {
-                let dist = this.intersectMeshes(pos, "arrowX", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.ArrowX;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.ArrowY)) {
-                let dist = this.intersectMeshes(pos, "arrowY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.ArrowY;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.ArrowZ)) {
-                let dist = this.intersectMeshes(pos, "arrowZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.ArrowZ;
-                }
-            }
-
-            // Planes
-            if (this.hasFeature(RadixFeatures.PlaneSelectionXY)) {
-                let dist = this.intersectMeshes(pos, "planeXY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.PlaneSelectionXY;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.PlaneSelectionXZ)) {
-                let dist = this.intersectMeshes(pos, "planeXZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.PlaneSelectionXZ;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.PlaneSelectionYZ)) {
-                let dist = this.intersectMeshes(pos, "planeYZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.PlaneSelectionYZ;
-                }
-            }
-
-            // Rotation
-            if (this.hasFeature(RadixFeatures.RotationX)) {
-                let dist = this.intersectMeshes(pos, "rotationX", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.RotationX;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.RotationY)) {
-                let dist = this.intersectMeshes(pos, "rotationY", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.RotationY;
-                }
-            }
-
-            if (this.hasFeature(RadixFeatures.RotationZ)) {
-                let dist = this.intersectMeshes(pos, "rotationZ", closest);
-                if (dist < closest) {
-                    closest = dist;
-                    hit = RadixFeatures.RotationZ;
-                }
-            }
-            return hit;
-        }
-
-        /**
-         * Set the world coordinate of where the Axis should be displayed
-         * @param position the position
-         * @param rotation the rotation quaternion
-         * @param scale the scale (should be uniform)
-         */
-        setWorld(position: Vector3, rotation: Quaternion, scale: Vector3) {
-            this._rootMesh.position = position;
-            this._rootMesh.rotationQuaternion = rotation;
-            this._rootMesh.scaling = scale;
-        }
-
-        /**
-         * Display the Radix on screen
-         */
-        show() {
-            this.setVisibleState(this._rootMesh, true);
-        }
-
-        /**
-         * Hide the Radix from the screen
-         */
-        hide() {
-            this.setVisibleState(this._rootMesh, false);
-        }
-
-        private setVisibleState(mesh: AbstractMesh, state: boolean) {
-            mesh.isVisible = state;
-            mesh.getChildMeshes(true).forEach(m => this.setVisibleState(m, state));
-        }
-
-        private intersectMeshes(pos: Vector2, startName: string, currentClosest: number): number {
-            let meshes = this._rootMesh.getChildMeshes(true, m => m.name.indexOf(startName) === 0);
-            for (var mesh of meshes) {
-                var ray = this._scene.createPickingRay(pos.x, pos.y, mesh.getWorldMatrix(), this._scene.activeCamera);
-                var pi = mesh.intersects(ray, false);
-                if (pi.hit && pi.distance < currentClosest) {
-                    currentClosest = pi.distance;
-                }
-            }
-            return currentClosest;
-        }
-
-        private constructGraphicalObjects() {
-            var hp = Math.PI / 2;
-            if (this.hasFeature(RadixFeatures.ArrowX)) {
-                this.constructArrow(RadixFeatures.ArrowX, "arrowX", Matrix.RotationZ(-hp));
-            }
-            if (this.hasFeature(RadixFeatures.ArrowY)) {
-                this.constructArrow(RadixFeatures.ArrowY, "arrowY", Matrix.Identity());
-            }
-            if (this.hasFeature(RadixFeatures.ArrowZ)) {
-                this.constructArrow(RadixFeatures.ArrowZ, "arrowZ", Matrix.RotationX(hp));
-            }
-
-            if (this.hasFeature(RadixFeatures.PlaneSelectionXY)) {
-                this.constructPlaneSelection(RadixFeatures.PlaneSelectionXY, "planeXY", Matrix.Identity());
-            }
-
-            if (this.hasFeature(RadixFeatures.PlaneSelectionXZ)) {
-                this.constructPlaneSelection(RadixFeatures.PlaneSelectionXZ, "planeXZ", Matrix.RotationX(hp));
-            }
-
-            if (this.hasFeature(RadixFeatures.PlaneSelectionYZ)) {
-                this.constructPlaneSelection(RadixFeatures.PlaneSelectionYZ, "planeYZ", Matrix.RotationY(-hp));
-            }
-
-            if (this.hasFeature(RadixFeatures.RotationX)) {
-                this.constructRotation(RadixFeatures.RotationX, "rotationX", Matrix.RotationZ(-hp));
-            }
-
-            if (this.hasFeature(RadixFeatures.RotationY)) {
-                this.constructRotation(RadixFeatures.RotationY, "rotationY", Matrix.Identity());
-            }
-
-            if (this.hasFeature(RadixFeatures.RotationZ)) {
-                this.constructRotation(RadixFeatures.RotationZ, "rotationZ", Matrix.RotationX(hp));
-            }
-
-        }
-
-        private constructArrow(feature: RadixFeatures, name: string, transform: Matrix) {
-            let mtl = this.getMaterial(name);
-            let hasRot;
-
-            switch (feature) {
-                case RadixFeatures.ArrowX:
-                    hasRot = this.hasFeature(RadixFeatures.RotationX);
-                    break;
-                case RadixFeatures.ArrowY:
-                    hasRot = this.hasFeature(RadixFeatures.RotationY);
-                    break;
-                case RadixFeatures.ArrowZ:
-                    hasRot = this.hasFeature(RadixFeatures.RotationZ);
-                    break;
-            }
-
-            let rotation = Quaternion.FromRotationMatrix(transform);
-
-            let points = new Array<number>();
-            points.push(0, hasRot ? this._coneLength : 0, 0);
-            points.push(0, this._arrowLength - this._coneLength, 0);
-
-            let wireMesh = new LinesMesh(name + "Wire", this._scene);
-            wireMesh.rotationQuaternion = rotation;
-            wireMesh.parent = this._rootMesh;
-            wireMesh.color = mtl.diffuseColor;
-            wireMesh.renderingGroupId = 1;
-            wireMesh.intersectionThreshold = this.wireSelectionThreshold;
-            wireMesh.isPickable = false;
-
-            var vd = new VertexData();
-            vd.positions = points;
-            vd.indices = [0, 1];
-            vd.applyToMesh(wireMesh);
-
-            let arrow = Mesh.CreateCylinder(name + "Cone", this._coneLength, 0, this._coneRadius, 18, 1, this._scene, false);
-            arrow.position = Vector3.TransformCoordinates(new Vector3(0, this._arrowLength - (this._coneLength / 2), 0), transform);
-            arrow.rotationQuaternion = rotation;
-            arrow.material = mtl;
-            arrow.parent = this._rootMesh;
-            arrow.renderingGroupId = 1;
-            arrow.isPickable = false;
-            this.addSymbolicMeshToLit(arrow);
-        }
-
-        private constructPlaneSelection(feature: RadixFeatures, name: string, transform: Matrix) {
-            let mtl = this.getMaterial(name);
-
-            let points = new Array<Vector3>();
-
-            points.push(new Vector3(this._arrowLength - this._planeSelectionLength, this._arrowLength, 0));
-            points.push(new Vector3(this._arrowLength, this._arrowLength, 0));
-            points.push(new Vector3(this._arrowLength, this._arrowLength - this._planeSelectionLength, 0));
-
-            let wireMesh = Mesh.CreateLines(name + "Plane", points, this._scene);
-            wireMesh.parent = this._rootMesh;
-            wireMesh.color = mtl.diffuseColor;
-            wireMesh.rotationQuaternion = Quaternion.FromRotationMatrix(transform);
-            wireMesh.renderingGroupId = 1;
-            wireMesh.intersectionThreshold = this.wireSelectionThreshold;
-            wireMesh.isPickable = false;
-        }
-
-        private constructRotation(feature: RadixFeatures, name: string, transform: Matrix) {
-            let mtl = this.getMaterial(name);
-
-            var rotCyl = Mesh.CreateCylinder(name + "Cylinder", this._coneLength, this._coneRadius, this._coneRadius, 18, 1, this._scene, false);
-            rotCyl.material = mtl;
-            rotCyl.position = Vector3.TransformCoordinates(new Vector3(0, this._coneLength / 2, 0), transform);
-            rotCyl.rotationQuaternion = Quaternion.FromRotationMatrix(transform);
-            rotCyl.parent = this._rootMesh;
-            rotCyl.renderingGroupId = 1;
-            rotCyl.isPickable = false;
-            this.addSymbolicMeshToLit(rotCyl);
-        }
-
-        private addSymbolicMeshToLit(mesh: AbstractMesh) {
-            this._light1.includedOnlyMeshes.push(mesh);
-            this._light2.includedOnlyMeshes.push(mesh);
-            this._scene.lights.map(l => { if ((l !== this._light1) && (l !== this._light2)) l.excludedMeshes.push(mesh) });
-        }
-
-        private hasFeature(value: RadixFeatures): boolean {
-            return (this._features & value) !== 0;
-        }
-
-        private hasHighlightedFeature(value: RadixFeatures): boolean {
-            return (this._highlighted & value) !== 0;
-        }
-
-        private updateMaterial(name: string, color: Color3) {
-            let mtl = this.getMaterial(name);
-            if (mtl) {
-                mtl.diffuseColor = color;
-            }
-        }
-
-        private updateMaterialFromHighlighted(feature: RadixFeatures, highlighted: RadixFeatures, name: string) {
-            if (!this.hasFeature(feature)) {
-                return;
-            }
-
-            if ((this._highlighted & feature) !== (highlighted & feature)) {
-                let mtl = this.getMaterial(name);
-                if ((highlighted&feature) !== 0) {
-                    mtl.diffuseColor.r *= 1.8;
-                    mtl.diffuseColor.g *= 1.8;
-                    mtl.diffuseColor.b *= 1.8;
-                } else {
-                    mtl.diffuseColor.r /= 1.8;
-                    mtl.diffuseColor.g /= 1.8;
-                    mtl.diffuseColor.b /= 1.8;
-                }
-            }
-        }
-
-        private getMaterial(name: string): StandardMaterial {
-            var mtl = <StandardMaterial>this._materials[name];
-            return mtl;
-        }
-
-        private _arrowLength: number;
-        private _coneLength: number;
-        private _coneRadius: number;
-        private _planeSelectionLength: number;
-
-        private _light1: PointLight;
-        private _light2: PointLight;
-        private _rootMesh: Mesh;
-        private _features: RadixFeatures;
-        private _scene: Scene;
-        private _materials;
-        private _wireSelectionThreshold: number;
-        private _xArrowColor: Color3;
-        private _yArrowColor: Color3;
-        private _zArrowColor: Color3;
-        private _xyPlaneSelectionColor: Color3;
-        private _xzPlaneSelectionColor: Color3;
-        private _yzPlaneSelectionColor: Color3;
-        private _highlighted: RadixFeatures;
-    }
-}

+ 0 - 132
typescript/SimpleInteractionHelper.ts

@@ -1,132 +0,0 @@
-module Sandbox {
-    import Scene = BABYLON.Scene;
-    import Observer = BABYLON.Observer;
-    import PointerInfo = BABYLON.PointerInfo;
-    import EventState = BABYLON.EventState;
-    import PointerEventTypes = BABYLON.PointerEventTypes;
-    import AbstractMesh = BABYLON.AbstractMesh;
-    import Node = BABYLON.Node;
-
-    export const enum SIHCurrentAction {
-        None, Selector, Camerator
-    }
-
-    /**
-     * The purpose of this class is to allow the camera manipulation, single node selection and manipulation.
-     * You can use it as an example to create your more complexe/different interaction helper
-     */
-    export class SimpleInteractionHelper {
-        constructor(scene: Scene) {
-            this._actionStack = new Array<SIHCurrentAction>();
-
-            this._scene = scene;
-            this._pointerObserver = this._scene.onPointerObservable.add((p, s) => this.pointerCallback(p, s), -1, true);
-        }
-
-        get currentAction(): SIHCurrentAction {
-            if (this._actionStack.length === 0) {
-                return SIHCurrentAction.Selector;
-            }
-
-            return this._actionStack[this._actionStack.length - 1];
-        }
-
-        get manipulator(): ManipulatorInteractionHelper {
-            if (!this._manipulator) {
-                this._manipulator = new ManipulatorInteractionHelper(this._scene);
-            }
-
-            return this._manipulator;
-        }
-
-        private pointerCallback(p: PointerInfo, s: EventState) {
-            this.detectActionChanged(p, s);
-
-            switch (this.currentAction) {
-                case SIHCurrentAction.Selector:
-                    this.doSelectorInteraction(p, s);
-                    break;
-                case SIHCurrentAction.Camerator:
-                    if (p.type & (PointerEventTypes.POINTERUP | PointerEventTypes.POINTERWHEEL)) {
-                        this._actionStack.pop();
-                    }
-                    break;
-            }
-        }
-
-        private doSelectorInteraction(p: PointerInfo, s: EventState) {
-            s.skipNextObservers = true;
-
-            // We want left button up.
-            if (p.type !== PointerEventTypes.POINTERUP || p.event.button!==0) {
-                return;
-            }
-
-            var selectedMesh: AbstractMesh;
-
-            if (p.pickInfo.hit) {
-                selectedMesh = p.pickInfo.pickedMesh;
-            }
-
-            // We selected the same mesh? nothing to do
-            if (this._pickedNode === selectedMesh) {
-                selectedMesh.showBoundingBox = !selectedMesh.showBoundingBox;
-
-                if (selectedMesh.showBoundingBox===false) {
-                    this.manipulator.detachManipulatedNode(this._pickedNode);
-                    this._pickedNode = null;
-                }
-                return;
-            }
-
-            // Detach the manipulator to the current selected mesh
-            if (this._pickedNode) {
-                if (this._pickedNode instanceof AbstractMesh) {
-                    var mesh = <AbstractMesh>this._pickedNode;
-                    mesh.showBoundingBox = false;
-                }
-                this.manipulator.detachManipulatedNode(this._pickedNode);
-                this._pickedNode = null;
-            }
-
-            // Nothing selected, our job's done
-            if (!selectedMesh) {
-                return;
-            }
-
-            this._pickedNode = selectedMesh;
-            selectedMesh.showBoundingBox = true;
-
-            this.manipulator.attachManipulatedNode(this._pickedNode);
-        }
-
-        private detectActionChanged(p: PointerInfo, s: EventState) {
-            // Detect switch from selection to camerator
-            if (this.currentAction === SIHCurrentAction.Selector) {
-
-                if (p.type === PointerEventTypes.POINTERDOWN) {
-                    if (!p.pickInfo.hit) {
-                        this._actionStack.push(SIHCurrentAction.Camerator);
-                        return;
-                    }
-                }
-
-                if (p.type === PointerEventTypes.POINTERWHEEL) {
-                    this._actionStack.push(SIHCurrentAction.Camerator);
-                    return;
-                }
-            }
-        }
-
-        private static CameratorSwitchThreshold = 4.0;
-
-        private _pickedNode: Node;
-        private _actionStack: Array<SIHCurrentAction>;
-        private _scene: Scene;
-        private _pointerObserver: Observer<PointerInfo>;
-
-        private _manipulator: ManipulatorInteractionHelper;
-
-
-    }
-}

+ 0 - 16
typescript/SymbolicVisualHelper.js

@@ -1,16 +0,0 @@
-var Sandbox;
-(function (Sandbox) {
-    var SymbolicVisualHelper = (function () {
-        function SymbolicVisualHelper() {
-        }
-        SymbolicVisualHelper.prototype.render = function () {
-            if (this.renderLight) {
-            }
-            if (this.renderManipulator) {
-            }
-        };
-        return SymbolicVisualHelper;
-    }());
-    Sandbox.SymbolicVisualHelper = SymbolicVisualHelper;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=SymbolicVisualHelper.js.map

+ 0 - 18
typescript/SymbolicVisualHelper.ts

@@ -1,18 +0,0 @@
-module Sandbox {
-    export class SymbolicVisualHelper {
-
-        public render() {
-
-            if (this.renderLight) {
-                
-            }
-
-            if (this.renderManipulator) {
-                
-            }
-        }
-
-        public renderLight: boolean;
-        public renderManipulator: boolean;
-    }
-}

+ 0 - 105
typescript/simpleinteractionhelper.js

@@ -1,105 +0,0 @@
-var Sandbox;
-(function (Sandbox) {
-    var PointerEventTypes = BABYLON.PointerEventTypes;
-    var AbstractMesh = BABYLON.AbstractMesh;
-    /**
-     * The purpose of this class is to allow the camera manipulation, single node selection and manipulation.
-     * You can use it as an example to create your more complexe/different interaction helper
-     */
-    var SimpleInteractionHelper = (function () {
-        function SimpleInteractionHelper(scene) {
-            var _this = this;
-            this._actionStack = new Array();
-            this._scene = scene;
-            this._pointerObserver = this._scene.onPointerObservable.add(function (p, s) { return _this.pointerCallback(p, s); }, -1, true);
-        }
-        Object.defineProperty(SimpleInteractionHelper.prototype, "currentAction", {
-            get: function () {
-                if (this._actionStack.length === 0) {
-                    return 1 /* Selector */;
-                }
-                return this._actionStack[this._actionStack.length - 1];
-            },
-            enumerable: true,
-            configurable: true
-        });
-        Object.defineProperty(SimpleInteractionHelper.prototype, "manipulator", {
-            get: function () {
-                if (!this._manipulator) {
-                    this._manipulator = new Sandbox.ManipulatorInteractionHelper(this._scene);
-                }
-                return this._manipulator;
-            },
-            enumerable: true,
-            configurable: true
-        });
-        SimpleInteractionHelper.prototype.pointerCallback = function (p, s) {
-            this.detectActionChanged(p, s);
-            switch (this.currentAction) {
-                case 1 /* Selector */:
-                    this.doSelectorInteraction(p, s);
-                    break;
-                case 2 /* Camerator */:
-                    if (p.type & (PointerEventTypes.POINTERUP | PointerEventTypes.POINTERWHEEL)) {
-                        this._actionStack.pop();
-                    }
-                    break;
-            }
-        };
-        SimpleInteractionHelper.prototype.doSelectorInteraction = function (p, s) {
-            s.skipNextObservers = true;
-            // We want left button up.
-            if (p.type !== PointerEventTypes.POINTERUP || p.event.button !== 0) {
-                return;
-            }
-            var selectedMesh;
-            if (p.pickInfo.hit) {
-                selectedMesh = p.pickInfo.pickedMesh;
-            }
-            // We selected the same mesh? nothing to do
-            if (this._pickedNode === selectedMesh) {
-                selectedMesh.showBoundingBox = !selectedMesh.showBoundingBox;
-                if (selectedMesh.showBoundingBox === false) {
-                    this.manipulator.detachManipulatedNode(this._pickedNode);
-                    this._pickedNode = null;
-                }
-                return;
-            }
-            // Detach the manipulator to the current selected mesh
-            if (this._pickedNode) {
-                if (this._pickedNode instanceof AbstractMesh) {
-                    var mesh = this._pickedNode;
-                    mesh.showBoundingBox = false;
-                }
-                this.manipulator.detachManipulatedNode(this._pickedNode);
-                this._pickedNode = null;
-            }
-            // Nothing selected, our job's done
-            if (!selectedMesh) {
-                return;
-            }
-            this._pickedNode = selectedMesh;
-            selectedMesh.showBoundingBox = true;
-            this.manipulator.attachManipulatedNode(this._pickedNode);
-        };
-        SimpleInteractionHelper.prototype.detectActionChanged = function (p, s) {
-            // Detect switch from selection to camerator
-            if (this.currentAction === 1 /* Selector */) {
-                if (p.type === PointerEventTypes.POINTERDOWN) {
-                    if (!p.pickInfo.hit) {
-                        this._actionStack.push(2 /* Camerator */);
-                        return;
-                    }
-                }
-                if (p.type === PointerEventTypes.POINTERWHEEL) {
-                    this._actionStack.push(2 /* Camerator */);
-                    return;
-                }
-            }
-        };
-        SimpleInteractionHelper.CameratorSwitchThreshold = 4.0;
-        return SimpleInteractionHelper;
-    }());
-    Sandbox.SimpleInteractionHelper = SimpleInteractionHelper;
-})(Sandbox || (Sandbox = {}));
-//# sourceMappingURL=simpleinteractionhelper.js.map