Minor changes and add favicon
This commit is contained in:
parent
34dae300da
commit
e7f9007b23
18 changed files with 28 additions and 44 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "declared-server",
|
"name": "declared-server",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"description": "Game server for decla.red",
|
"description": "Game server for decla.red",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
|
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ export class PlayerCharacterPhysical
|
||||||
this.movementActions.push(c);
|
this.movementActions.push(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
private addKill() {
|
public addKill() {
|
||||||
this.killCount++;
|
this.killCount++;
|
||||||
this.remoteCall('setKillCount', this.killCount);
|
this.remoteCall('setKillCount', this.killCount);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "decla.red-frontend",
|
"name": "decla.red-frontend",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
|
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
|
||||||
"sideEffects": [
|
"sideEffects": [
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,12 @@
|
||||||
<meta name="theme-color" content="#b33951" />
|
<meta name="theme-color" content="#b33951" />
|
||||||
<meta
|
<meta
|
||||||
name="description"
|
name="description"
|
||||||
content="Conquer the planets, work as part of a team, and play with your friends online through this browser game."
|
content="Conquer the planets, work as a team, and play with your friends online through this browser game."
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
<link rel="apple-touch-icon" sizes="180x180" href="static/apple-touch-icon.png" />
|
||||||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
<link rel="icon" type="image/png" sizes="32x32" href="static/favicon-32x32.png" />
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="static/favicon-16x16.png" />
|
||||||
|
|
||||||
<title>decla.red</title>
|
<title>decla.red</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ import { ProjectileView } from './scripts/objects/projectile-view';
|
||||||
import { PlanetView } from './scripts/objects/planet-view';
|
import { PlanetView } from './scripts/objects/planet-view';
|
||||||
import './main.scss';
|
import './main.scss';
|
||||||
import '../static/og-image.png';
|
import '../static/og-image.png';
|
||||||
|
import '../static/favicons/apple-touch-icon.png';
|
||||||
|
import '../static/favicons/favicon-16x16.png';
|
||||||
|
import '../static/favicons/favicon-32x32.png';
|
||||||
|
import '../static/favicons/favicon.ico';
|
||||||
import { LandingPageBackground } from './scripts/landing-page-background';
|
import { LandingPageBackground } from './scripts/landing-page-background';
|
||||||
import { JoinFormHandler } from './scripts/join-form-handler';
|
import { JoinFormHandler } from './scripts/join-form-handler';
|
||||||
import { handleFullScreen } from './scripts/handle-full-screen';
|
import { handleFullScreen } from './scripts/handle-full-screen';
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,6 @@
|
||||||
import { vec2 } from 'gl-matrix';
|
import { vec2 } from 'gl-matrix';
|
||||||
import { Renderer } from 'sdf-2d';
|
import { Renderer } from 'sdf-2d';
|
||||||
import {
|
import { CharacterBase, CharacterTeam, Circle, Id, settings } from 'shared';
|
||||||
CharacterBase,
|
|
||||||
CharacterTeam,
|
|
||||||
Circle,
|
|
||||||
Id,
|
|
||||||
settings,
|
|
||||||
UpdateMessage,
|
|
||||||
} from 'shared';
|
|
||||||
|
|
||||||
import { BlobShape } from '../shapes/blob-shape';
|
import { BlobShape } from '../shapes/blob-shape';
|
||||||
import { ViewObject } from './view-object';
|
import { ViewObject } from './view-object';
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { vec2, vec3 } from 'gl-matrix';
|
import { vec2, vec3 } from 'gl-matrix';
|
||||||
import { CircleLight, Renderer } from 'sdf-2d';
|
import { CircleLight, Renderer } from 'sdf-2d';
|
||||||
import { CommandExecutors, Id, LampBase, UpdateMessage } from 'shared';
|
import { CommandExecutors, Id, LampBase } from 'shared';
|
||||||
import { RenderCommand } from '../commands/types/render';
|
import { RenderCommand } from '../commands/types/render';
|
||||||
import { ViewObject } from './view-object';
|
import { ViewObject } from './view-object';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { vec2 } from 'gl-matrix';
|
import { vec2 } from 'gl-matrix';
|
||||||
import { CircleLight, ColorfulCircle, Renderer } from 'sdf-2d';
|
import { CircleLight, ColorfulCircle, Renderer } from 'sdf-2d';
|
||||||
import { CharacterTeam, Id, ProjectileBase, settings, UpdateMessage } from 'shared';
|
import { CharacterTeam, Id, ProjectileBase, settings } from 'shared';
|
||||||
import { ViewObject } from './view-object';
|
import { ViewObject } from './view-object';
|
||||||
|
|
||||||
export class ProjectileView extends ProjectileBase implements ViewObject {
|
export class ProjectileView extends ProjectileBase implements ViewObject {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { Renderer } from 'sdf-2d';
|
import { Renderer } from 'sdf-2d';
|
||||||
import { GameObject, UpdateMessage } from 'shared';
|
import { GameObject } from 'shared';
|
||||||
|
|
||||||
export interface ViewObject extends GameObject {
|
export interface ViewObject extends GameObject {
|
||||||
step(deltaTimeInMilliseconds: number): void;
|
step(deltaTimeInMilliseconds: number): void;
|
||||||
|
|
|
||||||
BIN
frontend/static/favicons/apple-touch-icon.png
Normal file
BIN
frontend/static/favicons/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
frontend/static/favicons/favicon-16x16.png
Normal file
BIN
frontend/static/favicons/favicon-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 553 B |
BIN
frontend/static/favicons/favicon-32x32.png
Normal file
BIN
frontend/static/favicons/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
frontend/static/favicons/favicon.ico
Normal file
BIN
frontend/static/favicons/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
|
|
@ -7,8 +7,6 @@ const TerserJSPlugin = require('terser-webpack-plugin');
|
||||||
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
|
const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin');
|
||||||
const Sass = require('sass');
|
const Sass = require('sass');
|
||||||
|
|
||||||
//const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
devServer: {
|
devServer: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
|
|
@ -34,9 +32,6 @@ module.exports = {
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
//new FaviconsWebpackPlugin('static/logo.svg'),
|
|
||||||
// Multi threading typescript loader configuration with caching for .ts and .tsx files
|
|
||||||
// see https://github.com/namics/webpack-config-plugins/tree/master/packages/ts-config-webpack-plugin/config
|
|
||||||
new TsConfigWebpackPlugin(),
|
new TsConfigWebpackPlugin(),
|
||||||
],
|
],
|
||||||
optimization: {
|
optimization: {
|
||||||
|
|
@ -80,7 +75,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.mp3$/,
|
test: /\.(mp3|png)$/,
|
||||||
use: {
|
use: {
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
query: {
|
query: {
|
||||||
|
|
@ -89,6 +84,16 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.ico$/,
|
||||||
|
use: {
|
||||||
|
loader: 'file-loader',
|
||||||
|
query: {
|
||||||
|
outputPath: '/',
|
||||||
|
name: '[name].[ext]',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /og-image.png$/,
|
test: /og-image.png$/,
|
||||||
use: {
|
use: {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ export * from './transport/serialization/serializable';
|
||||||
export * from './transport/serialization/override-deserialization';
|
export * from './transport/serialization/override-deserialization';
|
||||||
export * from './objects/types/character-base';
|
export * from './objects/types/character-base';
|
||||||
export * from './objects/types/character-team';
|
export * from './objects/types/character-team';
|
||||||
export * from './objects/update-message';
|
|
||||||
export * from './objects/types/player-character-base';
|
export * from './objects/types/player-character-base';
|
||||||
export * from './objects/types/lamp-base';
|
export * from './objects/types/lamp-base';
|
||||||
export * from './objects/types/planet-base';
|
export * from './objects/types/planet-base';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
export enum InterpolationType {
|
|
||||||
flat = 'flat',
|
|
||||||
linear = 'linear',
|
|
||||||
linearRotation = 'linearRotation',
|
|
||||||
}
|
|
||||||
|
|
@ -17,6 +17,8 @@ export class CharacterBase extends GameObject {
|
||||||
super(id);
|
super(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public onShoot(strength: number) {}
|
||||||
|
|
||||||
public toArray(): Array<any> {
|
public toArray(): Array<any> {
|
||||||
const { id, team, health, head, leftFoot, rightFoot } = this;
|
const { id, team, health, head, leftFoot, rightFoot } = this;
|
||||||
return [id, team, health, head, leftFoot, rightFoot];
|
return [id, team, health, head, leftFoot, rightFoot];
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
import { serializable } from '../transport/serialization/serializable';
|
|
||||||
import { InterpolationType } from './interpolation-type';
|
|
||||||
|
|
||||||
@serializable
|
|
||||||
export class UpdateMessage {
|
|
||||||
constructor(
|
|
||||||
public key: string,
|
|
||||||
public value: any,
|
|
||||||
public interpolationType?: InterpolationType,
|
|
||||||
) {}
|
|
||||||
|
|
||||||
public toArray(): Array<any> {
|
|
||||||
return [this.key, this.value, this.interpolationType];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue