Code Monkey home page Code Monkey logo

threejs-collada's Introduction

IMPORTANT

This repository is no longer maintained.

COLLADA is not a suitable runtime asset format. If you are looking for a runtime asset format that can be created out of COLLADA files, try glTF or our own COLLADA converter

Collada loder for three.js

An alternative loader for COLLADA files, to be used with the three.js library.

Building

If you know how to use coffeescript, compile the file ColladaLoader2.coffee. Otherwise, follow these instructions:

  • Clone this repository
  • Install node
  • Open the command line, go to the repository directory and type npm update
  • If you are a windows user, type make. If you are a linux user, read that file and figure out what to do.

Example

For an example of how to use the loader, open the file example.html. The example won't work if you open the file locally (see the troubleshooting section below).

Viewer

Loads and shows collada files.

  • Open the file view.html in your web browser.
  • Drag-and-drop a collada file from your file system into the black area.

Troubleshooting

Using the web pages locally

  • Texture loading will not work if you use the web pages locally unless you follow one of the following steps.
    • The reason is that you will get cross-origin resource loading errors, since local files are never considered as coming from the same origin.
  • Set loader.options.localImageMode = true to tell the loader it should only use textures that you have manually provided with loader.addCachedTextures.
  • Alternatively, use the chrome browser switch --allow-file-access-from-files or the firefox setting security.fileuri.strict_origin_policy
    • Those switches are a security risk, don't forget to change them back.

Using the web pages though a web server

  • You can use the file simpleServer.js to start a simple HTTP server using node
  • The texture most likely has to come from the same domain as the web page.
    • Hotlinking textures from the three.js project example page won't work.

threejs-collada's People

Contributors

cauten avatar crobi avatar gero3 avatar werehamster avatar

Watchers

 avatar

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.