Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-camera

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-camera - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

22

index.js

@@ -5,7 +5,3 @@ var glm = require('gl-matrix')

var mat4 = glm.mat4
var quat = glm.quat
var scratch0 = new Float32Array(16)
var scratch1 = new Float32Array(16)
module.exports = noclip

@@ -17,3 +13,3 @@

this.position = position || vec3.create()
this.rotation = quat.create()
this.rotationX = this.rotationY = this.rotationZ = 0.0
}

@@ -23,10 +19,6 @@

if (!output) output = mat4.create()
scratch1[0] =
scratch1[1] =
scratch1[2] = 0
mat4.fromRotationTranslation(output
, quat.conjugate(scratch0, this.rotation)
, scratch1
)
mat4.rotateX(output, output, this.rotationX)
mat4.rotateY(output, output, this.rotationY)
mat4.rotateZ(output, output, this.rotationZ)
mat4.translate(output

@@ -41,3 +33,3 @@ , output

noclip.prototype.rotateX = function(angle) {
quat.rotateX(this.rotation, this.rotation, angle)
this.rotationX += angle
return this

@@ -47,3 +39,3 @@ }

noclip.prototype.rotateY = function(angle) {
quat.rotateY(this.rotation, this.rotation, angle)
this.rotationY += angle
return this

@@ -53,4 +45,4 @@ }

noclip.prototype.rotateZ = function(angle) {
quat.rotateZ(this.rotation, this.rotation, angle)
this.rotationZ += angle
return this
}
{
"name": "basic-camera",
"version": "0.0.1",
"version": "1.0.0",
"description": "A very basic camera for use in WebGL projects",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc