Giter Club home page Giter Club logo

fpointcloud's People

Contributors

greeb avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

fpointcloud's Issues

Save Pos with user data only if we have it

const newPos = new Position({
x,
y,
z,
surface,
user: users[userID].mongodb_id
})
newPos.save((err) => {
// TODO:Nuxt.Server: Check duplicates in cache?
// category=Server
if (err) { console.log('DUPLICATE FIXME') }
})

Line: 53

lastSeen(users[userID])
if (flying === 0) { return } // Abort if flying
if (x === 0 && y === 0 && z === 0) { return } // Abort if 000 chord
// TODO: Save Pos with user data only if we have it
// category=Server
// const newPos = new Position({
// x,
// y,
// z,
// surface,
// user: users[userID].mongodb_id

Fix BoxHelper updates fine but wrong position

Line: 134

// this.material.blendDst = OneMinusSrcAlphaFactor
this.points = new Points(this.geometry, this.material)
this.scene.add(this.points)
// FIXME: Fix BoxHelper updates fine but wrong position
// category=Three
this.box = new BoxHelper(this.points, 0xFFFFFF)
this.box.visible = true
// this.scene.add(this.box)
this.geometry.setDrawRange(0, 0)
this.renderer = new WebGLRenderer({

Fix throttle speed by car speed

this doesn't really work atm we do (speed ^-2) * (2 * 10^7)
but that doesn't scale really well for all number especially low ones

@const speedo This variable is the speed we should throttle at

*/

Line: 23

const userId = idFromIp(ip)
/**
* TODO: Fix throttle speed by car speed
* this doesn't really work atm we do (speed ^-2) * (2 * 10^7)
* but that doesn't scale really well for all number especially low ones
*
* @const speedo This variable is the speed we should throttle at
*
* */

We flip cordinate system here to line up with our three scene there probably is a better way

Could also be we fuck up when saving this data earlier idk

Line: 301

terrainRGB = [205 / 255, 205 / 255, 205 / 255]
}
/**
* TODO: We flip cordinate system here to line up with our three scene there probably is a better way
* Could also be we fuck up when saving this data earlier idk
**/
const xyz = [
parseFloat(posData.x / 20),
parseFloat(posData.z / 20),
parseFloat(posData.y / 20)
]

Dont read auth from here read from callback

const socket = io.connect('http://localhost:9000');
socket.on('connect', () => {
socket
.emit('authenticate', { token: jwt }) //send the jwt
.on('authenticated', () => {
//do other things
})
.on('unauthorized', (msg) => {
console.log(unauthorized: ${JSON.stringify(msg.data)});
throw new Error(msg.data.type);
})
});
const cookie = JSON.stringify({loggedIn: fasle})

Line: 56

mounted () {
// TODO: Move Socket logic and handle reconnection if unsuccessfully connection
// category=Three
// FIXME: Dont read auth from here read from callback
// const socket = io.connect('http://localhost:9000');
// socket.on('connect', () => {
// socket
// .emit('authenticate', { token: jwt }) //send the jwt
// .on('authenticated', () => {
// //do other things
// })

Change shape can be done with a texture but not cool maybe shader? not sure what any paras do

Line: 118

this.geometry.setAttribute('position', new Float32BufferAttribute(positions, 3))
this.geometry.setAttribute('color', new Float32BufferAttribute(this.colors.default, 3))
// TODO: Change shape can be done with a texture but not cool maybe shader? not sure what any paras do
// category=Three
this.material = new PointsMaterial({
size: 20,
vertexColors: true
// blending: AdditiveBlending,
// transparent: true,
// sizeAttenuation: true,

No idea if this is right way to do things or if we need to recheck this everytime with middleware

Line: 25

})
io.use(function (socket, next) {
console.log(socket)
// TODO: No idea if this is right way to do things or if we need to recheck this everytime with middleware
const authtoken = socket.handshake.headers.cookie.split(' ')[1]
const token = authtoken.split('=')[1].slice(0, -1)
if (token === 'false') {
console.log('token is false')
socket.decoded = false
next()
} else {

update client data only every x seconds or something else completely

Line: 205

this.animate()
},
methods: {
// TODO: update client data only every x seconds or something else completely
// category=Three
addPoint2Store () {
// this.$store.commit('points/increment')
},
addPoint (xyz, heightRGB, terrainRGB) {
const positions = this.points.geometry.attributes.position.array
const defaultColor = this.points.geometry.attributes.color.array

Add data to users[id]

Line: 68

users[userId].udp = {}
users[userId].udp.lastSeen = null
users[userId].udp.firstSeen = Date.now()
// TODO: Add data to users[id]
consola.log('udpClient: client found in db')
} else {
// if user online
if ((userId in users)){
io.to(users[userId].socket.id).emit('registerUdp')
}
consola.log('udpClient: client not found in db')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.