Minified version + Char names
This commit is contained in:
parent
3cc588221c
commit
d520d8173c
|
@ -11,7 +11,7 @@ Usage
|
|||
3. Paste the following
|
||||
|
||||
```
|
||||
$("<script>").load("https://raw.githubusercontent.com/christofsteel/herosaver/master/herosaver.js").appendTo($("body"))
|
||||
$("<script>").load("https://raw.githubusercontent.com/christofsteel/herosaver/master/herosaver.min.js").appendTo($("body"))
|
||||
```
|
||||
|
||||
Limitations
|
||||
|
|
|
@ -207,13 +207,17 @@ stl.click(function(e) {
|
|||
e.preventDefault();
|
||||
var exporter = new THREE.STLExporter();
|
||||
var stlString = exporter.parse(CK.activeCharacter.threeObj.children[1])
|
||||
download(stlString, 'char.stl', 'text/plain');
|
||||
var name = CK.activeCharacter.name
|
||||
name = name === "" ? "unnamed" : name
|
||||
download(stlString, name + '.stl', 'text/plain');
|
||||
});
|
||||
|
||||
sjson.click(function(e) {
|
||||
e.preventDefault();
|
||||
var char_json = JSON.stringify(CK.activeCharacter.characterData);
|
||||
download(char_json, "char.json", "text/plain");
|
||||
var name = CK.activeCharacter.name
|
||||
name = name === "" ? "unnamed" : name
|
||||
download(char_json, name + ".json", "text/plain");
|
||||
});
|
||||
|
||||
ljson.on('change', function(e) {
|
||||
|
|
Loading…
Reference in New Issue