mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
Merge pull request #2947 from PhilipRosedale/master
Set max voxel size of 16 meters in script for voxel creation
This commit is contained in:
commit
79405444d1
1 changed files with 7 additions and 1 deletions
|
@ -28,7 +28,7 @@ var NEW_VOXEL_SIZE = 1.0;
|
|||
var NEW_VOXEL_DISTANCE_FROM_CAMERA = 3.0;
|
||||
var PIXELS_PER_EXTRUDE_VOXEL = 16;
|
||||
var WHEEL_PIXELS_PER_SCALE_CHANGE = 100;
|
||||
var MAX_VOXEL_SCALE = 1.0;
|
||||
var MAX_VOXEL_SCALE = 16.0;
|
||||
var MIN_VOXEL_SCALE = 1.0 / Math.pow(2.0, 8.0);
|
||||
var WHITE_COLOR = { red: 255, green: 255, blue: 255 };
|
||||
|
||||
|
@ -394,6 +394,9 @@ function ScaleSelector() {
|
|||
if (this.power < 13) {
|
||||
++this.power;
|
||||
this.scale *= 2.0;
|
||||
if (this.scale > MAX_VOXEL_SCALE) {
|
||||
this.scale = MAX_VOXEL_SCALE;
|
||||
}
|
||||
this.update();
|
||||
rescaleImport();
|
||||
resizeVoxelSound.play(voxelSizePlus);
|
||||
|
@ -1056,6 +1059,9 @@ function mousePressEvent(event) {
|
|||
lastVoxelPosition = { x: voxelDetails.x, y: voxelDetails.y, z: voxelDetails.z };
|
||||
lastVoxelColor = { red: newColor.red, green: newColor.green, blue: newColor.blue };
|
||||
lastVoxelScale = voxelDetails.s;
|
||||
if (lastVoxelScale > MAX_VOXEL_SCALE) {
|
||||
lastVoxelScale = MAX_VOXEL_SCALE;
|
||||
}
|
||||
|
||||
addVoxelSound.playRandom();
|
||||
|
||||
|
|
Loading…
Reference in a new issue