[REL] ToriStudio: create mods from your browser
Link to the app:
link
Link to the source:
link
The ingame mod maker is hard to use. So I decided to a make mod maker that is easier to use.
Demo
VIDEO
Instructions
'W' to translate object
'E' to rotate object
'R' to scale object
'-' to decrease the size of the helper
'+' to increase the size of the helper
hold down 'Ctrl' to snap to grid
Current version
Alpha 0.0.2
Tech used
Change log
Alpha 0.0.2:
q button is working now
rotation fixed
shif + drag to copy object
automated object generation through scripting
Todo
add tori and uke
add configuration menu for gamerules
add mod importer
Scripting example
Here is a random cube generator:
for (var i = 0; i < 100; i++) {
objects.push({
type: 'box',
movable: true,
position: {
x: Math.random() * 15 - 7.5,
y: Math.random() * 15 - 7.5,
z: Math.random() * 10 + 3
},
rotation: {
_x: Math.random() * 10,
_y: Math.random() * 10,
_z: Math.random() * 10
},
scale: {
x: Math.random() * 2,
y: Math.random() * 2,
z: Math.random() * 2
},
color: {
r: Math.random() * 255,
g: Math.random() * 255,
b: Math.random() * 255
}
});
}
And is a procedural "city" generator script:
// the array of buildings
var buildings = [];
// generate the data for the buildings and push it to the array
for (var i = 0; i < 50; i++) {
buildings.push({
pos_x: Math.random() * 30 - 15,
pos_y: Math.random() * 30 - 15,
height: Math.random() * 10 + 5,
width_x: Math.random() * 3 + 1,
width_y: Math.random() * 3 + 1,
rotation: Math.random() * 360
});
}
for (var i = 0; i < buildings.length; i++) {
objects.push({
type: 'box',
movable: true,
position: {
x: buildings[i].pos_x,
y: buildings[i].pos_y,
z: buildings[i].height / 2
},
rotation: {
_x: 0,
_y: 0,
_z: buildings[i].rotation
},
scale: {
x: buildings[i].width_x,
y: buildings[i].width_y,
z: buildings[i].height
},
color: {
r: Math.random() * 255,
g: Math.random() * 255,
b: Math.random() * 255
}
});
}
Last edited by dista; Nov 18, 2015 at 08:11 AM .