Comments (8)
I wrote up some code to see how this might look. Here's a prototype:
/**
* objLocation should be the http location of the file without the extension.
* we will automatically assume that an obj file and an mtl file are present.
* ex: https://raw.githubusercontent.com/bitgridio/models/gh-pages/lullabot/Body
*/
var loadObjMtl = function(objLocation) {
var loader = new THREE.OBJMTLLoader(manager)
loader.load(
objLocation + '.obj',
objLocation + '.mtl',
function(obj) {
console.log(obj)
VR.scene.add(obj)
},
function(xhr) {
console.log(xhr.loaded + ' bytes loaded')
},
function(xhr) {
console.log('Error loading object')
}
)
}
loadObjMtl('https://raw.githubusercontent.com/bitgridio/models/gh-pages/lullabot/Body')
loadObjMtl('https://raw.githubusercontent.com/bitgridio/models/gh-pages/lullabot/Headd')
If you think something like this would be a good addition to this library, let me know and I'll look at your source and see what might be a good way to implement it as a VR.prototype
or something.
from webvr-starter-kit.
This is a good idea. I'll see if I can whip something up. There are a couple things I need to think about though...
- Is there a good place for people to host obj files if they don't have their own servers? Need CORS headers.
- What's the best way to design the API to allow for multiple object formats?
- How many different object formats do we need to support? Each one comes at a cost of making the script file a bit larger.
from webvr-starter-kit.
Not sure about the first two, but for the third I'd suggests starting with .obj (these can have multiple textures though so not sure that my approach in assuming .mtl is going to pan out), .dae (collada), .fbx?
from webvr-starter-kit.
I think I will start with obj since it seems to be the most popular. Collada is also popular, but I think the files are quite large and slow to parse. So they're not great for deployment on the web.
I've put off building this because everything else about the library is meant to be as self-contained as possible, for people who may not have easy access to their own servers. jsbin is fine for hosting prototype code; imgur.com is good at hosting images. But I haven't found a good place to store video, audio or 3d models. So it's unlikely this feature will be used by some beginners. I would like to find a way to solve that problem. I'm open to suggestions...
from webvr-starter-kit.
...might be cool to build a github repo full of open source models, kind of like npm or homebrew. They could be served by github pages, or maybe someone will donate CDN space. Could be a fair bit of work to dig up the models and make sure they're in usable formats at consistent scales and with working materials/textures.
What do you think?
from webvr-starter-kit.
I help run http://vrsites.com/ where we do some hosting of models and rooms for http://janusvr.com/. The goal of that site is to help teach people to make JanusVR rooms and provide some basic hosting capabilities. Might be an option to point people to, but I do prefer putting things up on GitHub cuz they're so damned fast.
from webvr-starter-kit.
I'm kind of excited about this idea. I'm gonna run it by some folks at Mozilla Festival this weekend. What if I set up an empty repo with notes and some issues for discussion? Would you be interested in participating at least in some ideas of how to put it together, or possibly contributing code and/or models?
from webvr-starter-kit.
Yes, I certainly would.
from webvr-starter-kit.
Related Issues (20)
- Text rendered center aligned if text width is shorter than the 'wrap' HOT 1
- Installing the starter kit for development
- How to check current rotation of an object HOT 8
- Transparent images HOT 2
- Add a link to an object in the scene HOT 2
- Closed
- Using Images
- Audio does not play on iOS device
- text renders a black box background
- Can not disable all movements
- 180 degree mode? HOT 2
- CVE-2018-16487 High Severity Vulnerability detected by WhiteSource
- CVE-2018-3721 Medium Severity Vulnerability detected by WhiteSource
- WS-2018-0210 Low Severity Vulnerability detected by WhiteSource
- WS-2019-0032 Medium Severity Vulnerability detected by WhiteSource
- WS-2019-0019 Medium Severity Vulnerability detected by WhiteSource
- CVE-2016-10540 High Severity Vulnerability detected by WhiteSource
- CVE-2017-16138 High Severity Vulnerability detected by WhiteSource
- WS-2017-0330 Medium Severity Vulnerability detected by WhiteSource
- WS-2018-0107 High Severity Vulnerability detected by WhiteSource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webvr-starter-kit.