blender-actions-to-json
Advanced tools
Comparing version 1.4.3 to 2.0.0
{ | ||
"name": "blender-actions-to-json", | ||
"version": "1.4.3", | ||
"version": "2.0.0", | ||
"description": "Write the joint data for all `.blend` file actions to a JSON file", | ||
@@ -41,2 +41,3 @@ "main": "index.js", | ||
"devDependencies": { | ||
"gl-mat4": "^1.1.4", | ||
"standard": "^10.0.3", | ||
@@ -43,0 +44,0 @@ "tape": "^4.7.0" |
@@ -68,5 +68,9 @@ blender-actions-to-json [![npm version](https://badge.fury.io/js/blender-actions-to-json.svg)](http://badge.fury.io/js/blender-actions-to-json) [![Build Status](https://travis-ci.org/chinedufn/blender-actions-to-json.svg?branch=master)](https://travis-ci.org/chinedufn/blender-actions-to-json) | ||
}, | ||
"bindPoses": { | ||
"inverseBindPoses": { | ||
[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0], | ||
[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0] | ||
}, | ||
"jointNameIndices": { | ||
"Torso": 0, | ||
"Chest": 1 | ||
} | ||
@@ -73,0 +77,0 @@ } |
@@ -8,2 +8,4 @@ var cp = require('child_process') | ||
var glMat4 = require('gl-mat4') | ||
// Our test file already have the armature selected as the active object | ||
@@ -159,3 +161,7 @@ // The script currently requires that the active object be the armature that | ||
// Test that we properly export our bind pose matrices | ||
// Test that we properly export our inverse bind pose matrices | ||
// | ||
// NOTE: We originally exported bind poses, so we simply inverted the matrices in our tests | ||
// when we switched to exporting inverse bind matrices. We switched because inverse bind matrices | ||
// are more commonly used | ||
test('Writing the actions and position indices of a cube with one bone to a JSON file', function (t) { | ||
@@ -168,3 +174,3 @@ t.plan(2) | ||
var expectedBindPoses = [ | ||
[ 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1 ] | ||
glMat4.invert([], [ 1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1 ]) | ||
] | ||
@@ -189,3 +195,3 @@ var expectedNameIndices = { | ||
if (err) { throw err } | ||
t.deepEqual(actionFile.bindPoses.map(roundArray), expectedBindPoses, 'Bind poses were written to the output file') | ||
t.deepEqual(actionFile.inverseBindPoses.map(roundArray), expectedBindPoses, 'Bind poses were written to the output file') | ||
t.deepEqual(actionFile.jointNameIndices, expectedNameIndices, 'Joint indices were written to the output file') | ||
@@ -192,0 +198,0 @@ }) |
Sorry, the diff of this file is not supported yet
3450754
166
3
229