Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNek committed Jun 28, 2021
2 parents ebffcb4 + 5ff4436 commit 7401ccd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
33 changes: 21 additions & 12 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,35 @@ branches:
only:
- master

skip_tags: true
image: Visual Studio 2019
configuration: Release
platform: Any CPU

assembly_info:
dotnet_csproj:
patch: true
file: '**\AssemblyInfo.*'
file: '**\*.csproj'
version: '{version}'
version_prefix: '{version}'
package_version: '{version}'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'

nuget:
project_feed: true
file_version: '{version}'
informational_version: '{version}'

before_build:
- ps: nuget restore
- ps: dotnet restore

build:
project: Babylon.Blazor.Lib\Babylon.Blazor.csproj
verbosity: minimal

artifacts:
- path: BlazorBabylon\Babylon.Blazor.Lib\bin\Release\net5.0\Babylon.Blazor.dll
name: Babylon.Blazor.dll
- path: Babylon.Blazor.Lib\bin\Release\net5.0\Babylon.Blazor.dll
name: Babylon.Blazor

deploy:
- provider: GitHub
auth_token:
secure: F/19bv2TYoeZ5LhzsKZUeVYgpbI53wUcX8RSHE9+T8CD1Q6tXF+3IBU5xe2YyQQx
artifact: Babylon.Blazor
- provider: NuGet
api_key:
secure: 7uBsvquYgLqrQREBfflKXMwz8H1yJizhlIAwug+V4iW6W/pIJrTy5Wb5XfBxpecl
29 changes: 28 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Using .NET CLI
dotnet add package Babylon.Blazor
```

Using MS VS Manage NuGet Packages
Search for `Babylon.Blazor`

Add reference to babylon js library. Add 2 lines into index.html
```html
<body>
Expand All @@ -52,15 +55,32 @@ Add reference to babylon js library. Add 2 lines into index.html
</body>
```

Add `InstanceCreator` to **DI**
```C#
public class Program
{
public static async Task Main(string[] args)
{
...

builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });

builder.Services.AddTransient(sp => new InstanceCreator(sp.GetService<IJSRuntime>()));
await builder.Build().RunAsync();
}
}
```

Add Razor page and replace context to similar code
```C#
@page "/test"
@using Babylon.Blazor.Chemical
<h1>Water</h1>

<p> Chemical formula of water is H<sub>2</sub>O</p>

<div style="height: 600px;">
<BabylonCanvas CanvasId="Canvas1" ChemicalData=@PanelData/>
<BabylonCanvas CanvasId="Canvas1" SceneData=@PanelData/>
</div>

@code {
Expand Down Expand Up @@ -88,6 +108,13 @@ Add Razor page and replace context to similar code

}
```

Add to _Imports.razor
```
@using Babylon.Blazor
```
> **_NOTE:_** You can skip this step

### Demo Application


Expand Down

0 comments on commit 7401ccd

Please sign in to comment.