How to render babylonJS on dotnet MVC web application

Hello everyone

How can I render babylonJS 3D model on the dotnet MVC web application?

actually they are not depend to each other so the question is where you wanna render in server side or in client side?

client side

so you just need add requirement js file in layout and make canvas and add your scene javascript code for initialize that canvas

its the dotnet MVC web app, I have added the requirement js files in Scripts folder, but I don’t know where should I add my scene JS code, should I add it in index.chtml?

you can add it in header file and you can call it in script elemnt after canvas created or in document.load

I try to do it but I couldn’t demonstrate the babylonJS scene,

is it possible to send you my project to see it?


just send the view and layout part

Thank you so much. :pray:t2:
this is my layout: (1.1 KB)

and the JS documents folder ScreenShot:

home/index.cshtml ?

sorry, this is my index.cshtml (624 Bytes)

if you use layout you dont need make and part but if you dont use layout i dont see { layout = null } in your index.cshtml
i guess you need test babylon on mvc default because you used view wrong in MVC structure

Its absolutely default DOT.NET MVC WEB APP.
I didn’t add anything to it except babylonJS files.

ViewData[“Title”] = “Home Page”;
layout = null;

try this in your index.cshtml

the error said the name “layout” does not exist.

the problem is in the layout?

maybe i dont know but you have html tag in both file

Thank you for devoting your time to answering my question and helping me.
is it possible to deleted the layout html?