This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void ClearViewport() | |
| { | |
| ModelVisual3D m; | |
| for (int i = mainViewport.Children.Count - 1; i >= 0; i--) | |
| { | |
| m = (ModelVisual3D)mainViewport.Children[i]; | |
| if (m.Content is DirectionalLight == false) | |
| mainViewport.Children.Remove(m); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- ... --> | |
| <Viewport3D.Camera> | |
| <PerspectiveCamera FarPlaneDistance="100" LookDirection="-11,-10,-9" | |
| UpDirection="0,1,0" NearPlaneDistance="1" | |
| Position="11,10,9" FieldOfView="70" /> | |
| </Viewport3D.Camera> | |
| <ModelVisual3D> | |
| <ModelVisual3D.Content> | |
| <DirectionalLight Color="White" Direction="-2,-3,-1" /> | |
| </ModelVisual3D.Content> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// the C# solution identifies the baseline members by checking on their type; | |
| /// it may be preferable to identify the baseline / removable children via hash codes | |
| /// (in this specific case, there is only one baseline child) | |
| let viewportBaseline = | |
| [0 .. (!vp).Children.Count-1] // [0 .. -1] = [] | |
| |> List.map (fun i -> (!vp).Children.[i].GetHashCode()) | |
| |> Set.ofList | |
| /// keep baseline while removing 'window.mainViewport' descendants; | |
| /// using updated 3DTools library found here: | |
| /// -> https://github.com/kindohm/wpf3dtutorial |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type MainWindow = XAML<"MainWindow.xaml"> | |
| let window = MainWindow() | |
| let vp = ref window.mainViewport |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// original comment: | |
| // Normal wires are not models, so we can't | |
| // add them to the normal group. Just add them | |
| // to the 'viewport' for now... | |
| /// -> using side effects! | |
| /// -> different life cycle scope of cube and normals! | |
| (!vp).Children.Add normal0Wire | |
| (!vp).Children.Add normal1Wire | |
| (!vp).Children.Add normal2Wire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// cannot access a TextBox by name (unlike Button); | |
| /// is this a XAML TypeProvider error? | |
| /// WORKAROUND: use the FindName method | |
| let getTextBoxValue name = | |
| try | |
| ((!vp).FindName(name) :?> TextBox).Text | |
| with | |
| | ex -> ex.ToString() |> System.Windows.MessageBox.Show |> ignore; "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fb@MacBook:~/projects/FSharp.Formatting $ ./build.sh | |
| fsharpi build.fsx | |
| Building project with version: LocalBuild | |
| Shortened DependencyGraph for Target All: | |
| <== All | |
| <== GenerateDocs | |
| <== RunTests | |
| <== Build | |
| <== AssemblyInfo | |
| <== RestorePackages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fb@MacBook:~/projects/FSharp.Data $ ./build.sh All | |
| fsharpi -d:MONO build.fsx | |
| Building project with version: LocalBuild | |
| Shortened DependencyGraph for Target All: | |
| <== All | |
| <== Build | |
| <== AssemblyInfo | |
| <== Clean | |
| <== BuildTests | |
| <== RunTests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Processing 'ja/tutorials/JsonToXml.fsx' | |
| ***** FSharp.Data.Tests.Experimental.DesignTime.SignatureTests.Validate signature didn't change (Apiary,themoviedb) | |
| ***** FSharp.Data.Tests.Experimental.DesignTime.SignatureTests.Validate signature didn't change (Apiary,fssnip) | |
| Tests run: 228, Errors: 2, Failures: 0, Inconclusive: 0, Time: 4,1741957 seconds | |
| Not run: 1, Invalid: 0, Ignored: 0, Skipped: 1 | |
| Errors and Failures: | |
| 1) Test Error : FSharp.Data.Tests.Experimental.DesignTime.SignatureTests.Validate signature didn't change (Apiary,themoviedb) | |
| System.Net.WebException : The remote server returned an error: (503) Service Unavailable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <doc> | |
| <assembly><name>FakeLib</name></assembly> | |
| <members> | |
| <member name="M:Fake.AdditionalSyntax.op_EqualsQmarkGreater(System.String,System.String,System.Boolean)"> | |
| <summary> | |
| Defines a conditional dependency - y is dependent on x if the condition is true | |
| </summary> | |
| </member> | |
| <member name="M:Fake.AdditionalSyntax.op_LessEqualsGreater(System.String,System.String)"> |