diff --git a/src/components/HelpModal.jsx b/src/components/HelpModal.jsx index 92e6067..914df28 100644 --- a/src/components/HelpModal.jsx +++ b/src/components/HelpModal.jsx @@ -4,21 +4,14 @@ */ import React from 'react'; -import { connect } from 'react-redux'; // import FaFacebook from 'react-icons/lib/fa/facebook'; // import FaTwitter from 'react-icons/lib/fa/twitter'; // import FaRedditAlien from 'react-icons/lib/fa/reddit-alien'; +/* eslint-disable max-len */ + import Modal from './Modal'; -import { social, MIN_COOLDOWN, BLANK_COOLDOWN } from '../core/constants'; -import type { State } from '../reducers'; - - -const linkStyle = { - textDecoration: 'none', - color: '#428bca', -}; const titleStyle = { color: '#4f545c', @@ -46,14 +39,16 @@ const textStyle = { }; -const HelpModal = ({ center }) => ( +const HelpModal = () => (

Place color pixels on a large canvas with other players online! - Cooldown is {(BLANK_COOLDOWN / 1000) | 0} seconds for fresh pixels and {(MIN_COOLDOWN / 1000) | 0}s for overwriting existing pixels! - The current canvas size is from -32768 to +32768 in x and y. + Our main canvas is a huge worldmap, you can place wherever you like, but you will have to wait a specific + Cooldown between pixels. You can check out the cooldown and requiremnts on the Canvas Selection menu (globe button on top). + Some canvases have a different cooldown for replacing a user-set pixels than placing on a unset pixel. i.e. 4s/7s means 4s on fresh + pixels and 7s on already set pixels. Higher zoomlevels take some time to update, the 3D globe gets updated at least once per day. - Have fun!

+ Have fun!

Discord: pixelplanet.fun/discord

Source on github

Reddit: r/PixelPlanetFun

@@ -65,8 +60,8 @@ const HelpModal = ({ center }) => (

GIMP Palette

The Palettes for GIMP can be found here and here. Credit for the Palette of the second planet goes to starhouse.

Detected as Proxy?

-

If you got detected as proxy, but you are none, please send us an e-mail with your IP to pixelplanetdev@gmail.com. Don't post your IP anywhere else. We are sorry for the inconvenience.

-

Controls

+

If you got detected as proxy, but you are none, please send us an e-mail with your IP to pixelplanetdev@gmail.com. Do not post your IP anywhere else. We are sorry for the inconvenience.

+

2D Controls

Click a color in palette to select

Press G to toggle grid

Press C to toggle showing of pixel activity

@@ -79,6 +74,15 @@ const HelpModal = ({ center }) => (

Pinch to zoom (on touch devices)

Pan to move (on touch devices)

Click or tab to place a pixel

+

3D Controls

+

Press W,A,S, D to move

+

Press ,,, to move

+

Scroll mouse wheel to zoom

+

Left click and drag mouse to rotate

+

Middle click and drag mouse to zoom

+

Right click and drag mouse to pan

+

Left Click to place a pixel

+

Right Click to remove a pixel

Partners: crazygames.com

This site is protected by reCAPTCHA and the Google @@ -90,9 +94,4 @@ const HelpModal = ({ center }) => ( ); -function mapStateToProps(state: State) { - const { center } = state.user; - return { center }; -} - -export default connect(mapStateToProps)(HelpModal); +export default HelpModal; diff --git a/src/controls/VoxelPainterControls.js b/src/controls/VoxelPainterControls.js index 0f3b96a..d7f5bb6 100644 --- a/src/controls/VoxelPainterControls.js +++ b/src/controls/VoxelPainterControls.js @@ -467,11 +467,11 @@ class VoxelPainterControls extends EventDispatcher { moveRight = true; break; - case 32: // space + case 69: // E moveUp = true; break; - case 16: // shift + case 67: // C moveDown = true; break; default: @@ -503,11 +503,11 @@ class VoxelPainterControls extends EventDispatcher { moveRight = false; break; - case 32: // space + case 69: // E moveUp = false; break; - case 16: // shift + case 67: // C moveDown = false; break; default: diff --git a/src/core/constants.js b/src/core/constants.js index 4b8f798..df9b409 100644 --- a/src/core/constants.js +++ b/src/core/constants.js @@ -87,9 +87,3 @@ export const MINUTE = 60 * SECOND; export const HOUR = 60 * MINUTE; export const DAY = 24 * HOUR; export const MONTH = 30 * DAY; - -/* export const BLANK_COOLDOWN = 10 * SECOND; -export const MIN_COOLDOWN = 30 * SECOND; */ - -export const BLANK_COOLDOWN = 3 * SECOND; -export const MIN_COOLDOWN = 15 * SECOND; diff --git a/src/routes/api/index.js b/src/routes/api/index.js index 85fdd47..fee7c9e 100644 --- a/src/routes/api/index.js +++ b/src/routes/api/index.js @@ -15,7 +15,6 @@ import { MINUTE, SECOND, DAY, - BLANK_COOLDOWN, } from '../../core/constants'; import me from './me'; diff --git a/src/socket/ProtocolClient.js b/src/socket/ProtocolClient.js index 5e222fa..b8df71d 100644 --- a/src/socket/ProtocolClient.js +++ b/src/socket/ProtocolClient.js @@ -79,13 +79,12 @@ class ProtocolClient extends EventEmitter { this.isConnected = true; this.emit('open', {}); this.requestChatHistory(); - console.log(`Register ${chunks.length} chunks`); - // TODO RegisterMultipleChunks before RegisterCanvas doesn't make sense - this.ws.send(RegisterMultipleChunks.dehydrate(chunks)); + this.processMsgQueue(); if (this.canvasId !== null) { this.ws.send(RegisterCanvas.dehydrate(this.canvasId)); } - this.processMsgQueue(); + console.log(`Register ${chunks.length} chunks`); + this.ws.send(RegisterMultipleChunks.dehydrate(chunks)); } onError(err) { @@ -106,6 +105,7 @@ class ProtocolClient extends EventEmitter { } console.log('Notify websocket server that we changed canvas'); this.canvasId = canvasId; + chunks.length = 0; this.sendWhenReady(RegisterCanvas.dehydrate(this.canvasId)); } diff --git a/src/ui/Renderer3D.js b/src/ui/Renderer3D.js index c13f75f..f1e5493 100644 --- a/src/ui/Renderer3D.js +++ b/src/ui/Renderer3D.js @@ -134,7 +134,9 @@ class Renderer { this.plane.position.y = -0.1; // renderer - const threeRenderer = new THREE.WebGLRenderer({ antialias: true }); + const threeRenderer = new THREE.WebGLRenderer({ + preserveDrawingBuffer: true, + }); threeRenderer.setPixelRatio(window.devicePixelRatio); threeRenderer.setSize(window.innerWidth, window.innerHeight); document.body.appendChild(threeRenderer.domElement);