문제

Does anyone have an example of rendering a remote file in XTK (https://github.com/xtk/X)? Is this currently possible?

I tried swapping in a URL for the file location, like so:

// load a .vtk file
var skull = new X.object();
skull.load('https://s3.amazonaws.com/surfaces/skull.vtk');

No luck though... Any ideas?

UPDATE: AWS now supports CORS on S3! Just took a little patience: http://docs.amazonwebservices.com/AmazonS3/latest/dev/cors.html

도움이 되었습니까?

해결책

In general this should work!

Maybe it is a cross-origin error - it could be a simple fix on the remote server (the one hosting the .vtk file) like described here:

http://en.wikipedia.org/wiki/Cross-origin_resource_sharing

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top