Skip to content

Commit

Permalink
Create new Blue Crystal & Finish Scheduler5
Browse files Browse the repository at this point in the history
  • Loading branch information
kiking0501 committed Aug 14, 2018
1 parent a2200b5 commit aaaadf8
Show file tree
Hide file tree
Showing 5 changed files with 215 additions and 74 deletions.
3 changes: 2 additions & 1 deletion src/polyhedramatics/MusicClock.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ var MusicClock = function(center_pos, r, startAngle, majorColor, customSettings)

this.settings = {
'dim': {
'nodeRadius': this.r / 25,
'nodeRadius': setdefault(this.customSettings['dimNodeRadius'],
this.r / 25),
'edgeColor': setdefault(this.customSettings['dimEdgeColor'],
ColorMap['grey'][7]),
'edgeWidth': 1,
Expand Down
32 changes: 32 additions & 0 deletions src/polyhedramatics/Scheduler4.js
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,35 @@ var Scheduler4 = function(startTime) {
)

}

var shapeTypes = ['tetrahedron', 'dodecahedron', 'octahedron', 'cube'];
for (var i = 0; i < shapeTypes.length; i++) {
var center_pos = this.woodBlockCenterPos;
var size = Math.random()*40+10;
var majorColor = ColorMap['fullblue'][Math.floor(Math.random()*4+5)];

var crystal = new WoodBlock(
center_pos, size, tri, majorColor, shapeType
)
crystal.name = "crystal" + i;
SCENE.add(crystal);

crystal.polyRotateDuration([
Math.random()*0.01, Math.random()*0.01, Math.random()*0.01],
5
)

TweenLite.to(
crystal.poly.scale, 5,
{
x: 5,
y: 5,
z: 5,
ease: Power4.easeIn,
}
)

}
}

this.rushWoodBlockCenterAndReset = function(){
Expand All @@ -884,6 +913,9 @@ var Scheduler4 = function(startTime) {
for (var i = 0; i < 2; i++){
names.push( "planet" + i );
}
for (var i = 0; i < 4; i++){
names.push( "crystal" + i );
}
for (var i = names.length-1; i > 0; i--){
var obj = SCENE.getObjectByName(names[i]);
if (obj) {
Expand Down
Loading

0 comments on commit aaaadf8

Please sign in to comment.