mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Merge branch 'archive' into archive-update-v0.54.0
This commit is contained in:
@@ -30,6 +30,8 @@ creator(s):
|
|||||||
SC (https://0somecunt0.tumblr.com/tagged/sfw)
|
SC (https://0somecunt0.tumblr.com/tagged/sfw)
|
||||||
SailorDolpin (https://vk.com/id324582699)
|
SailorDolpin (https://vk.com/id324582699)
|
||||||
Deeraw (https://www.deviantart.com/deerdraw, https://twitter.com/TheOnlyDeeraw)
|
Deeraw (https://www.deviantart.com/deerdraw, https://twitter.com/TheOnlyDeeraw)
|
||||||
|
Aviivix
|
||||||
|
SnowFl8keAnge1
|
||||||
|
|
||||||
|
|
||||||
Pony Town's art assets are released under the CC BY-NC 4.0 non-commercial license.
|
Pony Town's art assets are released under the CC BY-NC 4.0 non-commercial license.
|
||||||
|
|||||||
@@ -338,6 +338,15 @@ Read more about it [here](https://stackoverflow.com/questions/1139762/ignore-fil
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### Pony.Town v0.54.0
|
||||||
|
- Added a separate logo file for Visit Pony Town button
|
||||||
|
- Fixed users not being able to close actions menu in some cases
|
||||||
|
- Fixed torch flames having wrong outlines in some cases
|
||||||
|
- Fixed lights sometimes popping up through ponies
|
||||||
|
- Fixed lights being visible through pony eyeshadows
|
||||||
|
- Fixed lights of held items flickering for some users
|
||||||
|
- Updated credits
|
||||||
|
|
||||||
### Pony.Town v0.53.2
|
### Pony.Town v0.53.2
|
||||||
- Added changes from Pony.Town update v0.53.2 (https://pony.town/about)
|
- Added changes from Pony.Town update v0.53.2 (https://pony.town/about)
|
||||||
- Updated readme with further instructions on updating server and adding assets
|
- Updated readme with further instructions on updating server and adding assets
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pony-town",
|
"name": "pony-town",
|
||||||
"version": "0.53.2",
|
"version": "0.54.0",
|
||||||
"description": "A game of ponies building a town",
|
"description": "A game of ponies building a town",
|
||||||
"main": "pony-town.js",
|
"main": "pony-town.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -127,6 +127,8 @@ export const CONTRIBUTORS: Contributors[] = [
|
|||||||
{ name: 'SC', links: ['https://0somecunt0.tumblr.com/tagged/sfw'] },
|
{ name: 'SC', links: ['https://0somecunt0.tumblr.com/tagged/sfw'] },
|
||||||
{ name: 'SailorDolpin', links: ['https://vk.com/id324582699'] },
|
{ name: 'SailorDolpin', links: ['https://vk.com/id324582699'] },
|
||||||
{ name: 'Deeraw', links: ['https://www.deviantart.com/deerdraw', 'https://twitter.com/TheOnlyDeeraw'] },
|
{ name: 'Deeraw', links: ['https://www.deviantart.com/deerdraw', 'https://twitter.com/TheOnlyDeeraw'] },
|
||||||
|
{ name: 'Aviivix' },
|
||||||
|
{ name: 'SnowFl8keAnge1' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ function drawEntities(batch: PaletteSpriteBatch, entities: Entity[], camera: Cam
|
|||||||
batch.depth = depth;
|
batch.depth = depth;
|
||||||
|
|
||||||
if (entity.type === PONY_TYPE) {
|
if (entity.type === PONY_TYPE) {
|
||||||
|
batch.depth = -batch.depth;
|
||||||
drawPonyEntity(batch, entity as Pony, options);
|
drawPonyEntity(batch, entity as Pony, options);
|
||||||
entitiesDrawn++;
|
entitiesDrawn++;
|
||||||
} else if (entity.draw !== undefined) {
|
} else if (entity.draw !== undefined) {
|
||||||
|
|||||||
@@ -1740,8 +1740,8 @@ export class PonyTownGame implements Game {
|
|||||||
} else {
|
} else {
|
||||||
disposeFrameBuffer(gl, frameBuffer);
|
disposeFrameBuffer(gl, frameBuffer);
|
||||||
disposeFrameBuffer(gl, frameBuffer2);
|
disposeFrameBuffer(gl, frameBuffer2);
|
||||||
createFrameBuffer(gl, frameBuffer, width, height, false, useDepthBuffer, null);
|
createFrameBuffer(gl, frameBuffer, width, height, useDepthBuffer, null);
|
||||||
createFrameBuffer(gl, frameBuffer2, width, height, false, false, frameBuffer.depthStencilRenderbuffer);
|
createFrameBuffer(gl, frameBuffer2, width, height, false, frameBuffer.depthStencilRenderbuffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,8 +66,8 @@ export function initWebGLResources(gl: WebGLRenderingContext, paletteManager: Pa
|
|||||||
gl.disable(gl.DITHER);
|
gl.disable(gl.DITHER);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
createFrameBuffer(gl, frameBuffer, camera.w, camera.h, false, true, null);
|
createFrameBuffer(gl, frameBuffer, camera.w, camera.h, true, null);
|
||||||
createFrameBuffer(gl, frameBuffer2, camera.w, camera.h, true, false, frameBuffer.depthStencilRenderbuffer);
|
createFrameBuffer(gl, frameBuffer2, camera.w, camera.h, false, frameBuffer.depthStencilRenderbuffer);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
DEVELOPMENT && console.warn(e);
|
DEVELOPMENT && console.warn(e);
|
||||||
failedFBO = true;
|
failedFBO = true;
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export interface PaletteSpriteBatch extends SpriteBatchCommons {
|
|||||||
sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number
|
sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number
|
||||||
): void;
|
): void;
|
||||||
drawSprite(sprite: Sprite, color: number, palette: Palette | undefined, x: number, y: number): void;
|
drawSprite(sprite: Sprite, color: number, palette: Palette | undefined, x: number, y: number): void;
|
||||||
|
patchBatchDepth(batch: Batch): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isPaletteSpriteBatch(batch: SpriteBatch | PaletteSpriteBatch): batch is PaletteSpriteBatch {
|
export function isPaletteSpriteBatch(batch: SpriteBatch | PaletteSpriteBatch): batch is PaletteSpriteBatch {
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ export function drawPonyEntity(batch: PaletteSpriteBatch, pony: Pony, drawOption
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pony.batch !== undefined) {
|
if (pony.batch !== undefined) {
|
||||||
|
batch.patchBatchDepth(pony.batch);
|
||||||
batch.drawBatch(pony.batch);
|
batch.drawBatch(pony.batch);
|
||||||
} else if (pony.palettePonyInfo !== undefined) {
|
} else if (pony.palettePonyInfo !== undefined) {
|
||||||
let swimming = false;
|
let swimming = false;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
ng-template(#actionsModal)
|
ng-template(#actionsModal)
|
||||||
actions-modal((close)="closeActions()" [focusTrap]="true" (keydown)="$event.stopPropagation()")
|
actions-modal((close)="closeActions()" (notify)="actionsModalNotify()" (keydown)="$event.stopPropagation()")
|
||||||
|
|
||||||
.action-bar(
|
.action-bar(
|
||||||
[class.has-scroller]="hasScroller" [class.is-mobile]="mobile" [class.is-blurred]="blurred"
|
[class.has-scroller]="hasScroller" [class.is-mobile]="mobile" [class.is-blurred]="blurred"
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export class ActionBar {
|
|||||||
shortcuts = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='];
|
shortcuts = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='];
|
||||||
private modalRef?: BsModalRef;
|
private modalRef?: BsModalRef;
|
||||||
private _editable = false;
|
private _editable = false;
|
||||||
|
private isWaitingForActionsModal = false;
|
||||||
constructor(private game: PonyTownGame, private settings: SettingsService, private modalService: BsModalService) {
|
constructor(private game: PonyTownGame, private settings: SettingsService, private modalService: BsModalService) {
|
||||||
}
|
}
|
||||||
@Input() get editable() {
|
@Input() get editable() {
|
||||||
@@ -74,19 +75,32 @@ export class ActionBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
openActions() {
|
openActions() {
|
||||||
|
if (this.isWaitingForActionsModal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.modalRef) {
|
if (this.modalRef) {
|
||||||
this.closeActions();
|
this.closeActions();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
this.isWaitingForActionsModal = true;
|
||||||
this.modalRef = this.modalService.show(this.actionsModal, { ignoreBackdropClick: true });
|
this.modalRef = this.modalService.show(this.actionsModal, { ignoreBackdropClick: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closeActions() {
|
closeActions() {
|
||||||
|
if (this.isWaitingForActionsModal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.modalRef) {
|
if (this.modalRef) {
|
||||||
|
this.isWaitingForActionsModal = true;
|
||||||
this.modalRef.hide();
|
this.modalRef.hide();
|
||||||
this.modalRef = undefined;
|
this.modalRef = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
actionsModalNotify() {
|
||||||
|
this.isWaitingForActionsModal = false;
|
||||||
|
}
|
||||||
private updateFreeSlots() {
|
private updateFreeSlots() {
|
||||||
const actions = this.actions;
|
const actions = this.actions;
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ export class ActionsModal implements OnInit, OnDestroy {
|
|||||||
readonly devIcon = faCogs;
|
readonly devIcon = faCogs;
|
||||||
readonly dev = BETA;
|
readonly dev = BETA;
|
||||||
@Output() close = new EventEmitter();
|
@Output() close = new EventEmitter();
|
||||||
|
@Output() notify = new EventEmitter();
|
||||||
actions = createButtionActionActions();
|
actions = createButtionActionActions();
|
||||||
commands = createButtonCommandActions();
|
commands = createButtonCommandActions();
|
||||||
emoteAction = expressionButtonAction(createExpression(Eye.Neutral, Eye.Neutral, Muzzle.Smile));
|
emoteAction = expressionButtonAction(createExpression(Eye.Neutral, Eye.Neutral, Muzzle.Smile));
|
||||||
@@ -83,12 +84,17 @@ export class ActionsModal implements OnInit, OnDestroy {
|
|||||||
if (BETA) {
|
if (BETA) {
|
||||||
this.entityActions = getEntityNames().map(name => entityButtonAction(name));
|
this.entityActions = getEntityNames().map(name => entityButtonAction(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// not using timeout here causes some event ordering issues on mobile devices, and the modal stucks being open
|
||||||
|
// in case it still happens on some devices (unlikely), would make sense to increse the delay
|
||||||
|
setTimeout(() => this.notify.emit(), 250);
|
||||||
}
|
}
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
document.body.classList.remove('actions-modal-opened');
|
document.body.classList.remove('actions-modal-opened');
|
||||||
this.game.editingActions = false;
|
this.game.editingActions = false;
|
||||||
clearInterval(this.interval);
|
clearInterval(this.interval);
|
||||||
this.subscription && this.subscription.unsubscribe();
|
this.subscription && this.subscription.unsubscribe();
|
||||||
|
this.notify.emit();
|
||||||
}
|
}
|
||||||
ok() {
|
ok() {
|
||||||
this.close.emit();
|
this.close.emit();
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ a.btn.btn-lg.btn-pt.btn-outline-primary.btn-block.mb-2(
|
|||||||
*ngIf="enableVisitPTButton" (mouseenter)="pony.select()" (mouseout)="pony.reset()" [href]="ptLink" target="_blank"
|
*ngIf="enableVisitPTButton" (mouseenter)="pony.select()" (mouseout)="pony.reset()" [href]="ptLink" target="_blank"
|
||||||
rel="noopener noreferrer")
|
rel="noopener noreferrer")
|
||||||
.pt-logo
|
.pt-logo
|
||||||
img.pixelart.logo(revSrc="images/logo-small.png")
|
img.pixelart.logo(revSrc="images/logo-pt-small.png")
|
||||||
| {{'Visit Pony Town main server!'}}
|
| {{'Visit Pony Town main server!'}}
|
||||||
.visit-pt-pony
|
.visit-pt-pony
|
||||||
visit-pt-pony(#pony [scale]="2")
|
visit-pt-pony(#pony [scale]="2")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PaletteSpriteBatch, Sprite, Palette, SpriteBatch, SpriteSheet, Matrix2D } from '../common/interfaces';
|
import { PaletteSpriteBatch, Sprite, Palette, SpriteBatch, SpriteSheet, Matrix2D, Batch } from '../common/interfaces';
|
||||||
import { createCanvas } from '../client/canvasUtils';
|
import { createCanvas } from '../client/canvasUtils';
|
||||||
import { colorToRGBA, getR, getG, getB, getAlpha } from '../common/color';
|
import { colorToRGBA, getR, getG, getB, getAlpha } from '../common/color';
|
||||||
import { BaseStateBatch } from './baseStateBatch';
|
import { BaseStateBatch } from './baseStateBatch';
|
||||||
@@ -140,6 +140,8 @@ export class ContextSpriteBatch extends BaseStateBatch implements PaletteSpriteB
|
|||||||
}
|
}
|
||||||
flush() {
|
flush() {
|
||||||
}
|
}
|
||||||
|
patchBatchDepth(_batch : Batch) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const min = Math.min;
|
const min = Math.min;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Sprite, Palette, PaletteSpriteBatch as IPaletteSpriteBatch, Matrix2D } from '../common/interfaces';
|
import { Sprite, Palette, PaletteSpriteBatch as IPaletteSpriteBatch, Matrix2D, Batch } from '../common/interfaces';
|
||||||
import { BaseSpriteBatch, getColorFloat } from './baseSpriteBatch';
|
import { BaseSpriteBatch, getColorFloat } from './baseSpriteBatch';
|
||||||
import { colorFromRGBA, colorToFloat } from '../common/color';
|
import { colorFromRGBA, colorToFloat } from '../common/color';
|
||||||
import { createSprite } from '../client/spriteUtils';
|
import { createSprite } from '../client/spriteUtils';
|
||||||
@@ -237,4 +237,9 @@ export class PaletteSpriteBatch extends BaseSpriteBatch implements IPaletteSprit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
patchBatchDepth(batch: Batch) {
|
||||||
|
for (let i = 0; i < batch.length; i += 9) {
|
||||||
|
batch[i + 2] = this.depth;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ void main() {
|
|||||||
vColor1 = vertexColor1;
|
vColor1 = vertexColor1;
|
||||||
float depth = position.z;
|
float depth = position.z;
|
||||||
#ifdef DEPTH_BUFFERED
|
#ifdef DEPTH_BUFFERED
|
||||||
if (vColor.a < 0.975) {
|
if (depth < 0.0) {
|
||||||
|
depth = -depth;
|
||||||
|
}
|
||||||
|
else if (vColor.a < 0.975) {
|
||||||
depth = 0.0;
|
depth = 0.0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export interface FrameBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function createFrameBuffer(
|
export function createFrameBuffer(
|
||||||
gl: WebGLRenderingContext, target: FrameBuffer, width: number, height: number, useLinearMagnify: boolean,
|
gl: WebGLRenderingContext, target: FrameBuffer, width: number, height: number,
|
||||||
createDepthStencil: boolean, depthStencilRenderbuffer: WebGLRenderbuffer | null
|
createDepthStencil: boolean, depthStencilRenderbuffer: WebGLRenderbuffer | null
|
||||||
) {
|
) {
|
||||||
const handle = gl.createFramebuffer();
|
const handle = gl.createFramebuffer();
|
||||||
@@ -18,7 +18,7 @@ export function createFrameBuffer(
|
|||||||
throw new Error('Failed to create frame buffer');
|
throw new Error('Failed to create frame buffer');
|
||||||
}
|
}
|
||||||
|
|
||||||
const resources = createFrameBufferResources(gl, width, height, createDepthStencil, useLinearMagnify);
|
const resources = createFrameBufferResources(gl, width, height, createDepthStencil);
|
||||||
target.handle = handle;
|
target.handle = handle;
|
||||||
target.colorTexture = resources.colorTexture;
|
target.colorTexture = resources.colorTexture;
|
||||||
target.depthStencilRenderbuffer = resources.depthStencilRenderbuffer;
|
target.depthStencilRenderbuffer = resources.depthStencilRenderbuffer;
|
||||||
@@ -77,15 +77,12 @@ function bindFrameBufferAttachments(gl: WebGLRenderingContext, { colorTexture, d
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createFrameBufferResources(
|
function createFrameBufferResources(
|
||||||
gl: WebGLRenderingContext, width: number, height: number, createDepthBuffer: boolean, useLinearMagnify: boolean
|
gl: WebGLRenderingContext, width: number, height: number, createDepthBuffer: boolean
|
||||||
) {
|
) {
|
||||||
const colorTexture = createEmptyTexture(gl, false, width, height, gl.RGB);
|
const colorTexture = createEmptyTexture(gl, false, width, height, gl.RGB);
|
||||||
if (!colorTexture) {
|
if (!colorTexture) {
|
||||||
throw new Error('Failed to create frame buffer\'s color texture');
|
throw new Error('Failed to create frame buffer\'s color texture');
|
||||||
}
|
}
|
||||||
if (useLinearMagnify) {
|
|
||||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
||||||
}
|
|
||||||
|
|
||||||
let depthStencilRenderbuffer: WebGLRenderbuffer | null = null;
|
let depthStencilRenderbuffer: WebGLRenderbuffer | null = null;
|
||||||
if (createDepthBuffer) {
|
if (createDepthBuffer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user