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

hetajs

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hetajs - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

5

lib/Heta2D.js

@@ -1,4 +0,1 @@

import {Heta2D} from './js/hetajs2d';
export {
Heta2D.Scene as Scene
};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var classCallCheck=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),Vec2=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;classCallCheck(this,t),this.x=e,this.y=n}return createClass(t,[{key:"clone",value:function(){return new this.constructor(this.x,this.y)}},{key:"copy",value:function(t){return this.x=t.x,this.y=t.y,this}},{key:"angle",value:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t}},{key:"distanceTo",value:function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)}},{key:"setValue",value:function(t,e){return this.x=t,this.y=e,this}},{key:"addVectors",value:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}},{key:"multiplyScalar",value:function(t){return this.x*=t,this.y*=t,this}},{key:"subVectors",value:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}},{key:"multiply",value:function(t){return this.x*=t.x,this.y*=t.y,this}},{key:"width",set:function(t){this.x=t},get:function(){return this.x}},{key:"height",get:function(){return this.y},set:function(t){this.y=t}}]),t}(),Scene=function(){function t(e,n,i){classCallCheck(this,t),this.active=!1,this.started=!1,void 0===n&&(n=function(t){setTimeout(t,40)}),this.start(n)}return createClass(t,[{key:"destroy",value:function(){this.stop()}},{key:"start",value:function(t){var e=this;this.started=!0,this.active=!0,this.updateloop=setInterval(function(){e._mainLoop()},40);var n=this;!function e(){n.active&&(t(e),n._renderLoop())}()}},{key:"_mainLoop",value:function(){this.started&&console.log("mainLoop")}},{key:"_renderLoop",value:function(){this.started&&console.log("drawAnimation")}},{key:"resume",value:function(){this.started=!0}},{key:"pause",value:function(){this.started=!1}},{key:"stop",value:function(){clearInterval(this.updateloop),this.active=!1}}]),t}();exports.Vec2=Vec2,exports.Scene=Scene;

2

package.json
{
"name": "hetajs",
"version": "0.1.2",
"version": "0.1.3",
"author": {

@@ -5,0 +5,0 @@ "name": "hetajs",

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