1.0.9 • Published 5 years ago

threejs-model-loader-wrapper v1.0.9

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

threejs-model-loader-wrapper

David

Simple wrapper for three.js OBJ model loader

Usage

 <div id="main" style="width: 800px; height: 600px;"></div>
 <script src="dist/index.js"></script>
 <script>
     window.load3D(
             document.getElementById('main'),
             {
                 cameraX: 100,
                 cameraY: 100,
                 cameraZ: 200,
                 ambientLight: 0x555555,
                 directionalLight: 0x888888,
                 ambientLightStrength: 1,
                 directionalLightStrength: 1.5,
             },
             [
                 {
                     options: {
                         x: 50,
                         y: 50,
                         z: 0,
                         scale: 50,
                         rotateX: 0,
                         rotateY: 45,
                         rotateZ: 0
                     },
                     model: 'example/cube.obj',
                     material: 'example/cube.mtl',
                     texture: 'example/cube.jpg'
                 },
                 {
                     options: {x: -50, scale: 30},
                     model: 'example/cube.obj',
                     texture: 'example/cube.jpg'
                 }
             ]
     );
 
 </script>

Development

npm start - run example

npm build - build

npm test - run eslint

License

threejs-model-loader-wrapper is licensed under the MIT license. For the full license, see the LICENSE file.

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago