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

anim8js

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anim8js - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

172

index.d.ts

@@ -1,5 +0,5 @@

import { Animator } from "anim8js";
declare module "anim8js"
declare module 'anim8js'
{
// S = Subject

@@ -13,52 +13,2 @@ // A = Attributes with strict type

export class FastMap<V>
{
public values: V[];
public keys: string[];
public indices: { [key: string]: number };
public constructor (input?: FastMap<V> | { [prop: string]: V });
public reset (): this;
public put (key: string, value: V): this;
public rekey (fromKey: string, toKey: string): this;
public putMap (map: FastMap<V>): this;
public get (key: string): V | undefined;
public remove (key: string): this;
public removeAt (index: number): this;
public indexOf (key: string): number;
public has (key: string): boolean;
public hasOverlap (map: FastMap<V>): boolean;
public size (): number
public clear (): this;
}
export class AttrimatorMap<A> extends FastMap<Attrimator<A, keyof A>>
{
public setGroup (groupId: number, force?: boolean, deep?: boolean): void;
public delay (time: number): this;
public queue<K extends keyof A> (attrimator: Attrimator<A, K>): Attrimator<A, K> | undefined;
public queueMap (map: AttrimatorMap<A>, offset: number, onNewAttribute?: <K extends keyof A>(attrimator: Attrimator<A, K>) => void, context?: object): this;
public insertMap (map: AttrimatorMap<A>, onNewAttribute?: <K extends keyof A>(attrimator: Attrimator<A, K>) => any, context?: object): this;
public unqueueAt (index: number): this;
public playMapAt (attrimatorMap: AttrimatorMap<A>, all: boolean, time: number): this;
public playAttrimatorAt (attrimator: Attrimator<A, keyof A>, time: number): void;
public transitionMap (transition: Transition, attrimatorMap: AttrimatorMap<A>, getValue: <K extends keyof A>(attr: K) => A[K], getAttribute: <K extends keyof A>(attr: K) => Attribute<A, K> | undefined, placeAttrimator: <K extends keyof A>(attrimator: Attrimator<A, K>) => Attrimator<A, K> | undefined, getValueAt: <K extends keyof A>(attrimator: Attrimator<A, K>, relativeTime: number, out: AttributesValues<A>) => A[K], stopAttrimator: <K extends keyof A>(attrimator: Attrimator<A, K>, relativeTime: number) => void, context: object): this;
public finishNotPresent (attrimatorMap: AttrimatorMap<A>, delay?: number): this;
public stopNotPresentAt (attrimatorMap: AttrimatorMap<A>, time: number): this;
public clone (): AttrimatorMap<A>;
public timeRemaining (returnInfinity?: boolean): number;
public applyCycle (nextCycle: number): number;
public iterate (callback: <K extends keyof A>(attrimator: Attrimator<A, K>, depth: number, previous?: Attrimator<A, K>) => void): this;
}
export interface Attribute<A, K extends keyof A>
{
name: K;
calculatorName: keyof CalculatorMap;
calculator: Calculator<A[K]>;
defaultValue: A[K];
parse (input: Input<A[K]>, defaultValue?: A[K]): Value<A[K]>;
cloneDefault (): A[K];
}
export type Dynamic<V> =

@@ -79,2 +29,36 @@ (() => V) |

export type Value2d = { x: number, y: number };
export type Value3d = { x: number, y: number, z: number };
export type ValueNumber = number;
export type ValueRGB = { r: number, g: number, b: number };
export type ValueRGBA = { r: number, g: number, b: number, a: number };
export type ValueString = string;
export type ValueQuat = { x: number, y: number, z: number, angle: number };
export type InputScalar<V> =
number |
string |
true |
Dynamic<V> |
Computed<V> |
(number | string)[];
export type InputObject<V> =
InputScalar<V> |
{ [P in keyof V]?: number | string };
export type Input<V> =
V extends object ? InputObject<V> : InputScalar<V>;
export type Inputs<A> =
{ [K in keyof A]?: Input<A[K]> };
export class Calculator<V>

@@ -141,36 +125,52 @@ {

export type InputScalar<V> =
number |
string |
true |
Dynamic<V> |
Computed<V> |
(number | string)[];
export class FastMap<V>
{
public values: V[];
public keys: string[];
public indices: { [key: string]: number };
export type InputObject<V> =
InputScalar<V> |
{ [P in keyof V]?: number | string };
public constructor (input?: FastMap<V> | { [prop: string]: V });
public reset (): this;
public put (key: string, value: V): this;
public rekey (fromKey: string, toKey: string): this;
public putMap (map: FastMap<V>): this;
public get (key: string): V | undefined;
public remove (key: string): this;
public removeAt (index: number): this;
public indexOf (key: string): number;
public has (key: string): boolean;
public hasOverlap (map: FastMap<V>): boolean;
public size (): number
public clear (): this;
}
export type Input<V> =
V extends object ? InputObject<V> : InputScalar<V>;
export class AttrimatorMap<A> extends FastMap<Attrimator<A, keyof A>>
{
public setGroup (groupId: number, force?: boolean, deep?: boolean): void;
public delay (time: number): this;
public queue<K extends keyof A> (attrimator: Attrimator<A, K>): Attrimator<A, K> | undefined;
public queueMap (map: AttrimatorMap<A>, offset: number, onNewAttribute?: <K extends keyof A>(attrimator: Attrimator<A, K>) => void, context?: object): this;
public insertMap (map: AttrimatorMap<A>, onNewAttribute?: <K extends keyof A>(attrimator: Attrimator<A, K>) => any, context?: object): this;
public unqueueAt (index: number): this;
public playMapAt (attrimatorMap: AttrimatorMap<A>, all: boolean, time: number): this;
public playAttrimatorAt (attrimator: Attrimator<A, keyof A>, time: number): void;
public transitionMap (transition: Transition, attrimatorMap: AttrimatorMap<A>, getValue: <K extends keyof A>(attr: K) => A[K], getAttribute: <K extends keyof A>(attr: K) => Attribute<A, K> | undefined, placeAttrimator: <K extends keyof A>(attrimator: Attrimator<A, K>) => Attrimator<A, K> | undefined, getValueAt: <K extends keyof A>(attrimator: Attrimator<A, K>, relativeTime: number, out: AttributesValues<A>) => A[K], stopAttrimator: <K extends keyof A>(attrimator: Attrimator<A, K>, relativeTime: number) => void, context: object): this;
public finishNotPresent (attrimatorMap: AttrimatorMap<A>, delay?: number): this;
public stopNotPresentAt (attrimatorMap: AttrimatorMap<A>, time: number): this;
public clone (): AttrimatorMap<A>;
public timeRemaining (returnInfinity?: boolean): number;
public applyCycle (nextCycle: number): number;
public iterate (callback: <K extends keyof A>(attrimator: Attrimator<A, K>, depth: number, previous?: Attrimator<A, K>) => void): this;
}
export type Inputs<A> =
{ [K in keyof A]?: Input<A[K]> };
export interface Attribute<A, K extends keyof A>
{
name: K;
calculatorName: keyof CalculatorMap;
calculator: Calculator<A[K]>;
defaultValue: A[K];
parse (input: Input<A[K]>, defaultValue?: A[K]): Value<A[K]>;
cloneDefault (): A[K];
}
export type Value2d = { x: number, y: number };
export type Value3d = { x: number, y: number, z: number };
export type ValueNumber = number;
export type ValueRGB = { r: number, g: number, b: number };
export type ValueRGBA = { r: number, g: number, b: number, a: number };
export type ValueString = string;
export type ValueQuat = { x: number, y: number, z: number, angle: number };
export class Animator<A = any, S = any> extends EventSource implements Animatable<A, S>

@@ -1423,3 +1423,3 @@ {

// export function path<V> (pathInput: PathInput<V>): Path<V>;
export function path<V> (pathInput: PathPointDefinition<V>): PathPoint<V>;

@@ -1452,3 +1452,4 @@ export function path<V> (pathInput: PathComboDefinition<V>): PathCombo<V>;

export const Color: {
export const Color:
{
(r?: number, g?: number, b?: number, a?: number): ValueRGBA;

@@ -1468,3 +1469,4 @@

export const computed: {
export const computed:
{
<V>(func: Computed<V>): Computed<V>;

@@ -1471,0 +1473,0 @@ <V>(name: string, func: Computed<V>): Computed<V>;

{
"name": "anim8js",
"version": "1.1.5",
"version": "1.1.6",
"description": "anim8js - Anim8 Everything",

@@ -5,0 +5,0 @@ "main": "build/anim8js.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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