Skip to content

Commit

Permalink
Merge commit 'c257da79e4e10cb8dbf856c6c01a8f6cdf9f7d66'
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmoMyzrailGorynych committed Apr 10, 2021
2 parents e22da77 + c257da7 commit 10ce4be
Show file tree
Hide file tree
Showing 38 changed files with 547 additions and 307 deletions.
48 changes: 48 additions & 0 deletions app/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@
## v1.7.0

*Sat Apr 10 2021*

### ✨ New Features

* Add custom properties modal for copies (#275 by @firecakes)
* Added map() function to ct.u (#274 by @qewer33)
* Clone projects from the starting screen

### ⚡️ General Improvements

* 🌐 Update Russian i18n file
* Add an optional "Made with ct.js" logo shown while a game is loading. Can be turned off in Project tab -> Branding section
* Add more social icons to the starting screen

### 🐛 Bug Fixes

* Fix `emitterTandem.pause()` stopping completely if called several times before calling `emitterTandem.resume()`
* Fix game's icon not being reset when its texture is deleted
* Fix page name and app color for exported games
* Fix targetX and targetY handling for cameras' boundary restrictions

### 🌐 Website

* :bug: Add the missing link to the German translation to the footer
* :zap: Add a link to Vkontakte to footer
* :zap: Update "What's next" block
* :zap: Update navigation bar

## v1.6.2

*Wed Mar 31 2021*

### ⚡️ General Improvements

* Add JS map files for pixi.js
* Update pixi.js to v5.3.8

### 🐛 Bug Fixes

* :bento: Fix 2DPhysics example

### 🐉 Misc

* Revert "Modify emitter tandems to use ParticleContainer"
This reverts commit b8a47f4273fb08e8377c5489ef8e30464bf41845.

## v1.6.1

*Sun Mar 29 2021*
Expand Down
20 changes: 12 additions & 8 deletions app/data/ct.release/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,24 @@ const Camera = (function Camera() {
};
const restrictInRect = function restrictInRect(camera) {
if (camera.minX !== void 0) {
camera.x = Math.max(camera.minX + camera.width * camera.scale.x * 0.5, camera.x);
camera.targetX = Math.max(camera.minX, camera.targetX);
const boundary = camera.minX + camera.width * camera.scale.x * 0.5;
camera.x = Math.max(boundary, camera.x);
camera.targetX = Math.max(boundary, camera.targetX);
}
if (camera.maxX !== void 0) {
camera.x = Math.min(camera.maxX - camera.width * camera.scale.x * 0.5, camera.x);
camera.targetX = Math.min(camera.maxX, camera.targetX);
const boundary = camera.maxX - camera.width * camera.scale.x * 0.5;
camera.x = Math.min(boundary, camera.x);
camera.targetX = Math.min(boundary, camera.targetX);
}
if (camera.minY !== void 0) {
camera.y = Math.max(camera.minY + camera.height * camera.scale.y * 0.5, camera.y);
camera.targetY = Math.max(camera.minY, camera.targetY);
const boundary = camera.minY + camera.height * camera.scale.y * 0.5;
camera.y = Math.max(boundary, camera.y);
camera.targetY = Math.max(boundary, camera.targetY);
}
if (camera.maxY !== void 0) {
camera.y = Math.min(camera.maxY - camera.height * camera.scale.y * 0.5, camera.y);
camera.targetY = Math.min(camera.maxY, camera.targetY);
const boundary = camera.maxY - camera.height * camera.scale.y * 0.5;
camera.y = Math.min(boundary, camera.y);
camera.targetY = Math.min(boundary, camera.targetY);
}
};
class Camera extends PIXI.DisplayObject {
Expand Down
125 changes: 67 additions & 58 deletions app/data/ct.release/ct.css
Original file line number Diff line number Diff line change
@@ -1,58 +1,67 @@
* {
margin:0;
padding:0;
border:0;
}
body {
background: #000;
font-family: sans-serif;
position: relative;
width: 100%;
height: 100vh;
}
#ct {
position: relative;
display: inline-block;
width: 100%;
height: 100%;
}
.ct-aLoadingScreen {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #446adb;
background: /*@preloaderbackground@*/;
color: #ffffff;
color: /*@preloaderforeground@*/;
z-index: 2;
}
.ct-aLoadingProgress {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 1.5rem;
font-style: italic;
padding: 1rem 2rem;
}
.ct-aLoadingBar {
content: '';
height: 0.2rem;
border-radius: 1rem;
position: absolute;
background: #446adb;
background: /*@preloaderforeground@*/;
left: 0;
bottom: 0;
transition: 1s cubic-bezier(0.31, 0.59, 0.29, 1) width;
}
.ct-aLoadingScreen.hidden {
visibility: hidden;
display: none;
}

/*@pixelatedrender@*/
/*@hidecursor@*/
/*%css%*/
* {
margin:0;
padding:0;
border:0;
}
body {
background: #000;
font-family: sans-serif;
position: relative;
width: 100%;
height: 100vh;
}
#ct {
position: relative;
display: inline-block;
width: 100%;
height: 100%;
}
.ct-aLoadingScreen {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: #446adb;
background: /*@preloaderbackground@*/;
color: #ffffff;
color: /*@preloaderforeground@*/;
z-index: 2;
}
.ct-aLoadingProgress {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-size: 1.5rem;
font-style: italic;
padding: 1rem 2rem;
text-align: center;
}
.ct-aLoadingBar {
content: '';
height: 0.2rem;
border-radius: 1rem;
position: absolute;
background: #446adb;
background: /*@preloaderforeground@*/;
left: 0;
bottom: 0;
transition: 1s cubic-bezier(0.31, 0.59, 0.29, 1) width;
}
.ct-aMadeWithImage {
margin-bottom: 1rem;
}
.ct-aMadeWithImage svg {
width: 33vw;
height: auto;
}
.ct-aLoadingScreen.hidden {
visibility: hidden;
display: none;
}

/*@pixelatedrender@*/
/*@hidecursor@*/
/*@hidemadewithctjs@*/
/*%css%*/
25 changes: 7 additions & 18 deletions app/data/ct.release/emitters.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* @property {Copy|DisplayObject} follow A copy to follow
* @extends PIXI.Container
*/
class EmitterTandem extends PIXI.ParticleContainer {
class EmitterTandem extends PIXI.Container {
/**
* Creates a new emitter tandem. This method should not be called directly;
* better use the methods of `ct.emitters`.
Expand All @@ -41,19 +41,7 @@ class EmitterTandem extends PIXI.ParticleContainer {
* @constructor
*/
constructor(tandemData, opts) {
let batchSize = 0;
for (const emt of tandemData) {
batchSize += Math.min(
emt.settings.maxParticles,
emt.settings.lifetime.max / emt.settings.frequency
);
}
super(batchSize, {
vertices: true,
position: true,
rotation: true,
tint: true
});
super();
this.emitters = [];
this.delayed = [];

Expand Down Expand Up @@ -96,7 +84,6 @@ class EmitterTandem extends PIXI.ParticleContainer {
this.deltaPosition = opts.position;
this.depth = opts.depth;
this.paused = this.frozen = false;
this.tint = opts.tint;

if (this.isUi) {
ct.emitters.uiTandems.push(this);
Expand Down Expand Up @@ -173,8 +160,10 @@ class EmitterTandem extends PIXI.ParticleContainer {
*/
pause() {
for (const emt of this.emitters) {
emt.oldMaxParticles = emt.maxParticles;
emt.maxParticles = 0;
if (emt.maxParticles !== 0) {
emt.oldMaxParticles = emt.maxParticles;
emt.maxParticles = 0;
}
}
}
/**
Expand Down Expand Up @@ -229,7 +218,7 @@ class EmitterTandem extends PIXI.ParticleContainer {
x: 1,
y: 1
},
tint: 0xff0fff,
tint: 0xffffff,
alpha: 1,
position: {
x: 0,
Expand Down
Loading

0 comments on commit 10ce4be

Please sign in to comment.