Skip to content

NativeScript plugin that add a view that can be rotated in 3d i.e around x ,y or z.

License

Notifications You must be signed in to change notification settings

hamdiwanis/nativescript-rotate-3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NativeScript Rotate3D

This is a nativescript plugin to add 3d rotaion (i.e around X, Y and Z).

Installation

tns plugin add nativescript-rotate-3d

Example

<Rotate3D rotate="40" rotateAxis="Y" cameraDistance="2000">
     /* Whatever you want */
</Rotate3D>

Angular

Add this to app.module.ts so you can use a Gradient tag in the view:

import { registerElement } from "nativescript-angular";
registerElement("Rotate3D", () => require("nativescript-rotate-3d").Rotate3D);

Usage

Since we're subclassing StackLayout, you can add <Rotate3D> to your view at any place where you'd otherwise use a StackLayout.

In addition to any properties you can already set on a StackLayout you should add:

Param Description default
rotateAxis the axis whic the view will rotate around (X, Y, Z) Z
cameraDistance the distance between the view and view camera 2000

Next

  • implement rotaion in X, Y, Z.
  • handel animation using view animate method.
  • improve procpective relation between ios and android.

Contribute

if you want to help improve the plugin you can consider it yours and make as PRs as you want :)

Get Help

Please, use github issues strictly for reporting bugs or requesting features.

Contact

Twitter: hamdiwanis
Email: hamdiwanis@hotmail.com

About

NativeScript plugin that add a view that can be rotated in 3d i.e around x ,y or z.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published