1.2.1 • Published 9 months ago

anim-3d-obj v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

React Typescript Cuboid Builder

This project allows a user to create Cuboids of any size simply by entering a set of parameters.
The program does the leg work with regard to calculating translationZ depth and config on the fly.

Examples

** ANIMATIONS

  • fadeInkf: fade object in from 0 to 1 Opacity: demo
  • floatX: float object so is not stationary: demo
  • floatShadow: float object + add shadow: demo
  • pulseSM: pulse object Small: demo
  • pulseMD: pulse object Medium: demo
  • pulseLG: pulse object Large: demo
  • swing: Swing component: demo
  • swingDecay: Swing component with decay: demo
  • noAnim: no animation place holder

X-AXIS Animations

  • X360: rotate 360 degrees on the x-axis: demo
  • wobX: wobble on x-axis (degreesHi <-> degreesLow): demo
  • fwdx018: spin object on x-axis from 0 degrees to 180 degrees: demo
  • fwdx1836: spin object on x-axis from 180 degrees to 360 degrees: demo
  • fwdx09: spin object on x-axis from 0 degrees to 90 degrees: demo
  • fwdx918: spin object on x-axis from 90 degrees to 180 degrees: demo
  • fwdx1827: spin object on x-axis from 180 degrees to 270 degrees: demo
  • fwdx2736: spin object on x-axis from 270 degrees to 360 degrees: demo

Y-AXIS Animations

  • Y360: rotate 360 degrees on the y-axis: demo
  • wobY: wobble on y-axis (degreesHi <-> degreesLow): demo
  • fwdy018: spin object on y-axis from 0 degrees to 180 degrees: demo
  • fwdy1836: spin object on y-axis from 180 degrees to 360 degrees: demo
  • fwdy09: spin object on y-axis from 0 degrees to 90 degrees: demo
  • fwdy918: spin object on y-axis from 90 degrees to 180 degrees: demo
  • fwdy1827: spin object on y-axis from 180 degrees to 270 degrees: demo
  • fwdy2736: spin object on y-axis from 270 degrees to 360 degrees: demo

Config

Animations:

Animations are optional. Either or both of anim1 or anim2 can be applied to the component. Animations are applied to 2 wrapping divs respectively.

const anim1 = {
   border: "", // while testing reveal the animation wrapper
   degreesHi: -45, // degrees if spin
   degreesLow: 45, // degrees if spin
   delay: 0, // start delay in seconds
   direction: "normal", //normal alternating reverse
   duration: 8, // seconds
   fillMode: "forwards", // none forwards backwards both
   iterationCount: "infinite", // number or infinte
   name: "Y360", // ** ANIMATIONS (above)
   timing: "ease-in-out", // linear ease ease-in-out
};

Faces:

This is an array of objects containing the face used for a given component

   export interface FaceType {
      name?: string; // front,back,left,right,top,top_rear,top_front,bottom,bottom_rear,bottom_front
      css?: string | undefined;
      body?: any; // can be JSX Component | string | number
   }

   const faces: FaceType[] = [
      {
         name: "back",
         body: "BACK",
         css: `background:rgba(22,22,22,.5)`,
      },
      {
         name: "right",
         body: "RIGHT",
         css: `background:rgba(220,220,220,.5); 
               border:1px solid #ddd`,
      },
   ];

Global (face):

If the name parameter in the faces array is indicated (ie: "front") but css and / or body are not. The global default(below) will satisfy those parameters.

   interface GlobalType {
      css?: string;
      body?: string;
   }
   const global: GlobalType = {
      body: "BODY FOR FACE WHICH DOES NOT CONTAIN BODY",
      css: 'color:red'
   };

all sides

1.2.0

9 months ago

1.2.1

9 months ago

1.1.225

9 months ago

1.1.224

9 months ago

1.2.10

9 months ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.1.74

1 year ago

1.1.73

1 year ago

1.2.9

1 year ago

1.1.72

1 year ago

1.1.71

1 year ago

1.1.70

1 year ago

1.1.69

1 year ago

1.1.68

1 year ago

1.1.67

1 year ago

1.1.66

1 year ago

1.1.65

1 year ago

1.1.64

1 year ago

1.1.63

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.1.59

1 year ago

1.1.58

1 year ago

1.1.57

1 year ago

1.1.56

1 year ago

1.1.55

1 year ago

1.1.54

1 year ago

1.1.53

1 year ago

1.1.52

1 year ago

1.1.51

1 year ago

1.1.50

1 year ago

1.1.49

1 year ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.41

1 year ago

1.1.38

1 year ago

1.1.37

1 year ago

1.1.36

1 year ago

1.1.35

1 year ago

1.1.34

1 year ago

1.1.33

2 years ago

1.1.32

2 years ago

1.1.31

2 years ago

1.1.30

2 years ago

1.1.29

2 years ago

1.1.28

2 years ago

1.1.27

2 years ago

1.1.26

2 years ago

1.1.25

2 years ago

1.1.23

2 years ago

1.1.22

2 years ago

1.1.21

2 years ago

1.1.20

2 years ago

1.1.19

2 years ago

1.1.18

2 years ago

1.1.16

2 years ago

1.1.15

2 years ago

1.1.13

2 years ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.9

2 years ago