Class BlazorBase
Base class for generation a Fusee WASM project
Inheritance
System.Object
BlazorBase
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Base.Imp.Blazor
Assembly: Fusee.Engine.Imp.Graphics.Blazor.dll
Syntax
public abstract class BlazorBase
Fields
canvas
The canvas itself, retrieved / created
Declaration
protected IJSObjectReference canvas
Field Value
Type | Description |
---|---|
IJSObjectReference |
canvasHeight
The current canvas height
Declaration
protected int canvasHeight
Field Value
Type | Description |
---|---|
System.Int32 |
canvasWidth
The current canvas width
Declaration
protected int canvasWidth
Field Value
Type | Description |
---|---|
System.Int32 |
clearColor
The clear color of the canvas
Declaration
protected float4 clearColor
Field Value
Type | Description |
---|---|
float4 |
gl
The WebGL2 context retrieved from javascript
Declaration
protected WebGL2RenderingContextBase gl
Field Value
Type | Description |
---|---|
WebGL2RenderingContextBase |
Properties
EnableFullScreen
Should full screen be possible?
Declaration
public virtual bool EnableFullScreen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Runtime
The Javascript runtime instance
Declaration
public static IJSRuntime Runtime { get; }
Property Value
Type | Description |
---|---|
IJSRuntime |
Methods
Draw(Double)
Draw elements on canvas
Declaration
public virtual void Draw(double elapsedMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
System.Double | elapsedMilliseconds |
Init(IJSObjectReference, IJSRuntime)
This method generates the WebGL2 context
Declaration
public virtual void Init(IJSObjectReference canvas, IJSRuntime runtime)
Parameters
Type | Name | Description |
---|---|---|
IJSObjectReference | canvas | |
IJSRuntime | runtime |
Resize(Int32, Int32)
This method is called when a resize occurs
Declaration
public virtual void Resize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | width | |
System.Int32 | height |
Run()
Start the core project
Declaration
public virtual void Run()
Update(Double)
Call update inside the core project
Declaration
public virtual void Update(double elapsedMilliseconds)
Parameters
Type | Name | Description |
---|---|---|
System.Double | elapsedMilliseconds |