Giter Site home page Giter Site logo

Comments (5)

potenziani avatar potenziani commented on August 27, 2024

Hi @mashalahmad

it is not possible to debug your issue without further information (3DHOP version, HW and SW system setup, etc).

Anyway, it seems to be a problem related to the non-inclusion of the spidergl.js file. Please, make sure you've included it in your HTML file (<script type="text/javascript" src="js/spidergl.js"></script>) and in the js folder of your project.

from 3dhop.

mashalahmad avatar mashalahmad commented on August 27, 2024

thanks I resolved that issue. Im trying to implement 3DHOP in rails. I am able to see the background image but model is not loading here is the piece of code
var presenter = null;

function setup3dhop() { 
	presenter = new Presenter("draw-canvas");

	presenter.setScene({
		meshes: {
			"Gargoyle" : { url: "assets/images/cube.ply" }
		},
		modelInstances : {
			"Model1" : { mesh : "Gargoyle" }
		}
	});
}

$(document).ready(function(){
	init3dhop();
	setup3dhop();
});

I got the error "404 model not found".
Now in rails usually images are put under the assets/images folder I put the background images there and they are loading but not the model

from 3dhop.

mashalahmad avatar mashalahmad commented on August 27, 2024

here is the screenshot
error

from 3dhop.

potenziani avatar potenziani commented on August 27, 2024

Hi @mashalahmad
I do not have experience with Rails, so my help can be only partial.

In a common setup (local/remote HTTP web server) changing the relative folder of the resources (skins, css, js, models) is not a problem for 3DHOP. Of course, this means you have to update all the paths pointing those resources (and this could be the error causing the SpiderGL issue you reported previously).

Anyway, what you are reporting is really strange, since usually the HTTP error 404 simply means that the resource you are trying to load not be found on the server... But, if (starting from the folder with the HTML file containing the 3D scene setup) the relative path of the model is right (assets/images/cube.ply), and the model cube.ply really is in the assets/images folder, it should work...

from 3dhop.

mashalahmad avatar mashalahmad commented on August 27, 2024

yeah im also very amazed. the same thing was previously happening to my background image so I included the ruby tag and background image was then displayed. Im not sure if I can do the same with java script in ruby or not. thanks btw

from 3dhop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.