-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
62 lines (52 loc) · 1.48 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
'use strict';
var path = require('path');
var mountFolder = function(connect, dir) {
return connect.static(path.resolve(dir));
};
var models = [
'assets/models/parseTest/parse.autodesk.dae',
// 'assets/models/v6/v6.autodesk.dae'
]
module.exports = function(grunt) {
grunt.initConfig({
//note that filenames will automatically be fixed into .json. This is to help simplify your configs when used in conjunction with grunt-convertautodesktothreejs
convertautodesktothree: {
car: {
options: {
models : models
}
}
},
splitthreejsmodel: {
car: {
options: {
models : models
}
}
},
packsplitthreejsmodel: {
car: {
options: {
models : models
}
}
},
threejs_model_manifest: {
car: {
options: {
models : models,
depth: 2
}
}
}
});
grunt.loadNpmTasks('grunt-convertautodesktothree');
grunt.loadNpmTasks('grunt-splitthreejsmodel');
grunt.loadNpmTasks('grunt-packsplitthreejsmodel');
grunt.loadNpmTasks('grunt-threejs-model-manifest');
grunt.registerTask('convertModel', ['convertautodesktothree']);
grunt.registerTask('splitModel', ['splitthreejsmodel']);
grunt.registerTask('packModel', ['packsplitthreejsmodel']);
grunt.registerTask('manifest', ['threejs_model_manifest']);
grunt.registerTask('prepModel', ['convertautodesktothree', 'splitModel', 'manifest', 'packModel']);
};