MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / Init

Method Init

Examples/StereoKitTest/Program.cs:102–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100 }
101
102 static void Init()
103 {
104 Material floorMat = new Material(Shader.FromFile("Shaders/floor_shader.hlsl"));
105 floorMat.Transparency = Transparency.Blend;
106 floorMat.SetVector("radius", new Vec4(5,10,0,0));
107 floorMat.QueueOffset = -11;
108
109 floorMesh = Model.FromMesh(Mesh.GeneratePlane(new Vec2(40,40), Vec3.Up, Vec3.Forward), floorMat);
110 floorTr = Matrix.TR(new Vec3(0, -1.5f, 0), Quat.Identity);
111
112 powerButton = Sprite.FromTex(Tex.FromFile("power.png"));
113
114 WindowDemoShow = true;
115
116 Tests.FindTests();
117 Tests.SetTestActive(startTest);
118 Tests.Initialize();
119
120 for (int i = 0; i < Tests.DemoCount; i++)
121 demoNames.Add(Tests.GetDemoName(i).Substring("Demo".Length));
122
123 if (Tests.IsTesting)
124 {
125 UI.EnableFarInteract = false;
126 }
127 else
128 {
129 SK.AddStepper<DebugToolWindow>();
130 }
131 }
132
133 //////////////////////
134

Callers 1

OnCreateMethod · 0.45

Calls 11

SetVectorMethod · 0.80
FromMeshMethod · 0.80
GeneratePlaneMethod · 0.80
TRMethod · 0.80
FromTexMethod · 0.80
FindTestsMethod · 0.80
SetTestActiveMethod · 0.80
GetDemoNameMethod · 0.80
FromFileMethod · 0.45
InitializeMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected