├── .editorconfig ├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── DocFXProject ├── .gitignore ├── api │ ├── .gitignore │ └── index.md ├── articles │ ├── intro.md │ └── toc.yml ├── contributing.md ├── credits.md ├── docfx.json ├── docfx_pdf.json ├── filterConfig.yml ├── getting_started.md ├── images │ ├── app_icon_navbar.png │ ├── fun_example_02.gif │ └── fun_example_04.gif ├── index.md ├── license.md ├── release_notes.md ├── templates │ └── darkfx │ │ ├── partials │ │ └── head.tmpl.partial │ │ └── styles │ │ └── main.css ├── toc.yml └── usage.md ├── Unity ├── .gitignore ├── Assets │ ├── JCMG.meta │ ├── JCMG │ │ ├── JTween.meta │ │ └── JTween │ │ │ ├── AssemblyInfo.cs │ │ │ ├── AssemblyInfo.cs.meta │ │ │ ├── Collections.meta │ │ │ ├── Collections │ │ │ ├── FastList.cs │ │ │ ├── FastList.cs.meta │ │ │ ├── ITweenCollection.cs │ │ │ ├── ITweenCollection.cs.meta │ │ │ ├── ITweenSequence.cs │ │ │ ├── ITweenSequence.cs.meta │ │ │ ├── ITweenSet.cs │ │ │ ├── ITweenSet.cs.meta │ │ │ ├── TweenCollectionBase.cs │ │ │ ├── TweenCollectionBase.cs.meta │ │ │ ├── TweenSequence.cs │ │ │ ├── TweenSequence.cs.meta │ │ │ ├── TweenSet.cs │ │ │ └── TweenSet.cs.meta │ │ │ ├── Core.meta │ │ │ ├── Core │ │ │ ├── EaseType.cs │ │ │ ├── EaseType.cs.meta │ │ │ ├── ITweenHandle.cs │ │ │ ├── ITweenHandle.cs.meta │ │ │ ├── LoopType.cs │ │ │ ├── LoopType.cs.meta │ │ │ ├── RotateMode.cs │ │ │ ├── RotateMode.cs.meta │ │ │ ├── RuntimeConstants.cs │ │ │ ├── RuntimeConstants.cs.meta │ │ │ ├── SpaceType.cs │ │ │ ├── SpaceType.cs.meta │ │ │ ├── TweenFloat1.cs │ │ │ ├── TweenFloat1.cs.meta │ │ │ ├── TweenFloat2.cs │ │ │ ├── TweenFloat2.cs.meta │ │ │ ├── TweenFloat3.cs │ │ │ ├── TweenFloat3.cs.meta │ │ │ ├── TweenFloat4.cs │ │ │ ├── TweenFloat4.cs.meta │ │ │ ├── TweenHandle.cs │ │ │ ├── TweenHandle.cs.meta │ │ │ ├── TweenHandleAction.cs │ │ │ ├── TweenHandleAction.cs.meta │ │ │ ├── TweenHandleActionType.cs │ │ │ ├── TweenHandleActionType.cs.meta │ │ │ ├── TweenLifetime.cs │ │ │ ├── TweenLifetime.cs.meta │ │ │ ├── TweenRotation.cs │ │ │ ├── TweenRotation.cs.meta │ │ │ ├── TweenSpaceType.cs │ │ │ ├── TweenSpaceType.cs.meta │ │ │ ├── TweenStateType.cs │ │ │ ├── TweenStateType.cs.meta │ │ │ ├── TweenTransformBatchState.cs │ │ │ ├── TweenTransformBatchState.cs.meta │ │ │ ├── TweenTransformState.cs │ │ │ ├── TweenTransformState.cs.meta │ │ │ ├── TweenTransformType.cs │ │ │ └── TweenTransformType.cs.meta │ │ │ ├── Documentation.meta │ │ │ ├── Documentation │ │ │ ├── JTween.pdf │ │ │ ├── JTween.pdf.meta │ │ │ ├── JTween_api.pdf │ │ │ ├── JTween_api.pdf.meta │ │ │ ├── release_notes.txt │ │ │ └── release_notes.txt.meta │ │ │ ├── Editor.meta │ │ │ ├── Editor │ │ │ ├── EditorConstants.cs │ │ │ ├── EditorConstants.cs.meta │ │ │ ├── JCMG.JTween.Editor.asmdef │ │ │ ├── JCMG.JTween.Editor.asmdef.meta │ │ │ ├── MenuItems.cs │ │ │ ├── MenuItems.cs.meta │ │ │ ├── Tests.meta │ │ │ └── Tests │ │ │ │ ├── FastListTests.cs │ │ │ │ ├── FastListTests.cs.meta │ │ │ │ ├── JCMG.JTween.Editor.Tests.asmdef │ │ │ │ ├── JCMG.JTween.Editor.Tests.asmdef.meta │ │ │ │ ├── StructSizeTests.cs │ │ │ │ └── StructSizeTests.cs.meta │ │ │ ├── Engine.meta │ │ │ ├── Engine │ │ │ ├── Singleton.cs │ │ │ └── Singleton.cs.meta │ │ │ ├── Extensions.meta │ │ │ ├── Extensions │ │ │ ├── ArrayExtensions.cs │ │ │ ├── ArrayExtensions.cs.meta │ │ │ ├── GameObjectExtensions.cs │ │ │ ├── GameObjectExtensions.cs.meta │ │ │ ├── TransformExtensions.cs │ │ │ └── TransformExtensions.cs.meta │ │ │ ├── JCMG.JTween.asmdef │ │ │ ├── JCMG.JTween.asmdef.meta │ │ │ ├── JTweenControl.cs │ │ │ ├── JTweenControl.cs.meta │ │ │ ├── JTweenControl.meta │ │ │ ├── JTweenControl │ │ │ ├── JTweenControl_BatchTransforms.cs │ │ │ ├── JTweenControl_BatchTransforms.cs.meta │ │ │ ├── JTweenControl_Collections.cs │ │ │ ├── JTweenControl_Collections.cs.meta │ │ │ ├── JTweenControl_Transform.cs │ │ │ └── JTweenControl_Transform.cs.meta │ │ │ ├── JobRunners.meta │ │ │ ├── JobRunners │ │ │ ├── BatchTransformTweener.cs │ │ │ ├── BatchTransformTweener.cs.meta │ │ │ ├── SingleTransformTweener.cs │ │ │ ├── SingleTransformTweener.cs.meta │ │ │ ├── TransformTweenerBase.cs │ │ │ ├── TransformTweenerBase.cs.meta │ │ │ ├── TweenerBase.cs │ │ │ └── TweenerBase.cs.meta │ │ │ ├── Jobs.meta │ │ │ ├── Jobs │ │ │ ├── ApplyTweenToTransformJob.cs │ │ │ ├── ApplyTweenToTransformJob.cs.meta │ │ │ ├── ProcessBatchJob.cs │ │ │ ├── ProcessBatchJob.cs.meta │ │ │ ├── ProcessTweenJob.cs │ │ │ └── ProcessTweenJob.cs.meta │ │ │ ├── Tools.meta │ │ │ └── Tools │ │ │ ├── JTweenTools.cs │ │ │ └── JTweenTools.cs.meta │ ├── PackageManifests.meta │ ├── PackageManifests │ │ ├── Generated.meta │ │ ├── Generated │ │ │ ├── d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb.meta │ │ │ └── d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb │ │ │ │ ├── package.json │ │ │ │ └── package.json.meta │ │ ├── PackageManifestConfig.asset │ │ └── PackageManifestConfig.asset.meta │ ├── SampleContent.meta │ ├── SampleContent │ │ ├── SampleContent.asmdef │ │ ├── SampleContent.asmdef.meta │ │ ├── Scenes.meta │ │ ├── Scenes │ │ │ ├── 01_Movement.unity │ │ │ ├── 01_Movement.unity.meta │ │ │ ├── 02_Rotation.unity │ │ │ ├── 02_Rotation.unity.meta │ │ │ ├── 03_Scaling.unity │ │ │ ├── 03_Scaling.unity.meta │ │ │ ├── 04_Batching.unity │ │ │ ├── 04_Batching.unity.meta │ │ │ ├── 05_Events.unity │ │ │ ├── 05_Events.unity.meta │ │ │ ├── 06_TweenHandle.unity │ │ │ ├── 06_TweenHandle.unity.meta │ │ │ ├── 07_TweenCollections.unity │ │ │ ├── 07_TweenCollections.unity.meta │ │ │ ├── XX_PerformanceTesting.unity │ │ │ └── XX_PerformanceTesting.unity.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ │ ├── Examples.meta │ │ │ ├── Examples │ │ │ ├── BatchTweenEventExample.cs │ │ │ ├── BatchTweenEventExample.cs.meta │ │ │ ├── BatchingExample.cs │ │ │ ├── BatchingExample.cs.meta │ │ │ ├── LocalMovementExample.cs │ │ │ ├── LocalMovementExample.cs.meta │ │ │ ├── LocalRotationExample.cs │ │ │ ├── LocalRotationExample.cs.meta │ │ │ ├── ScalingExample.cs │ │ │ ├── ScalingExample.cs.meta │ │ │ ├── SingleTweenEventExample.cs │ │ │ ├── SingleTweenEventExample.cs.meta │ │ │ ├── TweenCollectionsExample.cs │ │ │ ├── TweenCollectionsExample.cs.meta │ │ │ ├── TweenHandleExample.cs │ │ │ ├── TweenHandleExample.cs.meta │ │ │ ├── WorldMovementExample.cs │ │ │ ├── WorldMovementExample.cs.meta │ │ │ ├── WorldRotationExample.cs │ │ │ └── WorldRotationExample.cs.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── Color01.mat │ │ │ ├── Color01.mat.meta │ │ │ ├── Color02.mat │ │ │ ├── Color02.mat.meta │ │ │ ├── Color03.mat │ │ │ └── Color03.mat.meta │ │ │ ├── PerformanceTesting.meta │ │ │ └── PerformanceTesting │ │ │ ├── JTweenTester.cs │ │ │ ├── JTweenTester.cs.meta │ │ │ ├── TweenTesterBase.cs │ │ │ └── TweenTesterBase.cs.meta │ ├── csc.rsp │ └── csc.rsp.meta ├── JCMG.JTween.csproj.DotSettings ├── Packages │ └── manifest.json ├── ProjectSettings │ ├── AudioManager.asset │ ├── BurstAotSettings_Android.json │ ├── BurstAotSettings_StandaloneWindows.json │ ├── BurstAotSettings_iOS.json │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ └── XRSettings.asset └── SampleContent.csproj.DotSettings ├── docs ├── api │ ├── JCMG.JTween.ArrayExtensions.html │ ├── JCMG.JTween.EaseType.html │ ├── JCMG.JTween.ITweenCollection.html │ ├── JCMG.JTween.ITweenHandle.html │ ├── JCMG.JTween.ITweenSequence.html │ ├── JCMG.JTween.ITweenSet.html │ ├── JCMG.JTween.JTweenControl.html │ ├── JCMG.JTween.LoopType.html │ ├── JCMG.JTween.RotateMode.html │ ├── JCMG.JTween.Singleton-1.html │ ├── JCMG.JTween.SpaceType.html │ ├── JCMG.JTween.TransformExtensions.html │ ├── JCMG.JTween.html │ ├── index.html │ └── toc.html ├── articles │ ├── intro.html │ └── toc.html ├── contributing.html ├── credits.html ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── getting_started.html ├── images │ ├── app_icon_navbar.png │ ├── fun_example_02.gif │ └── fun_example_04.gif ├── index.html ├── index.json ├── license.html ├── logo.svg ├── manifest.json ├── release_notes.html ├── search-stopwords.json ├── styles │ ├── docfx.css │ ├── docfx.js │ ├── docfx.vendor.css │ ├── docfx.vendor.js │ ├── lunr.js │ ├── lunr.min.js │ ├── main.css │ ├── main.js │ └── search-worker.js ├── toc.html ├── usage.html └── xrefmap.yml ├── license.md ├── license.txt └── readme.md /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | indent_style = tab 3 | indent_size = 4 4 | end_of_line = lf 5 | trim_trailing_whitespace = true 6 | insert_final_newline = true -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | *.cs eol=lf 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.cs text 7 | *.md text 8 | *.meta text 9 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | # github: [jeffcampbellmakesgames] 3 | ko_fi: stampyturtle 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | 3 | [Bb]uilds/ -------------------------------------------------------------------------------- /DocFXProject/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | ./Docs 10 | -------------------------------------------------------------------------------- /DocFXProject/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | .manifest 6 | -------------------------------------------------------------------------------- /DocFXProject/api/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/DocFXProject/api/index.md -------------------------------------------------------------------------------- /DocFXProject/articles/intro.md: -------------------------------------------------------------------------------- 1 | # Add your introductions here! 2 | -------------------------------------------------------------------------------- /DocFXProject/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: intro.md 3 | -------------------------------------------------------------------------------- /DocFXProject/contributing.md: -------------------------------------------------------------------------------- 1 | Thanks for considering contributing to JTween! Read the guidelines below before you submit an issue or create a PR. 2 | 3 | # Project structure 4 | The project structure is split between several branches 5 | * **master:** This is the stable branch and all releases/packages are generated from this. 6 | * **develop:** This is the primary development branch which all PRs should be made to and is generally considered less-stable. This is occasionally merged into **master** and a new release tag/package is generated from this. 7 | * **releases/stable:** This branch is orphaned and contains only the package contents for JTween. This is updated in sync with tagged releases on **master** and each commit that changes these contents should result in the version in **package.json** being changed. 8 | 9 | This structure allows for ease of development and quick testing via **master** or **develop**, but clear isolation and separation between the package distribution via **releases/stable**. 10 | 11 | # Pull requests 12 | Pull requests should be made to the [develop branch](https://github.com/jeffcampbellmakesgames/unity-jtween/tree/develop). The types of pull requests that are highly desirable are generally: 13 | * Bug fixes 14 | * Feature improvements addressing issues discussed on the GitHub repository. This allows for wider discussion of those issues prior to any implementation and has the potential to help filter features or changes that are undesirable before time is spent working on them. 15 | 16 | ## Performance Issues and Pull Requests 17 | For any issues or pull requests regarding performance improvements, at minimum please include details and screenshots describing the issue in as much detail as possible and if relevant showing a before and after profile. Better yet, if you can provide a reproducible example that can be used to demonstrate the issue it will be much more likely that the issue is addressed quickly. 18 | 19 | # Style Guide 20 | 21 | ## Language Usage 22 | * Mark closed types as sealed to enable proper devirtualization (see [here](https://blogs.unity3d.com/2016/07/26/il2cpp-optimizations-devirtualization/) for more info). 23 | * Avoid LINQ usage for runtime usage except where absolutely possible (`ToList` or `ToArray` for example) and avoid using `ForEach`. Using these methods creates easily avoidable garbage (in newer versions of Unity >= 5.6 this is situational to the Collection or if its being used via an interface, but easy to avoid edge cases by not using at all). Editor usage is another story as performance is not as generally important and non-usage of these can be relaxed. 24 | 25 | ## Layout 26 | There is an `.editorconfig` at the root of the repository that can be used by most IDEs to help ensure these settings are automatically applied. 27 | * **Indentation:** 1 tab = 4 spaces (tab character) 28 | * **Desired width:** 120-130 characters max per line 29 | * **Line Endings:** Unix (LF), with a new-line at the end of each file. 30 | * **White Space:** Trim empty whitespace from the ends of lines. 31 | 32 | ## Naming and Formatting 33 | | Object Name | Notation | Example | 34 | | ----------- | -------- | ------- | 35 | | Namespaces | PascalCase | `JCMG.JTween.Editor` | 36 | | Classes | PascalCase | `SemVersion` | 37 | | Methods | PascalCase | `ParseVersion` | 38 | | Method arguments | camelCase | `oldValue` | 39 | | Properties | PascalCase | `Value` | 40 | | Public fields | camelCase | `value` | 41 | | Private fields | _camelCase | `_value` | 42 | | Constants | All Upper Caps with Snake case | `DEFAULT_VERSION` | 43 | | Inline variables | camelCase | `value` | 44 | 45 | ## Structure 46 | * Follow good encapsulation principles and try to limit exposing fields directly as public; unless necessary everything should be marked as private/protected unless necessary. Where public access to a field is needed, use a public property instead. 47 | * Always order access from most-accessible to least (i.e, `public` to `private`). 48 | * Where classes or methods are not intended for use by a user, mark these as `internal`. 49 | * Order class structure like so: 50 | * Namespace 51 | * Internal classes 52 | * Properties 53 | * Fields 54 | * Events 55 | * Unity Methods 56 | * Primary Methods 57 | * Helper Methods 58 | * Lines of code that are generally longer than 120-130 characters should generally be broken out into multiple lines. For example, instead of: 59 | 60 | `public bool SomeMethodWithManyParams(int param1, float param2, List param3, out int param4, out int param5)...` 61 | 62 | do 63 | 64 | ``` 65 | public bool SomeMethodWithManyParams( 66 | int param1, 67 | float param2, 68 | List param3, 69 | out int param4, 70 | out int param5)... 71 | ``` 72 | 73 | ## Example Formatting 74 | ``` 75 | using System; 76 | using UnityEngine; 77 | 78 | namespace Example 79 | { 80 | public class Foo : MonoBehavior 81 | { 82 | public int SomeValue { get { return _someValue; } } 83 | 84 | [SerializeField] 85 | private int _someValue; 86 | 87 | private const string WARNING = "Somethings wrong!"; 88 | 89 | private void Update() 90 | { 91 | // Do work 92 | Debug.Log(Warning); 93 | } 94 | } 95 | } 96 | ``` -------------------------------------------------------------------------------- /DocFXProject/credits.md: -------------------------------------------------------------------------------- 1 | These are users who have contributed in some way to this project, whether that is code, art, design, reporting bugs, or other. The content/format of this will be replaced in the near future using the @all-contributors bot. 2 | 3 | -------------------------------------------------------------------------------- /DocFXProject/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "src" : "../Unity", 7 | "files": [ 8 | "JCMG.JTween.csproj" 9 | ] 10 | } 11 | ], 12 | "dest": "api", 13 | "filter": "filterConfig.yml", 14 | "disableGitFeatures": false, 15 | "disableDefaultFilter": false 16 | } 17 | ], 18 | "build": { 19 | "content": [ 20 | { 21 | "files": [ 22 | "api/**.yml", 23 | "api/index.md" 24 | ] 25 | }, 26 | { 27 | "files": [ 28 | "articles/**.md", 29 | "articles/**/toc.yml", 30 | "toc.yml", 31 | "*.md" 32 | ] 33 | } 34 | ], 35 | "resource": [ 36 | { 37 | "files": [ 38 | "images/**" 39 | ] 40 | } 41 | ], 42 | "overwrite": [ 43 | { 44 | "files": [ 45 | "apidoc/**.md" 46 | ], 47 | "exclude": [ 48 | "obj/**" 49 | ] 50 | } 51 | ], 52 | "dest": "../Docs", 53 | "globalMetadataFiles": [], 54 | "globalMetadata": { 55 | "_enableSearch": true, 56 | "_appTitle": "JTween", 57 | "_appFaviconPath": "images/app_icon.png", 58 | "_appLogoPath": "images/app_icon_navbar.png", 59 | "_appFooter": "Copyright © 2019 Jeff Campbell
Generated by DocFX", 60 | "_gitContribute": { 61 | "repo": "https://github.com/jeffcampbellmakesgames/unity-jtween.git", 62 | "branch": "develop", 63 | } 64 | }, 65 | "fileMetadataFiles": [], 66 | "template": [ 67 | "default" 68 | ], 69 | "postProcessors": [], 70 | "markdownEngineName": "markdig", 71 | "noLangKeyword": false, 72 | "keepFileLink": false, 73 | "cleanupCacheHistory": false, 74 | "disableGitFeatures": false, 75 | "template": [ 76 | "default", 77 | "templates/darkfx" 78 | ] 79 | } 80 | } -------------------------------------------------------------------------------- /DocFXProject/docfx_pdf.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "src" : "../Unity", 7 | "files": [ 8 | "JCMG.JTween.csproj" 9 | ] 10 | } 11 | ], 12 | "dest": "api", 13 | "filter": "filterConfig.yml", 14 | "disableGitFeatures": false, 15 | "disableDefaultFilter": false 16 | } 17 | ], 18 | "pdf": { 19 | "content": [ 20 | { 21 | "files": [ 22 | "api/**.yml", 23 | "api/index.md" 24 | ] 25 | }, 26 | { 27 | "files": [ 28 | "articles/**.md", 29 | "toc.yml", 30 | "*.md" 31 | ] 32 | } 33 | ], 34 | "resource": [ 35 | { 36 | "files": [ 37 | "images/**" 38 | ] 39 | } 40 | ], 41 | "overwrite": [ 42 | { 43 | "files": [ 44 | "apidoc/**.md" 45 | ], 46 | "exclude": [ 47 | "obj/**" 48 | ] 49 | } 50 | ], 51 | "dest": "../Unity/Assets/JCMG/JTween/Documentation", 52 | "template" : "pdf.default", 53 | "name" : "JTween", 54 | "keepRawFiles" : false, 55 | "globalMetadataFiles": [], 56 | "globalMetadata": { 57 | "_enableSearch": true, 58 | "_appTitle": "JTween", 59 | "_appFaviconPath": "images/app_icon.png", 60 | "_appLogoPath": "images/app_icon_navbar.png", 61 | "_appFooter": "Copyright © 2019 Jeff Campbell
Generated by DocFX" 62 | }, 63 | "fileMetadataFiles": [], 64 | "postProcessors": [], 65 | "markdownEngineName": "markdig", 66 | "noLangKeyword": false, 67 | "keepFileLink": false, 68 | "cleanupCacheHistory": false, 69 | "disableGitFeatures": false, 70 | "template": [ 71 | "pdf.default" 72 | ] 73 | } 74 | } -------------------------------------------------------------------------------- /DocFXProject/filterConfig.yml: -------------------------------------------------------------------------------- 1 | apiRules: 2 | - exclude: 3 | uidRegex: ^System 4 | type: Type 5 | - exclude: 6 | uidRegex: ^UnityEngine 7 | type: Type 8 | - exclude: 9 | uidRegex: ^Unity\.Mathematics 10 | type: Type 11 | - exclude: 12 | uidRegex: ^Unity\.Jobs 13 | type: Type 14 | - exclude: 15 | uidRegex: ^Unity\.Burst 16 | type: Type 17 | - exclude: 18 | uidRegex: ^Unity\.Collections 19 | type: Type 20 | - exclude: 21 | uidRegex: ^SampleContent 22 | type: Type -------------------------------------------------------------------------------- /DocFXProject/getting_started.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | Getting started with JTween is a fairly straightforward process. It involves importing the plugin, adding any AssemblyDefnition references as needed, and importing its namespace into any script that you want to use the JTween API. 3 | 4 | ## Step 1 - Importing JTween 5 | Using this library in your project can be done in two ways: 6 | * **Releases:** The latest release can be found [here](https://github.com/jeffcampbellmakesgames/unity-jtween/releases) as a UnityPackage file that can be downloaded and imported directly into your project's Assets folder. 7 | * **Package:** Using the native Unity Package Manager, you can add this library as a package by modifying your `manifest.json` file found at `/ProjectName/Packages/manifest.json` to include it as a dependency. See the example below on how to reference it. 8 | 9 | ``` 10 | { 11 | "dependencies": { 12 | ... 13 | "com.jeffcampbellmakesgames.jtween" : "https://github.com/jeffcampbellmakesgames/unity-jtween.git#release/stable", 14 | ... 15 | } 16 | } 17 | ``` 18 | 19 | ## Step 2 - Add Reference to AssemblyDefinition (optional) 20 | Once imported, a new AssemblyDefinition `JCMG.JTween` will become available that contains the runtime JTween code. If the scripts that you need to be able to interact with JTween are in an AssemblyDefinition, they will need to add `JCMG.JTween` as a dependency. Otherwise if they are not this step can be skipped. 21 | 22 | ## Step 3 - Add JCMG.JTween Namespace to Scripts 23 | In the scripts where you want to use JTWeen, make sure to import its namespace. All user-facing code is available in the `JCMG.JTween` namespace. 24 | 25 | ``` 26 | using JCMG.JTween; 27 | ``` 28 | -------------------------------------------------------------------------------- /DocFXProject/images/app_icon_navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/DocFXProject/images/app_icon_navbar.png -------------------------------------------------------------------------------- /DocFXProject/images/fun_example_02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/DocFXProject/images/fun_example_02.gif -------------------------------------------------------------------------------- /DocFXProject/images/fun_example_04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/DocFXProject/images/fun_example_04.gif -------------------------------------------------------------------------------- /DocFXProject/index.md: -------------------------------------------------------------------------------- 1 | # About 2 | JTween is a data-driven, job-based tweening library. It places a focus on performance by attempting to shift the processing of tween data and applying that data to tween targets on Job worker threads. This currently applies to Transforms only, but as the Entity-Component System of the Unity DOTS stack reaches maturity this approach can likely be applied to other components and non-Job updateable components will be added regardless. 3 | 4 | Example 01 5 | Example 02 6 | 7 | # Getting Started 8 | For jumping in and using JTween, see [here](./getting_started.md) on how to get started. 9 | 10 | # Usage 11 | To learn more about how to use JTween's API, see [here](./usage.md) for more information. There are also examples demonstrating its usage included in the repository's Unity project. 12 | 13 | # Contribute 14 | If you are interested in contributing, found a bug, or want to request a new feature, please see [here](./contributing.md) for more information. 15 | 16 | ## Support 17 | If this is useful to you and/or you’d like to see future development and more tools in the future, please consider supporting it either by contributing to the Github projects (submitting bug reports or features,pull requests) or by buying me coffee using any of the links below. Every little bit helps! 18 | 19 | [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I2W7GX) 20 | 21 | # Credits 22 | Those who have contributed in some way to the development and maintenance of this library can be found listed [here](./credits.md). 23 | 24 | # License 25 | Please see [here](./license.md) for more information. -------------------------------------------------------------------------------- /DocFXProject/license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Jeff Campbell 2 | 3 | # Non-legalese summary 4 | * You can freely use JTween in both commercial and non-commercial projects. 5 | * You can modify the code only for your own use and you cannot redistribute modified versions. 6 | * JTween was/is hard work: please respect the copyright. 7 | 8 | # Definitions 9 | ## Copyright Holder 10 | Jeff Campbell 11 | 12 | ## You/Your 13 | Means any person who would like to copy, distribute, or modify the Package. 14 | 15 | ## Package 16 | Means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. 17 | 18 | ## Distribute 19 | Means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. 20 | 21 | ## Standard Version 22 | Refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. 23 | 24 | ## Modified Version 25 | Means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. 26 | 27 | # License 28 | You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. 29 | 30 | You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers and also include the original readme.txt file. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. 31 | 32 | Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. 33 | 34 | This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /DocFXProject/release_notes.md: -------------------------------------------------------------------------------- 1 | ## 1.0.1 2 | 3 | Fixed issue with package dependency versions for preview versions 4 | 5 | ## v1.0.0 6 | 7 | This release marks the first official version of JTween and supports the following features: 8 | * Single and Batch Tweens for Transforms supporting animation of Position, Rotation, and Scaling properties. 9 | * ITweenHandles 10 | * Started and Stopped Events 11 | * Tween Collections (ITweenSet and ITweenSequence) 12 | 13 | For more details on getting started with JTween and using it in your project, please visit the following links: 14 | * https://jeffcampbellmakesgames.github.io/unity-jtween/getting_started.html 15 | * https://jeffcampbellmakesgames.github.io/unity-jtween/usage.html -------------------------------------------------------------------------------- /DocFXProject/templates/darkfx/partials/head.tmpl.partial: -------------------------------------------------------------------------------- 1 | {{!Copyright (c) Oscar Vasquez. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information.}} 2 | 3 | 4 | 5 | 6 | {{#title}}{{title}}{{/title}}{{^title}}{{>partials/title}}{{/title}} {{#_appTitle}}| {{_appTitle}} {{/_appTitle}} 7 | 8 | 9 | 10 | {{#_description}}{{/_description}} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{#_noindex}}{{/_noindex}} 19 | {{#_enableSearch}}{{/_enableSearch}} 20 | {{#_enableNewTab}}{{/_enableNewTab}} 21 | -------------------------------------------------------------------------------- /DocFXProject/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Getting Started 2 | href: getting_started.md 3 | 4 | - name: Usage 5 | href: usage.md 6 | 7 | - name: API Documentation 8 | href: api/ 9 | homepage: api/index.md 10 | 11 | - name: Contribute 12 | href: contributing.md 13 | 14 | - name: Credits 15 | href: credits.md 16 | 17 | - name: Release Notes 18 | href: release_notes.md 19 | 20 | - name: License 21 | href: license.md 22 | -------------------------------------------------------------------------------- /Unity/.gitignore: -------------------------------------------------------------------------------- 1 | # =============== # 2 | # Unity generated # 3 | # =============== # 4 | [Ll]ogs/ 5 | [Tt]emp/ 6 | [Oo]bj/ 7 | [Bb]uild 8 | /[Ll]ibrary/ 9 | sysinfo.txt 10 | *.stackdump 11 | 12 | # JetBrains Plugin 13 | JetBrains/ 14 | JetBrains.meta 15 | 16 | # ============================================= # 17 | # Visual Studio / MonoDevelop / Rider generated # 18 | # ============================================= # 19 | [Ee]xported[Oo]bj/ 20 | .vs/ 21 | /*.userprefs 22 | /*.csproj 23 | /*.pidb 24 | /*.suo 25 | /*.sln* 26 | /*.user 27 | /*.unityproj 28 | /*.booproj 29 | /.idea*/ 30 | 31 | # ============ # 32 | # OS generated # 33 | # ============ # 34 | .DS_Store* 35 | ._* 36 | .Spotlight-V100 37 | .Trashes 38 | ehthumbs.db 39 | [Tt]humbs.db 40 | [Dd]esktop.ini -------------------------------------------------------------------------------- /Unity/Assets/JCMG.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 508f78c61ca6a354ebb505eeedad3778 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8bf9ea510ed6f084593c3a334e35c420 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("JCMG.JTween.Editor")] 4 | [assembly: InternalsVisibleTo("JCMG.JTween.Editor.Tests")] 5 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0e31a6756f0428ba46720328bdce972 3 | timeCreated: 1556788545 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4c69a4807b06cfb429e8dffe3926354e 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/FastList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Assertions; 5 | 6 | namespace JCMG.JTween 7 | { 8 | /// 9 | /// A dynamically sized array with fast access and removal operations 10 | /// 11 | internal class FastList 12 | { 13 | /// 14 | /// The size of the list based on its contents. 15 | /// 16 | public int Length => _length; 17 | 18 | /// 19 | /// The capacity of the list based on its backing array buffer 20 | /// 21 | public int Capacity => buffer.Length; 22 | 23 | public T[] buffer; 24 | 25 | private int _length; 26 | 27 | public FastList() { } 28 | 29 | public FastList(int capacity) 30 | { 31 | SetCapacity(capacity); 32 | } 33 | 34 | public void SetCapacity(int capacity) 35 | { 36 | if (buffer == null) 37 | { 38 | buffer = new T[capacity]; 39 | } 40 | else if (capacity > buffer.Length) 41 | { 42 | if (buffer != null && capacity == buffer.Length) 43 | { 44 | return; 45 | } 46 | 47 | var objArray = new T[capacity]; 48 | Array.Copy(buffer, 0, objArray, 0, _length); 49 | _length = Mathf.Min(_length, capacity); 50 | 51 | buffer = objArray; 52 | } 53 | else if(capacity <= 0) 54 | { 55 | Release(); 56 | } 57 | } 58 | 59 | public bool Contains(T item) 60 | { 61 | if (buffer == null) 62 | { 63 | return false; 64 | } 65 | 66 | var found = false; 67 | var equalityComparer = EqualityComparer.Default; 68 | for (var i = 0; i < _length; ++i) 69 | { 70 | if (!equalityComparer.Equals(buffer[i], item)) 71 | { 72 | continue; 73 | } 74 | 75 | found = true; 76 | break; 77 | } 78 | 79 | return found; 80 | } 81 | 82 | public void Trim() 83 | { 84 | SetCapacity(_length); 85 | } 86 | 87 | public void Clear() 88 | { 89 | _length = 0; 90 | } 91 | 92 | public void Release() 93 | { 94 | _length = 0; 95 | buffer = null; 96 | } 97 | 98 | public void Add(T item) 99 | { 100 | if (buffer == null || _length == buffer.Length) 101 | { 102 | SetCapacity(buffer != null ? Mathf.Max(buffer.Length << 1, 32) : 32); 103 | } 104 | 105 | buffer[_length++] = item; 106 | } 107 | 108 | public T PopLast() 109 | { 110 | T result; 111 | if (_length == 0) 112 | { 113 | result = default(T); 114 | } 115 | else 116 | { 117 | result = buffer[_length - 1]; 118 | _length--; 119 | } 120 | 121 | return result; 122 | } 123 | 124 | public void Remove(T item) 125 | { 126 | if (buffer == null) 127 | { 128 | return; 129 | } 130 | 131 | var equalityComparer = EqualityComparer.Default; 132 | for (var i = 0; i < _length; ++i) 133 | { 134 | if (!equalityComparer.Equals(buffer[i], item)) 135 | { 136 | continue; 137 | } 138 | 139 | --_length; 140 | ResortArray(i); 141 | break; 142 | } 143 | } 144 | 145 | public int IndexOf(T item) 146 | { 147 | var equalityComparer = EqualityComparer.Default; 148 | for (var i = 0; i < _length; ++i) 149 | { 150 | if (!equalityComparer.Equals(buffer[i], item)) 151 | { 152 | continue; 153 | } 154 | 155 | return i; 156 | } 157 | 158 | return -1; 159 | } 160 | 161 | public void RemoveAt(int index) 162 | { 163 | --_length; 164 | 165 | if (_length != index) 166 | { 167 | ResortArray(index); 168 | } 169 | } 170 | 171 | private void ResortArray(int index) 172 | { 173 | var newLength = _length - index; 174 | Array.Copy(buffer, index + 1, buffer, index, newLength); 175 | } 176 | 177 | public void AddRange(T[] array) 178 | { 179 | if (buffer == null || _length + array.Length > buffer.Length) 180 | { 181 | SetCapacity(buffer != null ? Mathf.Max(buffer.Length << 1, array.Length) : array.Length); 182 | } 183 | 184 | Array.Copy(array, 0, buffer, _length, array.Length); 185 | _length += array.Length; 186 | } 187 | 188 | public void AddRange(T[] array, int startIndex, int length) 189 | { 190 | if (buffer == null || _length + length > buffer.Length) 191 | { 192 | SetCapacity(buffer != null ? Mathf.Max(buffer.Length << 1, length) : length); 193 | } 194 | 195 | Array.Copy(array, startIndex, buffer, _length, length); 196 | _length += length; 197 | } 198 | 199 | public void RemoveRange(int index, int length) 200 | { 201 | Assert.IsNotNull(buffer); 202 | Assert.IsFalse(index + length > buffer.Length); 203 | 204 | var copyLength = _length - (index + length); 205 | Array.Copy(buffer, index + length, buffer, index, copyLength); 206 | _length -= length; 207 | } 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/FastList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f81ce7099ee84a0089681b046632ce2a 3 | timeCreated: 1556692271 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// The base interface collection for s. 7 | /// 8 | public interface ITweenCollection 9 | { 10 | /// 11 | /// Adds the instance to the collection. 12 | /// 13 | /// 14 | void Add(ITweenHandle tweenHandle); 15 | 16 | /// 17 | /// Recycles all instances from the collection and clears all local event 18 | /// listeners. 19 | /// 20 | void Clear(); 21 | 22 | /// 23 | /// Recycles all instances in the collection and removes them. All local event listeners 24 | /// will remain. 25 | /// 26 | void Recycle(); 27 | 28 | /// 29 | /// Adds a listener that is invoked when the collection has completed. 30 | /// 31 | /// 32 | void AddOnComplete(Action onComplete); 33 | 34 | /// 35 | /// Adds a listener that is invoked when the collection has begun playing. 36 | /// 37 | /// 38 | void AddOnStarted(Action onStart); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenCollection.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e12d0a437c4397d45b6765ddddc28b4f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenSequence.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// A collection whose contents are operated in succession. A started event is 7 | /// invoked when first played and completed once the last instance has completed. 8 | /// 9 | public interface ITweenSequence : ITweenCollection 10 | { 11 | /// 12 | /// Pauses the current instance in the sequence if playing. 13 | /// 14 | void Pause(); 15 | 16 | /// 17 | /// If not playing, plays the first instance in the sequence. Otherwise if 18 | /// the current instance in the sequence is paused that will be played. 19 | /// 20 | void Play(); 21 | 22 | /// 23 | /// Rewinds all instances in the sequence and plays the first one. 24 | /// 25 | void Restart(); 26 | 27 | /// 28 | /// Rewinds all instances in the sequence and initialized the first one as 29 | /// paused. 30 | /// 31 | void Rewind(); 32 | 33 | /// 34 | /// Stops the currently playing instance in the sequence if any and marks 35 | /// it as complete. 36 | /// 37 | void Stop(); 38 | 39 | /// 40 | /// Adds a listener that is invoked every time a in the sequence has 41 | /// completed. 42 | /// 43 | /// 44 | void AddOnStep(Action onStep); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc7bd8683c2a47f296edc0c1c4f9d979 3 | timeCreated: 1558261448 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenSet.cs: -------------------------------------------------------------------------------- 1 | namespace JCMG.JTween 2 | { 3 | /// 4 | /// A collection whose contents are operated on all at once. A started event is 5 | /// invoked when first played and completed once all instances have completed. 6 | /// 7 | public interface ITweenSet : ITweenCollection 8 | { 9 | /// 10 | /// Plays all instances in the . 11 | /// 12 | void Play(); 13 | 14 | /// 15 | /// Pauses all instances in the . 16 | /// 17 | void Pause(); 18 | 19 | /// 20 | /// Rewinds all instances in the and plays them. 21 | /// 22 | void Restart(); 23 | 24 | /// 25 | /// Rewinds all instances in the and pauses them. 26 | /// 27 | void Rewind(); 28 | 29 | /// 30 | /// Stops all instances in the and marks them as 31 | /// complete. 32 | /// 33 | void Stop(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/ITweenSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df0192f7218f4908ae3279e51abe56f6 3 | timeCreated: 1558261352 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenCollectionBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal abstract class TweenCollectionBase : ITweenCollection 7 | { 8 | protected List _tweenList; 9 | 10 | protected Action _onStart; 11 | 12 | protected Action _onComplete; 13 | 14 | protected bool _isStarted; 15 | 16 | protected bool _isCompleted; 17 | 18 | protected TweenCollectionBase() 19 | { 20 | _tweenList = new List(); 21 | } 22 | 23 | // Abstract methods for collections. 24 | public abstract void Add(ITweenHandle tweenHandle); 25 | 26 | // Abstract methods mapping ITween methods. 27 | public abstract void Play(); 28 | public abstract void Pause(); 29 | public abstract void Stop(); 30 | public abstract void Restart(); 31 | public abstract void Rewind(); 32 | public abstract void Recycle(); 33 | 34 | public virtual void Clear() 35 | { 36 | Recycle(); 37 | 38 | _isStarted = false; 39 | _isCompleted = false; 40 | 41 | _onStart = null; 42 | _onComplete = null; 43 | } 44 | 45 | public void AddOnStarted(Action onStart) 46 | { 47 | _onStart += onStart; 48 | } 49 | 50 | public void AddOnComplete(Action onComplete) 51 | { 52 | _onComplete += onComplete; 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenCollectionBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99defff59b4e4726ad463f6b681e248b 3 | timeCreated: 1558248778 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenSequence.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | internal sealed class TweenSequence : TweenCollectionBase, ITweenSequence 6 | { 7 | private int _index; 8 | 9 | private TweenHandle _currentTweenHandle; 10 | 11 | private Action _onStep; 12 | 13 | public override void Add(ITweenHandle tweenHandle) 14 | { 15 | tweenHandle.AddOnCompletedListener(OnTweenCompleted); 16 | 17 | _tweenList.Add((TweenHandle)tweenHandle); 18 | } 19 | 20 | public void AddOnStep(Action onStep) 21 | { 22 | _onStep += onStep; 23 | } 24 | 25 | public override void Clear() 26 | { 27 | base.Clear(); 28 | 29 | _onStep = null; 30 | } 31 | 32 | public override void Play() 33 | { 34 | if (_currentTweenHandle == null && _tweenList.Count > 0 && _index == 0) 35 | { 36 | _currentTweenHandle = _tweenList[_index++]; 37 | _currentTweenHandle.AddOnStartedListener(OnTweenStarted); 38 | _currentTweenHandle.Play(); 39 | } 40 | else 41 | { 42 | _currentTweenHandle?.Play(); 43 | } 44 | } 45 | 46 | public override void Rewind() 47 | { 48 | for (var i = 0; i < _tweenList.Count; i++) 49 | { 50 | _tweenList[i].Rewind(); 51 | } 52 | 53 | if (_tweenList.Count > 0) 54 | { 55 | _index = 1; 56 | _currentTweenHandle = _tweenList[0]; 57 | } 58 | else 59 | { 60 | _index = 0; 61 | } 62 | } 63 | 64 | public override void Recycle() 65 | { 66 | for (var i = 0; i < _tweenList.Count; i++) 67 | { 68 | _tweenList[i].Recycle(); 69 | } 70 | 71 | _tweenList.Clear(); 72 | } 73 | 74 | public override void Pause() 75 | { 76 | _currentTweenHandle?.Play(); 77 | } 78 | 79 | public override void Stop() 80 | { 81 | _currentTweenHandle?.Stop(); 82 | } 83 | 84 | public override void Restart() 85 | { 86 | for (var i = 0; i < _tweenList.Count; i++) 87 | { 88 | _tweenList[i].Rewind(); 89 | } 90 | 91 | if (_tweenList.Count > 0) 92 | { 93 | _index = 1; 94 | _currentTweenHandle = _tweenList[0]; 95 | _currentTweenHandle.Play(); 96 | } 97 | else 98 | { 99 | _index = 0; 100 | } 101 | } 102 | 103 | private void OnTweenStarted() 104 | { 105 | _onStart?.Invoke(); 106 | } 107 | 108 | private void OnTweenCompleted() 109 | { 110 | if (_tweenList.Count == 0) 111 | { 112 | return; 113 | } 114 | 115 | if (_index > _tweenList.Count - 1) 116 | { 117 | _onComplete?.Invoke(); 118 | } 119 | else 120 | { 121 | _currentTweenHandle = _tweenList[_index++]; 122 | _currentTweenHandle.Play(); 123 | 124 | _onStep?.Invoke(); 125 | } 126 | } 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b371e61018341b097e57c805359fa75 3 | timeCreated: 1558249104 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenSet.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace JCMG.JTween 3 | { 4 | internal sealed class TweenSet : TweenCollectionBase, ITweenSet 5 | { 6 | public override void Add(ITweenHandle tweenHandle) 7 | { 8 | tweenHandle.AddOnStartedListener(OnTweenStarted); 9 | tweenHandle.AddOnCompletedListener(OnTweenCompleted); 10 | 11 | _tweenList.Add((TweenHandle)tweenHandle); 12 | } 13 | 14 | public override void Play() 15 | { 16 | for (var i = 0; i < _tweenList.Count; i++) 17 | { 18 | _tweenList[i].Play(); 19 | } 20 | } 21 | 22 | public override void Pause() 23 | { 24 | for (var i = 0; i < _tweenList.Count; i++) 25 | { 26 | _tweenList[i].Pause(); 27 | } 28 | } 29 | 30 | public override void Stop() 31 | { 32 | for (var i = 0; i < _tweenList.Count; i++) 33 | { 34 | _tweenList[i].Stop(); 35 | } 36 | } 37 | 38 | public override void Restart() 39 | { 40 | for (var i = 0; i < _tweenList.Count; i++) 41 | { 42 | _tweenList[i].Restart(); 43 | } 44 | 45 | _isStarted = false; 46 | _isCompleted = false; 47 | } 48 | 49 | public override void Rewind() 50 | { 51 | for (var i = 0; i < _tweenList.Count; i++) 52 | { 53 | _tweenList[i].Rewind(); 54 | } 55 | 56 | _isStarted = false; 57 | _isCompleted = false; 58 | } 59 | 60 | public override void Recycle() 61 | { 62 | for (var i = 0; i < _tweenList.Count; i++) 63 | { 64 | _tweenList[i].Recycle(); 65 | } 66 | 67 | _isStarted = false; 68 | _isCompleted = false; 69 | 70 | _tweenList.Clear(); 71 | } 72 | 73 | private void OnTweenStarted() 74 | { 75 | if (_isStarted) 76 | { 77 | return; 78 | } 79 | 80 | _isStarted = true; 81 | 82 | _onStart?.Invoke(); 83 | } 84 | 85 | private void OnTweenCompleted() 86 | { 87 | for (var i = 0; i < _tweenList.Count; i++) 88 | { 89 | if (!_tweenList[i].IsCompleted()) 90 | { 91 | return; 92 | } 93 | } 94 | 95 | if (_isCompleted) 96 | { 97 | return; 98 | } 99 | 100 | _isCompleted = true; 101 | 102 | _onComplete?.Invoke(); 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Collections/TweenSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdc9c319f3124cf09f40cd81361f3939 3 | timeCreated: 1558248700 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 832920553bbd5244297e88d3efed9094 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/EaseType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// The type of easing to use for a given tween. 7 | /// 8 | [Serializable] 9 | public enum EaseType : byte 10 | { 11 | Linear, 12 | 13 | SineIn, 14 | SineOut, 15 | SineInOut, 16 | 17 | QuadIn, 18 | QuadOut, 19 | QuadInOut, 20 | 21 | CubicIn, 22 | CubicOut, 23 | CubicInOut, 24 | 25 | QuartIn, 26 | QuartOut, 27 | QuartInOut, 28 | 29 | QuintIn, 30 | QuintOut, 31 | QuintInOut, 32 | 33 | ExpoIn, 34 | ExpoOut, 35 | ExpoInOut, 36 | 37 | CircIn, 38 | CircOut, 39 | CircInOut, 40 | 41 | ElasticIn, 42 | ElasticOut, 43 | ElasticInOut, 44 | Punch, 45 | 46 | BackIn, 47 | BackOut, 48 | BackInOut, 49 | 50 | BounceIn, 51 | BounceOut, 52 | BounceInOut 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/EaseType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 640d0fe9b26b4302835a9041135dcc90 3 | timeCreated: 1556996902 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/ITweenHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// A user reference to tween data that allows for safe manipulation of its state. 7 | /// 8 | public interface ITweenHandle 9 | { 10 | /// 11 | /// returns true if the tween is playing, otherwise false. 12 | /// 13 | /// 14 | bool IsPlaying(); 15 | 16 | /// 17 | /// Returns true if the tween is paused, otherwise false. 18 | /// 19 | /// 20 | bool IsPaused(); 21 | 22 | /// 23 | /// Returns true if the tween is completed, otherwise false. 24 | /// 25 | /// 26 | bool IsCompleted(); 27 | 28 | /// 29 | /// Plays the tween instance if paused or not completed. Any listeners added via 30 | /// will be invoked. 31 | /// 32 | void Play(); 33 | 34 | /// 35 | /// Pauses the tween instance if playing. 36 | /// 37 | void Pause(); 38 | 39 | /// 40 | /// Rewinds the tween data back to its original state and immediately plays it. 41 | /// 42 | void Restart(); 43 | 44 | /// 45 | /// Rewinds the tween data back to its original state and sets it as paused. 46 | /// 47 | void Rewind(); 48 | 49 | /// 50 | /// Stops the tween instance if playing or paused and and marks it as completed. Any listeners added 51 | /// via will be invoked. 52 | /// 53 | void Stop(); 54 | 55 | /// 56 | /// Immediately stops the tween and marks the tween as requiring recycling. Any local reference to 57 | /// this instance should be cleared by setting it to null. If playing or 58 | /// paused, this will not invoke listeners added via . 59 | /// 60 | void Recycle(); 61 | 62 | /// 63 | /// Adds an event listener that is called when the tween is started via . 64 | /// 65 | /// 66 | void AddOnStartedListener(Action onStarted); 67 | 68 | /// 69 | /// Adds an event listener that is called when the tween has completed or when is 70 | /// called while playing/paused. 71 | /// 72 | /// 73 | void AddOnCompletedListener(Action onCompleted); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/ITweenHandle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 423a76db675c42b3ad6bdb3e880a2000 3 | timeCreated: 1557645461 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/LoopType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// The type of looping the tween should use while running. 7 | /// 8 | [Serializable] 9 | public enum LoopType : byte 10 | { 11 | /// 12 | /// No looping. 13 | /// 14 | None, 15 | 16 | /// 17 | /// The tween should loop starting back from its original state animating towards its target state. 18 | /// 19 | Restart, 20 | 21 | /// 22 | /// The tween should loop from its target state back to its original state. 23 | /// 24 | PingPong 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/LoopType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fdbf7e6fd0c0491f9a66ccfa932634c5 3 | timeCreated: 1557039249 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/RotateMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// The mode a tween should use when animating rotation. 7 | /// 8 | [Serializable] 9 | public enum RotateMode : byte 10 | { 11 | /// 12 | /// Rotates an object from one quaternion to another. 13 | /// 14 | XYZ, 15 | 16 | /// 17 | /// Rotates an object around the X axis. 18 | /// 19 | X, 20 | 21 | /// 22 | /// Rotates an object around the Y axis. 23 | /// 24 | Y, 25 | 26 | /// 27 | /// Rotates an object around the Z axis. 28 | /// 29 | Z 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/RotateMode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 62e7a2853fc84b238479a94732296f4f 3 | timeCreated: 1557058248 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/RuntimeConstants.cs: -------------------------------------------------------------------------------- 1 | namespace JCMG.JTween 2 | { 3 | internal static class RuntimeConstants 4 | { 5 | // Pooling 6 | public const int DEFAULT_FAST_LIST_SIZE = 10000; 7 | 8 | public const int DEFAULT_RECYCLE_AMOUNT_PER_FRAME = 500; 9 | 10 | // Warnings 11 | public const string HANDLE_NOT_FOUND = 12 | "[JTween] Tween not found for this handle, please remove local reference"; 13 | 14 | public const string HANDLE_BATCH_NOT_FOUND = 15 | "[JTween] Tween Batch not found for this handle, please remove local reference"; 16 | 17 | public const string INVALID_ROTATE_MODE = 18 | "[JTween] RotateMode.XYZ should not be used when rotating on a single axis."; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/RuntimeConstants.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1d7c81cd9cc4223a03674ffc87c27d4 3 | timeCreated: 1556872675 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/SpaceType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// The coordinate space system the tween should operate with regards to. 7 | /// 8 | [Serializable] 9 | public enum SpaceType : byte 10 | { 11 | /// 12 | /// The world space coordinate system. 13 | /// 14 | World, 15 | 16 | /// 17 | /// The coordinate system with regards to the parent object. 18 | /// 19 | Local 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/SpaceType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 210b44b94d954686afb64c46f24e374e 3 | timeCreated: 1557068339 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat1.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | using Unity.Mathematics; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal struct TweenFloat1 7 | { 8 | public float from; 9 | public float to; 10 | 11 | public float Lerp(float ease, bool isReversed) 12 | { 13 | var currentTo = isReversed ? from : to; 14 | var currentFrom = isReversed ? to : from; 15 | return math.lerp(currentFrom, currentTo, ease); 16 | } 17 | 18 | public static long SizeOf() 19 | { 20 | return UnsafeUtility.SizeOf(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e65ae0d91df34c369bd195207eb0c91f 3 | timeCreated: 1557594287 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat2.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | using Unity.Mathematics; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal struct TweenFloat2 7 | { 8 | public float2 from; 9 | public float2 to; 10 | 11 | public float2 Lerp(float ease, bool isReversed) 12 | { 13 | var currentTo = isReversed ? from : to; 14 | var currentFrom = isReversed ? to : from; 15 | return math.lerp(currentFrom, currentTo, ease); 16 | } 17 | 18 | public static long SizeOf() 19 | { 20 | return UnsafeUtility.SizeOf(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0a12d2de3ad4fdb8251990ef364bc93 3 | timeCreated: 1557594228 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat3.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | using Unity.Mathematics; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal struct TweenFloat3 7 | { 8 | public float3 from; 9 | public float3 to; 10 | 11 | public float3 Lerp(float ease, bool isReversed) 12 | { 13 | var currentTo = isReversed ? from : to; 14 | var currentFrom = isReversed ? to : from; 15 | return math.lerp(currentFrom, currentTo, ease); 16 | } 17 | 18 | public static long SizeOf() 19 | { 20 | return UnsafeUtility.SizeOf(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 283128dedda04e849a80e1b1dfd096d9 3 | timeCreated: 1556784126 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat4.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | using Unity.Mathematics; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal struct TweenFloat4 7 | { 8 | public float4 from; 9 | public float4 to; 10 | 11 | public float4 Lerp(float ease, bool isReversed) 12 | { 13 | var currentTo = isReversed ? from : to; 14 | var currentFrom = isReversed ? to : from; 15 | return math.lerp(currentFrom, currentTo, ease); 16 | } 17 | 18 | public static long SizeOf() 19 | { 20 | return UnsafeUtility.SizeOf(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenFloat4.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a0268f3c70c4cc7ad60518bcc2365f8 3 | timeCreated: 1557594176 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandle.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | internal class TweenHandle : ITweenHandle 6 | { 7 | internal Action Started; 8 | 9 | internal Action Completed; 10 | 11 | internal TweenHandleActionType actionType; 12 | 13 | internal TweenStateType state; 14 | 15 | private readonly TweenerBase _tweenerBase; 16 | 17 | public TweenHandle(TweenerBase tweenerBase) 18 | { 19 | _tweenerBase = tweenerBase; 20 | } 21 | 22 | public bool IsPlaying() 23 | { 24 | return (state & TweenStateType.IsPlaying) == TweenStateType.IsPlaying; 25 | } 26 | 27 | public bool IsPaused() 28 | { 29 | return (state & TweenStateType.IsPaused) == TweenStateType.IsPaused; 30 | } 31 | 32 | public bool IsCompleted() 33 | { 34 | return (state & TweenStateType.IsCompleted) == TweenStateType.IsCompleted; 35 | } 36 | 37 | public bool HasHandle() 38 | { 39 | return (state & TweenStateType.HasHandle) == TweenStateType.HasHandle; 40 | } 41 | 42 | public bool JustStarted() 43 | { 44 | return (state & TweenStateType.JustStarted) == TweenStateType.JustStarted; 45 | } 46 | 47 | public bool JustEnded() 48 | { 49 | return (state & TweenStateType.JustEnded) == TweenStateType.JustEnded; 50 | } 51 | 52 | public bool RequiresRecycling() 53 | { 54 | return (state & TweenStateType.RequiresRecycling) == TweenStateType.RequiresRecycling; 55 | } 56 | 57 | public void Play() 58 | { 59 | actionType = TweenHandleActionType.Play; 60 | _tweenerBase.QueueTweenHandleAction(this); 61 | } 62 | 63 | public void Pause() 64 | { 65 | actionType = TweenHandleActionType.Pause; 66 | _tweenerBase.QueueTweenHandleAction(this); 67 | } 68 | 69 | public void Rewind() 70 | { 71 | actionType = TweenHandleActionType.Rewind; 72 | _tweenerBase.QueueTweenHandleAction(this); 73 | } 74 | 75 | public void Restart() 76 | { 77 | actionType = TweenHandleActionType.Restart; 78 | _tweenerBase.QueueTweenHandleAction(this); 79 | } 80 | 81 | public void Stop() 82 | { 83 | actionType = TweenHandleActionType.Stop; 84 | _tweenerBase.QueueTweenHandleAction(this); 85 | } 86 | 87 | public void Recycle() 88 | { 89 | actionType = TweenHandleActionType.Recycle; 90 | _tweenerBase.QueueTweenHandleAction(this); 91 | } 92 | 93 | public void AddOnStartedListener(Action onStart) 94 | { 95 | Started += onStart; 96 | } 97 | 98 | public void AddOnCompletedListener(Action onCompleted) 99 | { 100 | Completed += onCompleted; 101 | } 102 | 103 | internal void Reset() 104 | { 105 | actionType = TweenHandleActionType.None; 106 | Started = null; 107 | Completed = null; 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandle.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8a8af4e1303483f9656cec5a39ce35d 3 | timeCreated: 1557645749 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandleAction.cs: -------------------------------------------------------------------------------- 1 | namespace JCMG.JTween 2 | { 3 | internal struct TweenHandleAction 4 | { 5 | public TweenHandleActionType actionType; 6 | public int index; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandleAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ad9266bc7db46b097f67e8fb939518c 3 | timeCreated: 1558268068 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandleActionType.cs: -------------------------------------------------------------------------------- 1 | namespace JCMG.JTween 2 | { 3 | internal enum TweenHandleActionType : byte 4 | { 5 | None, 6 | Play, 7 | Pause, 8 | Stop, 9 | Restart, 10 | Rewind, 11 | Recycle 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenHandleActionType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fcc43baa082140399dfde0877ce52563 3 | timeCreated: 1557985646 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenLifetime.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 13ce5d5f8cbe42af904f2e2738b5f43f 3 | timeCreated: 1556018594 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenRotation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections.LowLevel.Unsafe; 3 | using Unity.Mathematics; 4 | using UnityEngine; 5 | 6 | namespace JCMG.JTween 7 | { 8 | internal struct TweenRotation 9 | { 10 | public quaternion from; 11 | public quaternion to; 12 | public float angle; 13 | 14 | public quaternion GetRotation(float ease, bool isReversed, RotateMode rotateMode) 15 | { 16 | switch (rotateMode) 17 | { 18 | case RotateMode.XYZ: 19 | var currentTo = isReversed ? from : to; 20 | var currentFrom = isReversed ? to : from; 21 | return Quaternion.Lerp(currentFrom, currentTo, ease); 22 | case RotateMode.X: 23 | return Quaternion.Euler((from.value.x + angle * ease) % 360, from.value.y, from.value.z); 24 | case RotateMode.Y: 25 | return Quaternion.Euler(from.value.x, (from.value.y + angle * ease) % 360, from.value.z); 26 | case RotateMode.Z: 27 | return Quaternion.Euler(from.value.x, from.value.y, ease * (from.value.z + angle * ease) % 360); 28 | default: 29 | throw new ArgumentOutOfRangeException(); 30 | } 31 | } 32 | 33 | public static long SizeOf() 34 | { 35 | return UnsafeUtility.SizeOf(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenRotation.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50ccdd5e2f2041f7be219f063230d4ce 3 | timeCreated: 1556018475 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenSpaceType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | [Flags] 6 | internal enum TweenSpaceType : byte 7 | { 8 | LocalMovement = 1, 9 | WorldMovement = 2, 10 | LocalRotation = 4, 11 | WorldRotation = 8, 12 | RotateModeXYZ = 16, 13 | RotateX = 32, 14 | RotateY = 64, 15 | RotateZ = 128 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenSpaceType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75ebaa6bd1924815b211a7853427afc5 3 | timeCreated: 1557649471 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenStateType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | [Flags] 6 | internal enum TweenStateType : byte 7 | { 8 | IsPlaying = 1, 9 | IsPaused = 2, 10 | IsCompleted = 4, 11 | RequiresRecycling = 8, 12 | HasHandle = 16, 13 | JustStarted = 32, 14 | JustEnded = 64 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenStateType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d39d867f96d04eef9128a9e59be588ba 3 | timeCreated: 1557664351 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformBatchState.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | 3 | namespace JCMG.JTween 4 | { 5 | internal struct TweenTransformBatchState 6 | { 7 | public uint startIndex; 8 | public uint length; 9 | public TweenStateType state; 10 | 11 | public bool IsPlaying() 12 | { 13 | return (state & TweenStateType.IsPlaying) == TweenStateType.IsPlaying; 14 | } 15 | 16 | public bool IsPaused() 17 | { 18 | return (state & TweenStateType.IsPaused) == TweenStateType.IsPaused; 19 | } 20 | 21 | public bool IsCompleted() 22 | { 23 | return (state & TweenStateType.IsCompleted) == TweenStateType.IsCompleted; 24 | } 25 | 26 | public bool HasHandle() 27 | { 28 | return (state & TweenStateType.HasHandle) == TweenStateType.HasHandle; 29 | } 30 | 31 | public bool JustStarted() 32 | { 33 | return (state & TweenStateType.JustStarted) == TweenStateType.JustStarted; 34 | } 35 | 36 | public bool JustEnded() 37 | { 38 | return (state & TweenStateType.JustEnded) == TweenStateType.JustEnded; 39 | } 40 | 41 | public bool RequiresRecycling() 42 | { 43 | return (state & TweenStateType.RequiresRecycling) == TweenStateType.RequiresRecycling; 44 | } 45 | 46 | public bool IncludesIndex(int index) 47 | { 48 | return startIndex <= index && startIndex + length > index; 49 | } 50 | 51 | public static long SizeOf() 52 | { 53 | return UnsafeUtility.SizeOf(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformBatchState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 030ba013baf7427a84a9683183fbaf5a 3 | timeCreated: 1557300327 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformState.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections.LowLevel.Unsafe; 2 | 3 | namespace JCMG.JTween 4 | { 5 | internal struct TweenTransformState 6 | { 7 | public TweenStateType state; 8 | public TweenTransformType transformType; 9 | public TweenSpaceType spaceType; 10 | 11 | public bool IsPlaying() 12 | { 13 | return (state & TweenStateType.IsPlaying) == TweenStateType.IsPlaying; 14 | } 15 | 16 | public bool IsPaused() 17 | { 18 | return (state & TweenStateType.IsPaused) == TweenStateType.IsPaused; 19 | } 20 | 21 | public bool IsCompleted() 22 | { 23 | return (state & TweenStateType.IsCompleted) == TweenStateType.IsCompleted; 24 | } 25 | 26 | public bool HasHandle() 27 | { 28 | return (state & TweenStateType.HasHandle) == TweenStateType.HasHandle; 29 | } 30 | 31 | public bool JustStarted() 32 | { 33 | return (state & TweenStateType.JustStarted) == TweenStateType.JustStarted; 34 | } 35 | 36 | public bool JustEnded() 37 | { 38 | return (state & TweenStateType.JustEnded) == TweenStateType.JustEnded; 39 | } 40 | 41 | public bool RequiresRecycling() 42 | { 43 | return (state & TweenStateType.RequiresRecycling) == TweenStateType.RequiresRecycling; 44 | } 45 | 46 | public bool IsMovementInWorldSpace() 47 | { 48 | return (spaceType & TweenSpaceType.WorldMovement) == TweenSpaceType.WorldMovement; 49 | } 50 | 51 | public bool IsRotationInWorldSpace() 52 | { 53 | return (spaceType & TweenSpaceType.WorldRotation) == TweenSpaceType.WorldRotation; 54 | } 55 | 56 | public bool IsMovementEnabled() 57 | { 58 | return (transformType & TweenTransformType.Movement) == TweenTransformType.Movement; 59 | } 60 | 61 | public bool IsRotationEnabled() 62 | { 63 | return (transformType & TweenTransformType.Rotation) == TweenTransformType.Rotation; 64 | } 65 | 66 | public bool IsScalingEnabled() 67 | { 68 | return (transformType & TweenTransformType.Scaling) == TweenTransformType.Scaling; 69 | } 70 | 71 | public bool IsRotationXYZ() 72 | { 73 | return (spaceType & TweenSpaceType.RotateModeXYZ) == TweenSpaceType.RotateModeXYZ; 74 | } 75 | 76 | public bool IsRotationX() 77 | { 78 | return (spaceType & TweenSpaceType.RotateX) == TweenSpaceType.RotateX; 79 | } 80 | 81 | public bool IsRotationY() 82 | { 83 | return (spaceType & TweenSpaceType.RotateY) == TweenSpaceType.RotateY; 84 | } 85 | 86 | public bool IsRotationZ() 87 | { 88 | return (spaceType & TweenSpaceType.RotateZ) == TweenSpaceType.RotateZ; 89 | } 90 | 91 | public RotateMode GetRotateMode() 92 | { 93 | var rotateMode = RotateMode.XYZ; 94 | if (IsRotationX()) 95 | { 96 | rotateMode = RotateMode.X; 97 | } 98 | else if (IsRotationY()) 99 | { 100 | rotateMode = RotateMode.Y; 101 | } 102 | else if (IsRotationZ()) 103 | { 104 | rotateMode = RotateMode.Z; 105 | } 106 | 107 | return rotateMode; 108 | } 109 | 110 | public static long SizeOf() 111 | { 112 | return UnsafeUtility.SizeOf(); 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1638dcdc2ebb4e08a6f2cac476117ee0 3 | timeCreated: 1556612460 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace JCMG.JTween 4 | { 5 | [Flags] 6 | internal enum TweenTransformType : byte 7 | { 8 | Movement = 1, 9 | Rotation = 2, 10 | Scaling = 4 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Core/TweenTransformType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3d1131c87ce44ee9871f0ecc98cc231 3 | timeCreated: 1557648181 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1823e862633dbb5439f7414be83bc184 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/JTween.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/Unity/Assets/JCMG/JTween/Documentation/JTween.pdf -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/JTween.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aee48cda7b40e0946a693991d29f419e 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/JTween_api.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/Unity/Assets/JCMG/JTween/Documentation/JTween_api.pdf -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/JTween_api.pdf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78b1b780aa1dcbf40bedcae87dca0f59 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/release_notes.txt: -------------------------------------------------------------------------------- 1 | 1.0.1 2 | ---- 3 | Fixed issue with package dependency versions for preview versions 4 | 5 | v1.0.0 6 | ---- 7 | This release marks the first official version of JTween and supports the following features: 8 | * Single and Batch Tweens for Transforms supporting animation of Position, Rotation, and Scaling properties. 9 | * ITweenHandles 10 | * Started and Stopped Events 11 | * Tween Collections (ITweenSet and ITweenSequence) 12 | 13 | For more details on getting started with JTween and using it in your project, please visit the following links: 14 | * https://jeffcampbellmakesgames.github.io/unity-jtween/getting_started.html 15 | * https://jeffcampbellmakesgames.github.io/unity-jtween/usage.html 16 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Documentation/release_notes.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b22c682854cc1de4ea2589ed6c8cc4eb 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cdc135fb34a06b48a1118e4e10fe3ae 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/EditorConstants.cs: -------------------------------------------------------------------------------- 1 | namespace JCMG.JTween.Editor 2 | { 3 | internal class EditorConstants 4 | { 5 | // Menu Item Paths 6 | public const string MENU_ITEM_ROOT = "Tools/JTween/"; 7 | public const string MENU_ITEM_HELP_ROOT = "Tools/JTween/Help/"; 8 | 9 | // URLs 10 | public const string GITHUB_MASTER_URL = "https://github.com/jeffcampbellmakesgames/unity-jtween"; 11 | public const string GITHUB_DOCUMENTATION_URL = "https://jeffcampbellmakesgames.github.io/unity-jtween/"; 12 | public const string DONATE_COFFEE_URL = "https://www.ko-fi.com/StampyTurtle"; 13 | 14 | // File GUIDs 15 | public const string HELP_PDF_GUID = "aee48cda7b40e0946a693991d29f419e"; 16 | public const string API_PDF_GUID = "78b1b780aa1dcbf40bedcae87dca0f59"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/EditorConstants.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8cf45f612edb45afb83f67b873f612a8 3 | timeCreated: 1558677699 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/JCMG.JTween.Editor.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JCMG.JTween.Editor", 3 | "references": [ 4 | "GUID:842bf62986bbf2f4591cfd1f62569744" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [ 8 | "Editor" 9 | ], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": false, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [] 17 | } -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/JCMG.JTween.Editor.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e32652b119aeb4d4db05c6b37c6bac0c 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/MenuItems.cs: -------------------------------------------------------------------------------- 1 | using UnityEditor; 2 | using UnityEngine; 3 | 4 | namespace JCMG.JTween.Editor 5 | { 6 | internal static class MenuItems 7 | { 8 | private const string ALREADY_EXISTS_WARNING = 9 | "[JTween] JTweenControl is already present in the current scene."; 10 | 11 | [MenuItem(EditorConstants.MENU_ITEM_ROOT + "Add JTweenControl to Scene")] 12 | public static void AddJTweenControlToScene() 13 | { 14 | var jTweenControl = Object.FindObjectOfType(); 15 | if (jTweenControl == null) 16 | { 17 | var newGameObject = new GameObject(typeof(JTweenControl).Name); 18 | jTweenControl = newGameObject.AddComponent(); 19 | jTweenControl.EnsureDependencies(); 20 | } 21 | else 22 | { 23 | Debug.Log(ALREADY_EXISTS_WARNING, jTweenControl.gameObject); 24 | } 25 | 26 | EditorGUIUtility.PingObject(jTweenControl.gameObject); 27 | } 28 | 29 | [MenuItem(EditorConstants.MENU_ITEM_HELP_ROOT + "Open Github Page")] 30 | public static void OpenBrowserToGithub() 31 | { 32 | Application.OpenURL(EditorConstants.GITHUB_MASTER_URL); 33 | } 34 | 35 | [MenuItem(EditorConstants.MENU_ITEM_HELP_ROOT + "Open Online Manual")] 36 | public static void OpenBrowserToOnlineManual() 37 | { 38 | Application.OpenURL(EditorConstants.GITHUB_DOCUMENTATION_URL); 39 | } 40 | 41 | [MenuItem(EditorConstants.MENU_ITEM_HELP_ROOT + "Open Local Manual")] 42 | public static void OpenLocalManual() 43 | { 44 | var assetPath = AssetDatabase.GUIDToAssetPath(EditorConstants.HELP_PDF_GUID); 45 | var asset = AssetDatabase.LoadAssetAtPath(assetPath); 46 | AssetDatabase.OpenAsset(asset); 47 | } 48 | 49 | [MenuItem(EditorConstants.MENU_ITEM_HELP_ROOT + "Open Local API Reference")] 50 | public static void OpenLocalAPIReference() 51 | { 52 | var assetPath = AssetDatabase.GUIDToAssetPath(EditorConstants.API_PDF_GUID); 53 | var asset = AssetDatabase.LoadAssetAtPath(assetPath); 54 | AssetDatabase.OpenAsset(asset); 55 | } 56 | 57 | [MenuItem(EditorConstants.MENU_ITEM_HELP_ROOT + "Donate")] 58 | public static void OpenDonateCoffeePage() 59 | { 60 | Application.OpenURL(EditorConstants.DONATE_COFFEE_URL); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/MenuItems.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb053839c4cd4733b63d12f18516b875 3 | timeCreated: 1558677415 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7e5d6d342287c44196c9733a080e112 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/FastListTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | 3 | namespace JCMG.JTween.Editor.Tests 4 | { 5 | [TestFixture] 6 | internal class FastListTests 7 | { 8 | private FastList _fastList; 9 | 10 | [SetUp] 11 | public void Setup() 12 | { 13 | _fastList = new FastList(); 14 | } 15 | 16 | [Test] 17 | public void AssertThatRangeCanBeAdded() 18 | { 19 | var oneArray = new int[5]; 20 | for (var i = 0; i < oneArray.Length; i++) 21 | { 22 | oneArray[i] = 1; 23 | } 24 | 25 | _fastList.AddRange(oneArray); 26 | Assert.AreEqual(5, _fastList.Length); 27 | 28 | _fastList.AddRange(oneArray); 29 | Assert.AreEqual(10, _fastList.Length); 30 | 31 | _fastList.AddRange(oneArray); 32 | Assert.AreEqual(15, _fastList.Length); 33 | 34 | for (var i = 0; i < _fastList.Length; i++) 35 | { 36 | Assert.AreEqual(1, _fastList.buffer[i]); 37 | } 38 | } 39 | 40 | [Test] 41 | public void AssertThatRangeCanBeRemoved() 42 | { 43 | var oneArray = new int[5]; 44 | for (var i = 0; i < oneArray.Length; i++) 45 | { 46 | oneArray[i] = 1; 47 | } 48 | 49 | var twoArray = new int[5]; 50 | for (var i = 0; i < twoArray.Length; i++) 51 | { 52 | twoArray[i] = 2; 53 | } 54 | 55 | _fastList.AddRange(twoArray); 56 | _fastList.AddRange(oneArray); 57 | _fastList.AddRange(twoArray); 58 | 59 | _fastList.RemoveRange(5, 5); 60 | 61 | Assert.AreEqual(10, _fastList.Length); 62 | 63 | for (var i = 0; i < 10; i++) 64 | { 65 | Assert.AreEqual(2, _fastList.buffer[i]); 66 | } 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/FastListTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc96721ab1d44bcd856ff663dee0c570 3 | timeCreated: 1557217378 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/JCMG.JTween.Editor.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JCMG.JTween.Editor.Tests", 3 | "references": [ 4 | "GUID:842bf62986bbf2f4591cfd1f62569744" 5 | ], 6 | "optionalUnityReferences": [ 7 | "TestAssemblies" 8 | ], 9 | "includePlatforms": [ 10 | "Editor" 11 | ], 12 | "excludePlatforms": [], 13 | "allowUnsafeCode": false, 14 | "overrideReferences": false, 15 | "precompiledReferences": [], 16 | "autoReferenced": true, 17 | "defineConstraints": [], 18 | "versionDefines": [] 19 | } -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/JCMG.JTween.Editor.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 475e7be5e5a3387438dada6221044e70 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/StructSizeTests.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using UnityEngine; 3 | 4 | namespace JCMG.JTween.Editor.Tests 5 | { 6 | public class StructSizeTests 7 | { 8 | [Test] 9 | public void StructSizeTestsSimplePasses() 10 | { 11 | // When structs were being copied to and from native I had seen memcpy.string calls that caused 12 | // allocations, but did not when they were 40 or less bytes. From research this appears to be a 13 | // Mono JIT issue, but I still try to keep these as compact as possible and split up where GT 40 bytes. 14 | Assert.LessOrEqual(TweenTransformState.SizeOf(), 40, "TweenState Size: {0} > 40", TweenTransformState.SizeOf()); 15 | Assert.LessOrEqual(TweenTransformBatchState.SizeOf(), 40, "TweenBatch Size: {0} > 40", TweenTransformBatchState.SizeOf()); 16 | Assert.LessOrEqual(TweenLifetime.SizeOf(), 40, "TweenLifetime Size: {0} > 40", TweenLifetime.SizeOf()); 17 | Assert.LessOrEqual(TweenRotation.SizeOf(), 40, "TweenRotation Size: {0} > 40", TweenRotation.SizeOf()); 18 | Assert.LessOrEqual(TweenFloat4.SizeOf(), 40, "TweenFloat4 Size: {0} > 40", TweenFloat4.SizeOf()); 19 | Assert.LessOrEqual(TweenFloat3.SizeOf(), 40, "TweenFloat3 Size: {0} > 40", TweenFloat3.SizeOf()); 20 | Assert.LessOrEqual(TweenFloat2.SizeOf(), 40, "TweenFloat2 Size: {0} > 40", TweenFloat2.SizeOf()); 21 | Assert.LessOrEqual(TweenFloat1.SizeOf(), 40, "TweenFloat1 Size: {0} > 40", TweenFloat1.SizeOf()); 22 | 23 | //Debug.LogFormat("TweenState Size: {0}", TweenTransformState.SizeOf()); 24 | //Debug.LogFormat("TweenBatch Size: {0}", TweenTransformBatchState.SizeOf()); 25 | //Debug.LogFormat("TweenLifetime Size: {0}", TweenLifetime.SizeOf()); 26 | //Debug.LogFormat("TweenRotation Size: {0}", TweenRotation.SizeOf()); 27 | //Debug.LogFormat("TweenFloat4 Size: {0}", TweenFloat4.SizeOf()); 28 | //Debug.LogFormat("TweenFloat3 Size: {0}", TweenFloat3.SizeOf()); 29 | //Debug.LogFormat("TweenFloat2 Size: {0}", TweenFloat2.SizeOf()); 30 | //Debug.LogFormat("TweenFloat1 Size: {0}", TweenFloat1.SizeOf()); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Editor/Tests/StructSizeTests.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3f926a1030a8314aa857ca08983f092 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Engine.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65564368f373cbf4db4b157fd6fd0cce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Engine/Singleton.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace JCMG.JTween 4 | { 5 | /// 6 | /// A basic scene Singleton implementation. 7 | /// 8 | /// 9 | public abstract class Singleton : MonoBehaviour where T : Component 10 | { 11 | private static bool _applicationIsQuitting; 12 | 13 | private static T _instance; 14 | 15 | /// 16 | /// Returns the global instance. 17 | /// 18 | public static T Instance 19 | { 20 | get 21 | { 22 | if (!Exists && !_applicationIsQuitting) 23 | { 24 | _instance = FindObjectOfType(); 25 | 26 | if (!Exists) 27 | { 28 | _instance = new GameObject(typeof(T).Name).AddComponent(); 29 | } 30 | 31 | DontDestroyOnLoad(_instance); 32 | } 33 | 34 | return _instance; 35 | } 36 | } 37 | 38 | /// 39 | /// Returns true if the instance exists, otherwise false. 40 | /// 41 | public static bool Exists 42 | { 43 | get { return _instance != null; } 44 | } 45 | 46 | protected virtual void Awake() 47 | { 48 | if (!Exists) 49 | { 50 | _instance = this as T; 51 | DontDestroyOnLoad(gameObject); 52 | } 53 | else if (_instance != this) 54 | { 55 | Destroy(gameObject); 56 | } 57 | } 58 | 59 | protected virtual void OnApplicationQuit() 60 | { 61 | _instance = null; 62 | Destroy(gameObject); 63 | _applicationIsQuitting = true; 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Engine/Singleton.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc74583933e40658958475fad51ef9a 3 | timeCreated: 1556699759 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Extensions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0624910db049474982047887a076e0dd 3 | timeCreated: 1557038658 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Extensions/ArrayExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7cb3f30b1c864ea0bef125dfd3302785 3 | timeCreated: 1557301282 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Extensions/GameObjectExtensions.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace JCMG.JTween 4 | { 5 | internal static class GameObjectExtensions 6 | { 7 | /// 8 | /// Finds or creates component instance on this 9 | /// instance. 10 | /// 11 | /// 12 | /// 13 | /// 14 | internal static T FindOrCreate(this GameObject gameObject) where T : Component 15 | { 16 | var component = gameObject.GetComponent(); 17 | if (component == null) 18 | { 19 | component = gameObject.AddComponent(); 20 | } 21 | 22 | return component; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Extensions/GameObjectExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79d1b58811f94fe78abdb1476a03089f 3 | timeCreated: 1558509062 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Extensions/TransformExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe48e9ed641f43a79f072dd12730e959 3 | timeCreated: 1557038674 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JCMG.JTween.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "JCMG.JTween", 3 | "references": [ 4 | "GUID:8a2eafa29b15f444eb6d74f94a930e1d", 5 | "GUID:d8b63aba1907145bea998dd612889d6b", 6 | "GUID:e0cd26848372d4e5c891c569017e11f1", 7 | "GUID:b92ff8b696eb46a4b90382b319e963fe" 8 | ], 9 | "optionalUnityReferences": [], 10 | "includePlatforms": [], 11 | "excludePlatforms": [], 12 | "allowUnsafeCode": true, 13 | "overrideReferences": false, 14 | "precompiledReferences": [], 15 | "autoReferenced": true, 16 | "defineConstraints": [], 17 | "versionDefines": [] 18 | } -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JCMG.JTween.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 842bf62986bbf2f4591cfd1f62569744 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl.cs: -------------------------------------------------------------------------------- 1 |  2 | using UnityEngine; 3 | 4 | namespace JCMG.JTween 5 | { 6 | /// 7 | /// The global instance for JTween to interact with tweens, tween systems. 8 | /// 9 | [AddComponentMenu("JCMG/JTween/JTweenControl")] 10 | [RequireComponent( 11 | typeof(SingleTransformTweener), 12 | typeof(BatchTransformTweener))] 13 | public sealed partial class JTweenControl : Singleton 14 | { 15 | // Job Runners 16 | private SingleTransformTweener _singleTransformTweener; 17 | private BatchTransformTweener _batchTransformTweener; 18 | 19 | // Constants 20 | private ITweenHandle _invalidTweenHandle; 21 | 22 | protected override void Awake() 23 | { 24 | base.Awake(); 25 | 26 | EnsureDependencies(); 27 | } 28 | 29 | internal void EnsureDependencies() 30 | { 31 | _singleTransformTweener = gameObject.FindOrCreate(); 32 | _batchTransformTweener = gameObject.FindOrCreate(); 33 | } 34 | 35 | #if UNITY_EDITOR 36 | 37 | private void OnValidate() 38 | { 39 | EnsureDependencies(); 40 | } 41 | 42 | #endif 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe105f45de6f4e3a884fd892c947902b 3 | timeCreated: 1556607048 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 037b43eb13b2d724c9399e8386a8ca66 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl/JTweenControl_BatchTransforms.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77a93e958be44532aea5c6b3e6dd1a28 3 | timeCreated: 1557383871 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl/JTweenControl_Collections.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace JCMG.JTween 4 | { 5 | public sealed partial class JTweenControl 6 | { 7 | private readonly LinkedList _tweenSets = new LinkedList(); 8 | private readonly LinkedList _tweenSequences = new LinkedList(); 9 | 10 | /// 11 | /// Creates a new instance of or returns a pooled instance. 12 | /// 13 | /// 14 | public ITweenSet NewSet() 15 | { 16 | TweenSet tweenSet; 17 | if (_tweenSets.Count > 0) 18 | { 19 | tweenSet = _tweenSets.First.Value; 20 | _tweenSets.RemoveFirst(); 21 | } 22 | else 23 | { 24 | tweenSet = new TweenSet(); 25 | } 26 | 27 | return tweenSet; 28 | } 29 | 30 | /// 31 | /// Clears the contents of the and returns it to 32 | /// the pool. 33 | /// 34 | /// The instance to be recycled; any local reference to 35 | /// this should be cleared after it has been recycled. 36 | public void RecycleSet(ITweenSet tweenSet) 37 | { 38 | tweenSet.Clear(); 39 | _tweenSets.AddLast((TweenSet)tweenSet); 40 | } 41 | 42 | /// 43 | /// Creates a new instance of or returns a pooled instance. 44 | /// 45 | /// 46 | public ITweenSequence NewSequence() 47 | { 48 | TweenSequence tweenSequence; 49 | if (_tweenSequences.Count > 0) 50 | { 51 | tweenSequence = _tweenSequences.First.Value; 52 | _tweenSequences.RemoveFirst(); 53 | } 54 | else 55 | { 56 | tweenSequence = new TweenSequence(); 57 | } 58 | 59 | return tweenSequence; 60 | } 61 | 62 | /// 63 | /// Clears the contents of the and 64 | /// returns it to the pool. 65 | /// 66 | /// The instance to be recycled; any local 67 | /// reference to this should be cleared after it has been recycled. 68 | public void RecycleSequence(ITweenSequence tweenSequence) 69 | { 70 | _tweenSequences.AddLast((TweenSequence)tweenSequence); 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl/JTweenControl_Collections.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 08ccca7de93b4a11ac2eeb664606d938 3 | timeCreated: 1558261565 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JTweenControl/JTweenControl_Transform.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f99de975a8e49aab232cbf2fa6bcba2 3 | timeCreated: 1556019234 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 084deab2c5114b2a9c258fbc37afeda8 3 | timeCreated: 1557575309 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners/BatchTransformTweener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b3b0d2584a149cc8389d4081d135eb0 3 | timeCreated: 1557575413 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners/SingleTransformTweener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae4ddd2c5e1b45d4889e80787e4aafad 3 | timeCreated: 1557570782 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners/TransformTweenerBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75b0cd30baeb4a2a9ae15b766616a3a2 3 | timeCreated: 1557554421 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners/TweenerBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal abstract class TweenerBase : MonoBehaviour 7 | { 8 | // Event Queues 9 | 10 | /// 11 | /// An event queue for tween callbacks to notify external subscribers. 12 | /// 13 | protected readonly Queue _tweenHandleCallbackEventQueue 14 | = new Queue(RuntimeConstants.DEFAULT_FAST_LIST_SIZE); 15 | 16 | /// 17 | /// An event queue for user actions to manipulate tween data 18 | /// 19 | protected readonly Queue _tweenHandleActionEventQueue 20 | = new Queue(RuntimeConstants.DEFAULT_FAST_LIST_SIZE); 21 | 22 | // Pools for external use 23 | protected readonly LinkedList _tweenHandlePool = new LinkedList(); 24 | 25 | // Internal state 26 | protected float _deltaTime; 27 | protected bool _isJobScheduled; 28 | 29 | // Constants 30 | protected const string UPDATE_PROFILE = "Update"; 31 | protected const string LATE_UPDATE_PROFILE = "LateUpdate"; 32 | protected const string EVENT_STARTED_PROFILE = "Update.OnStartCallbacks"; 33 | protected const string EVENT_COMPLETED_PROFILE = "LateUpdate.OnCompleteCallbacks"; 34 | protected const string TRANSFORM_ACCESS_ARRAY_REMOVE_PROFILE = "TransformAccessArray.RemoveAtSwapBack"; 35 | protected const string FAST_LIST_REMOVE_AT = "FastList.RemoveAt"; 36 | protected const string FAST_LIST_REMOVE_RANGE = "FastList.RemoveRange"; 37 | 38 | protected const TweenStateType NO_HANDLE_START = TweenStateType.IsPlaying | TweenStateType.JustStarted; 39 | 40 | protected const TweenStateType HANDLE_START_PAUSED = 41 | TweenStateType.IsPaused | TweenStateType.JustStarted | TweenStateType.HasHandle; 42 | 43 | protected const TweenStateType HANDLE_START_PLAYING = 44 | TweenStateType.IsPlaying | TweenStateType.JustStarted | TweenStateType.HasHandle; 45 | 46 | internal abstract void QueueTweenHandleAction(TweenHandle tweenHandle); 47 | 48 | protected abstract void Teardown(); 49 | protected abstract void UpdateTweens(); 50 | protected abstract void LateUpdateTweens(); 51 | 52 | protected virtual void Awake() 53 | { 54 | Setup(); 55 | } 56 | 57 | protected virtual void Setup() 58 | { 59 | // Create a tween handle per instance of tween capacity 60 | for (var i = 0; i < RuntimeConstants.DEFAULT_FAST_LIST_SIZE; i++) 61 | { 62 | _tweenHandlePool.AddLast(new TweenHandle(this)); 63 | } 64 | } 65 | 66 | protected virtual void OnDestroy() 67 | { 68 | Teardown(); 69 | } 70 | 71 | protected virtual void Update() 72 | { 73 | _deltaTime = Time.deltaTime; 74 | 75 | UpdateTweens(); 76 | } 77 | 78 | protected virtual void LateUpdate() 79 | { 80 | LateUpdateTweens(); 81 | } 82 | 83 | protected TweenHandle GetNextAvailableTweenHandle() 84 | { 85 | TweenHandle tweenAccessor; 86 | if (_tweenHandlePool.Count > 0) 87 | { 88 | tweenAccessor = _tweenHandlePool.First.Value; 89 | tweenAccessor.Reset(); 90 | 91 | _tweenHandlePool.RemoveFirst(); 92 | } 93 | else 94 | { 95 | tweenAccessor = new TweenHandle(this); 96 | } 97 | 98 | return tweenAccessor; 99 | } 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/JobRunners/TweenerBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ccf4182f52a04bacbec21aea8df98077 3 | timeCreated: 1557569926 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdef8e1621a24b1bbe42c1a121e6abde 3 | timeCreated: 1557128877 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ApplyTweenToTransformJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Collections; 3 | using Unity.Mathematics; 4 | using UnityEngine.Jobs; 5 | 6 | namespace JCMG.JTween 7 | { 8 | [BurstCompile] 9 | internal struct ApplyTweenToTransformJob : IJobParallelForTransform 10 | { 11 | [ReadOnly] 12 | public NativeArray positions; 13 | 14 | [ReadOnly] 15 | public NativeArray rotations; 16 | 17 | [ReadOnly] 18 | public NativeArray scales; 19 | 20 | public NativeArray tweenStates; 21 | 22 | public void Execute(int i, TransformAccess transform) 23 | { 24 | var tweenState = tweenStates[i]; 25 | if (tweenState.IsCompleted() || tweenState.IsPaused()) 26 | { 27 | return; 28 | } 29 | 30 | if (tweenState.JustEnded()) 31 | { 32 | tweenState.state &= ~TweenStateType.IsPlaying; 33 | tweenState.state |= TweenStateType.IsCompleted; 34 | tweenStates[i] = tweenState; 35 | } 36 | 37 | if (tweenState.IsMovementEnabled()) 38 | { 39 | if (tweenState.IsMovementInWorldSpace()) 40 | { 41 | transform.position = positions[i]; 42 | } 43 | else 44 | { 45 | transform.localPosition = positions[i]; 46 | } 47 | } 48 | 49 | if (tweenState.IsRotationEnabled()) 50 | { 51 | if (tweenState.IsRotationInWorldSpace()) 52 | { 53 | transform.rotation = rotations[i]; 54 | } 55 | else 56 | { 57 | transform.localRotation = rotations[i]; 58 | } 59 | } 60 | 61 | if (tweenState.IsScalingEnabled()) 62 | { 63 | transform.localScale = scales[i]; 64 | } 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ApplyTweenToTransformJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a18e6a56b7944496bd99ab6f850c858e 3 | timeCreated: 1557558000 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ProcessBatchJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using Unity.Jobs; 3 | 4 | namespace JCMG.JTween 5 | { 6 | internal struct ProcessBatchJob : IJobParallelFor 7 | { 8 | public NativeArray batchLifetimes; 9 | 10 | public NativeArray tweenBatches; 11 | 12 | public float deltaTime; 13 | 14 | public void Execute(int index) 15 | { 16 | var tweenBatch = tweenBatches[index]; 17 | if (tweenBatch.IsCompleted() || tweenBatch.IsPaused()) 18 | { 19 | return; 20 | } 21 | 22 | var lifetime = batchLifetimes[index]; 23 | lifetime.Update(deltaTime); 24 | batchLifetimes[index] = lifetime; 25 | 26 | if (lifetime.GetProgress() >= 1f) 27 | { 28 | if (!tweenBatch.HasHandle()) 29 | { 30 | tweenBatch.state |= TweenStateType.RequiresRecycling; 31 | } 32 | 33 | tweenBatch.state |= TweenStateType.IsCompleted; 34 | tweenBatch.state |= TweenStateType.JustEnded; 35 | tweenBatch.state &= ~TweenStateType.IsPlaying; 36 | tweenBatches[index] = tweenBatch; 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ProcessBatchJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d9a0895fcfc4079979768ff0b57cf0d 3 | timeCreated: 1557304735 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ProcessTweenJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Burst; 2 | using Unity.Collections; 3 | using Unity.Jobs; 4 | using Unity.Mathematics; 5 | 6 | namespace JCMG.JTween 7 | { 8 | [BurstCompile] 9 | internal struct ProcessTweenJob : IJobParallelFor 10 | { 11 | [ReadOnly] 12 | public NativeArray tweenPositions; 13 | 14 | [ReadOnly] 15 | public NativeArray tweenRotations; 16 | 17 | [ReadOnly] 18 | public NativeArray tweenScales; 19 | 20 | [WriteOnly] 21 | public NativeArray positions; 22 | 23 | [WriteOnly] 24 | public NativeArray rotations; 25 | 26 | [WriteOnly] 27 | public NativeArray scales; 28 | 29 | public NativeArray tweenPositionLifetimes; 30 | 31 | public NativeArray tweenRotationLifetimes; 32 | 33 | public NativeArray tweenScaleLifetimes; 34 | 35 | public NativeArray tweenStates; 36 | 37 | public float deltaTime; 38 | 39 | private const byte TRUE = 1; 40 | 41 | public void Execute(int i) 42 | { 43 | var tweenState = tweenStates[i]; 44 | if (tweenState.IsCompleted() || tweenState.IsPaused()) 45 | { 46 | return; 47 | } 48 | 49 | var tweenIsPlaying = false; 50 | if (tweenState.IsMovementEnabled()) 51 | { 52 | var tweenLifetime = tweenPositionLifetimes[i]; 53 | tweenLifetime.Update(deltaTime); 54 | tweenPositionLifetimes[i] = tweenLifetime; 55 | 56 | var progress = tweenLifetime.GetProgress(); 57 | positions[i] = tweenPositions[i].Lerp(tweenLifetime.GetEase(), tweenLifetime.isReversed == TRUE); 58 | tweenIsPlaying = progress < 1f; 59 | } 60 | 61 | if (tweenState.IsRotationEnabled()) 62 | { 63 | var tweenLifetime = tweenRotationLifetimes[i]; 64 | tweenLifetime.Update(deltaTime); 65 | tweenRotationLifetimes[i] = tweenLifetime; 66 | 67 | var progress = tweenLifetime.GetProgress(); 68 | rotations[i] = tweenRotations[i].GetRotation( 69 | tweenLifetime.GetEase(), 70 | tweenLifetime.isReversed == TRUE, 71 | tweenState.GetRotateMode()); 72 | tweenIsPlaying = progress < 1f; 73 | } 74 | 75 | if (tweenState.IsScalingEnabled()) 76 | { 77 | var tweenLifetime = tweenScaleLifetimes[i]; 78 | tweenLifetime.Update(deltaTime); 79 | tweenScaleLifetimes[i] = tweenLifetime; 80 | 81 | var progress = tweenLifetime.GetProgress(); 82 | scales[i] = tweenScales[i].Lerp(tweenLifetime.GetEase(), tweenLifetime.isReversed == TRUE); 83 | tweenIsPlaying = progress < 1f; 84 | } 85 | 86 | if (!tweenIsPlaying) 87 | { 88 | if (!tweenState.HasHandle()) 89 | { 90 | tweenState.state |= TweenStateType.RequiresRecycling; 91 | } 92 | 93 | tweenState.state |= TweenStateType.JustEnded; 94 | } 95 | 96 | tweenStates[i] = tweenState; 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Jobs/ProcessTweenJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84cc9cc979b04590a8d059c537595f6e 3 | timeCreated: 1556781638 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Tools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 34052405d5a94f21a52b005f31f0e93f 3 | timeCreated: 1557385038 -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Tools/JTweenTools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections; 3 | using Unity.Collections.LowLevel.Unsafe; 4 | 5 | namespace JCMG.JTween 6 | { 7 | internal static class JTweenTools 8 | { 9 | public static TweenSpaceType GetTweenSpaceTypeFromRotateMode(RotateMode rotateMode) 10 | { 11 | TweenSpaceType spaceType; 12 | switch (rotateMode) 13 | { 14 | case RotateMode.XYZ: 15 | spaceType = TweenSpaceType.RotateModeXYZ; 16 | break; 17 | case RotateMode.X: 18 | spaceType = TweenSpaceType.RotateX; 19 | break; 20 | case RotateMode.Y: 21 | spaceType = TweenSpaceType.RotateY; 22 | break; 23 | case RotateMode.Z: 24 | spaceType = TweenSpaceType.RotateZ; 25 | break; 26 | default: 27 | throw new ArgumentOutOfRangeException(nameof(rotateMode), rotateMode, null); 28 | } 29 | 30 | return spaceType; 31 | } 32 | 33 | #region Unsafe Array Copy Methods 34 | 35 | public static unsafe void CopyTweenStateDirectlyToNativeArray( 36 | TweenTransformState[] sourceArray, 37 | NativeArray destinationArray, 38 | int length) 39 | { 40 | fixed (void* arrayPointer = sourceArray) 41 | { 42 | UnsafeUtility.MemCpy( 43 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(destinationArray), 44 | arrayPointer, 45 | length * TweenTransformState.SizeOf()); 46 | } 47 | } 48 | 49 | public static unsafe void CopyNativeArrayDirectlyToTweenState( 50 | NativeArray sourceArray, 51 | TweenTransformState[] destinationArray) 52 | { 53 | fixed (void* arrayPointer = destinationArray) 54 | { 55 | UnsafeUtility.MemCpy( 56 | arrayPointer, 57 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(sourceArray), 58 | sourceArray.Length * TweenTransformState.SizeOf()); 59 | } 60 | } 61 | 62 | public static unsafe void CopyTweenLifetimeDirectlyToNativeArray( 63 | TweenLifetime[] sourceArray, 64 | NativeArray destinationArray, 65 | int length) 66 | { 67 | fixed (void* arrayPointer = sourceArray) 68 | { 69 | UnsafeUtility.MemCpy( 70 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(destinationArray), 71 | arrayPointer, 72 | length * TweenLifetime.SizeOf()); 73 | } 74 | } 75 | 76 | public static unsafe void CopyNativeArrayDirectlyToTweenLifetime( 77 | NativeArray sourceArray, 78 | TweenLifetime[] destinationArray) 79 | { 80 | fixed (void* arrayPointer = destinationArray) 81 | { 82 | UnsafeUtility.MemCpy( 83 | arrayPointer, 84 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(sourceArray), 85 | sourceArray.Length * TweenLifetime.SizeOf()); 86 | } 87 | } 88 | 89 | public static unsafe void CopyTweenBatchDirectlyToNativeArray( 90 | TweenTransformBatchState[] sourceArray, 91 | NativeArray destinationArray, 92 | int length) 93 | { 94 | fixed (void* arrayPointer = sourceArray) 95 | { 96 | UnsafeUtility.MemCpy( 97 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(destinationArray), 98 | arrayPointer, 99 | length * TweenTransformBatchState.SizeOf()); 100 | } 101 | } 102 | 103 | public static unsafe void CopyNativeArrayDirectlyToTweenBatch( 104 | NativeArray sourceArray, 105 | TweenTransformBatchState[] destinationArray) 106 | { 107 | fixed (void* arrayPointer = destinationArray) 108 | { 109 | UnsafeUtility.MemCpy( 110 | arrayPointer, 111 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(sourceArray), 112 | sourceArray.Length * TweenTransformBatchState.SizeOf()); 113 | } 114 | } 115 | 116 | public static unsafe void CopyTween3DirectlyToNativeArray( 117 | TweenFloat3[] sourceArray, 118 | NativeArray destinationArray, 119 | int length) 120 | { 121 | fixed (void* arrayPointer = sourceArray) 122 | { 123 | UnsafeUtility.MemCpy( 124 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(destinationArray), 125 | arrayPointer, 126 | length * TweenFloat3.SizeOf()); 127 | } 128 | } 129 | 130 | public static unsafe void CopyTweenRotationDirectlyToNativeArray( 131 | TweenRotation[] sourceArray, 132 | NativeArray destinationArray, 133 | int length) 134 | { 135 | fixed (void* arrayPointer = sourceArray) 136 | { 137 | UnsafeUtility.MemCpy( 138 | NativeArrayUnsafeUtility.GetUnsafeBufferPointerWithoutChecks(destinationArray), 139 | arrayPointer, 140 | length * TweenRotation.SizeOf()); 141 | } 142 | } 143 | 144 | #endregion 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Unity/Assets/JCMG/JTween/Tools/JTweenTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c3a7d07603bc45e49b367c37401a7304 3 | timeCreated: 1557385110 -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bfb4acd5431ca654ba6a5bfeeaf651af 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/Generated.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 970f56e33b96be54c9ab16eaebf03f3d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/Generated/d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abf8475c343e46a4fa11d98b386a0e82 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/Generated/d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb/package.json: -------------------------------------------------------------------------------- 1 | {"name":"com.jeffcampbellmakesgames.jtween","displayName":"JTween","version":"1.0.1","unity":"2018.1","description":"JTween is a data-driven, job-based tweening library","keywords":["tween","animation","job"],"category":"Scripting","dependencies":{"com.unity.burst":"1.0.4","com.unity.collections":"0.0.9-preview.20","com.unity.jobs":"0.0.7-preview.13","com.unity.mathematics":"1.0.1"}} -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/Generated/d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b4be2ce97f8d4ee4dbdc744cdb8dcc71 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/PackageManifestConfig.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: a29f67b488b4458983fd973bbda8c8fa, type: 3} 13 | m_Name: PackageManifestConfig 14 | m_EditorClassIdentifier: 15 | packageSourcePaths: 16 | - Assets/JCMG 17 | packageDestinationPath: ../../unity-jtween-release 18 | packageName: com.jeffcampbellmakesgames.jtween 19 | displayName: JTween 20 | packageVersion: 1.0.1 21 | unityVersion: 2018.1 22 | description: JTween is a data-driven, job-based tweening library 23 | category: Scripting 24 | keywords: 25 | - tween 26 | - animation 27 | - job 28 | dependencies: 29 | - packageName: com.unity.burst 30 | packageVersion: 1.0.4 31 | - packageName: com.unity.collections 32 | packageVersion: 0.0.9-preview.20 33 | - packageName: com.unity.jobs 34 | packageVersion: 0.0.7-preview.13 35 | - packageName: com.unity.mathematics 36 | packageVersion: 1.0.1 37 | _id: d9b24522-6b4a-4188-b2b8-44f3a6e7ebcb 38 | -------------------------------------------------------------------------------- /Unity/Assets/PackageManifests/PackageManifestConfig.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: caec36921491f3e4e884dd97f3b0d460 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0b5b5b6c0aa89541a08ad7eddca26c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/SampleContent.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SampleContent", 3 | "references": [ 4 | "GUID:842bf62986bbf2f4591cfd1f62569744" 5 | ], 6 | "optionalUnityReferences": [], 7 | "includePlatforms": [], 8 | "excludePlatforms": [], 9 | "allowUnsafeCode": false, 10 | "overrideReferences": false, 11 | "precompiledReferences": [], 12 | "autoReferenced": true, 13 | "defineConstraints": [], 14 | "versionDefines": [] 15 | } -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/SampleContent.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d3d0ca33084957419ba10a977747679 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a87a3976fa0ae324fa0b828c94c87b08 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/01_Movement.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0db51975250ee754e92185ce679b05ac 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/02_Rotation.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 793a11ca06ae77f4a8ed3dfe9c6c1dd6 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/03_Scaling.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a8f1c4f7d3cba148b5e7e8c44dfe5e3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/04_Batching.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 086d3300eaaa90a4bae17333fab2e43d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/05_Events.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4259c35f6174c145ae4b1d7d5dbd113 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/06_TweenHandle.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd6ec88a5b99da24d80c78e2de466b19 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/07_TweenCollections.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f11276bc27361144a87755d10bd65907 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scenes/XX_PerformanceTesting.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc0d4010bbf28b4594072e72b8655ab 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 223cf56c8c8b7194baa423a18e92798a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b9e722205becf68478e03a0ab8e47206 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/BatchTweenEventExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using JCMG.JTween; 3 | using UnityEngine; 4 | 5 | namespace SampleContent 6 | { 7 | internal class BatchTweenEventExample : MonoBehaviour 8 | { 9 | [Header("Scene Refs")] 10 | [SerializeField] 11 | private Transform[] _objectGroupOne; 12 | 13 | [SerializeField] 14 | private Transform[] _objectGroupTwo; 15 | 16 | [SerializeField] 17 | private Transform[] _objectGroupThree; 18 | 19 | [Header("Animation"), Space(5)] 20 | [SerializeField] 21 | private float _duration; 22 | 23 | [SerializeField] 24 | private EaseType _easeType; 25 | 26 | [SerializeField] 27 | private Vector3 _moveDirection; 28 | 29 | private Vector3[] _oneFromTargets; 30 | private Vector3[] _oneToTargets; 31 | 32 | private Vector3[] _twoFromTargets; 33 | private Vector3[] _twoToTargets; 34 | 35 | private Vector3[] _threeFromTargets; 36 | private Vector3[] _threeToTargets; 37 | 38 | private List _transforms; 39 | private Vector3[] _gizmoTargets; 40 | 41 | private void Start() 42 | { 43 | // Tween Targets 44 | _oneFromTargets = new Vector3[_objectGroupOne.Length]; 45 | _oneFromTargets.PopulatePositionArray(_objectGroupOne, SpaceType.World); 46 | _oneToTargets = PopulateTweenToTargets(_objectGroupOne); 47 | 48 | _twoFromTargets = new Vector3[_objectGroupTwo.Length]; 49 | _twoFromTargets.PopulatePositionArray(_objectGroupTwo, SpaceType.World); 50 | _twoToTargets = PopulateTweenToTargets(_objectGroupTwo); 51 | 52 | _threeFromTargets = new Vector3[_objectGroupThree.Length]; 53 | _threeFromTargets.PopulatePositionArray(_objectGroupThree, SpaceType.World); 54 | _threeToTargets = PopulateTweenToTargets(_objectGroupThree); 55 | 56 | // Gizmos 57 | _transforms = new List(); 58 | _transforms.AddRange(_objectGroupOne); 59 | _transforms.AddRange(_objectGroupTwo); 60 | _transforms.AddRange(_objectGroupThree); 61 | 62 | _gizmoTargets = PopulateTweenToTargets(_transforms.ToArray()); 63 | 64 | // Kick off first tween 65 | TweenObjectOne(); 66 | } 67 | 68 | private void TweenObjectOne() 69 | { 70 | JTweenControl.Instance.BatchMove( 71 | _objectGroupOne, 72 | _oneFromTargets, 73 | _oneToTargets, 74 | _duration, 75 | easeType: _easeType, 76 | loopType: LoopType.PingPong, 77 | loopCount: 1, 78 | onComplete: TweenObjectTwo); 79 | } 80 | 81 | private void TweenObjectTwo() 82 | { 83 | JTweenControl.Instance.BatchMove( 84 | _objectGroupTwo, 85 | _twoFromTargets, 86 | _twoToTargets, 87 | _duration, 88 | easeType: _easeType, 89 | loopType: LoopType.PingPong, 90 | loopCount: 1, 91 | onComplete: TweenObjectThree); 92 | } 93 | 94 | private void TweenObjectThree() 95 | { 96 | JTweenControl.Instance.BatchMove( 97 | _objectGroupThree, 98 | _threeFromTargets, 99 | _threeToTargets, 100 | _duration, 101 | easeType: _easeType, 102 | loopType: LoopType.PingPong, 103 | loopCount: 1, 104 | onComplete: TweenObjectOne); 105 | } 106 | 107 | private Vector3[] PopulateTweenToTargets(Transform[] transforms) 108 | { 109 | var targets = new Vector3[transforms.Length]; 110 | for (var i = 0; i < transforms.Length; i++) 111 | { 112 | targets[i] = transforms[i].position + _moveDirection; 113 | } 114 | 115 | return targets; 116 | } 117 | 118 | #if UNITY_EDITOR 119 | 120 | private void OnDrawGizmos() 121 | { 122 | if (_objectGroupOne == null || _objectGroupTwo == null || _objectGroupThree == null) 123 | { 124 | return; 125 | } 126 | 127 | if (Application.isPlaying) 128 | { 129 | for (var i = 0; i < _transforms.Count; i++) 130 | { 131 | Gizmos.DrawLine(_transforms[i].position, _gizmoTargets[i]); 132 | } 133 | } 134 | else 135 | { 136 | for (var i = 0; i < _objectGroupOne.Length; i++) 137 | { 138 | if (_objectGroupOne[i] == null) 139 | { 140 | continue; 141 | } 142 | 143 | Gizmos.DrawLine(_objectGroupOne[i].position, _objectGroupOne[i].position + _moveDirection); 144 | } 145 | 146 | for (var i = 0; i < _objectGroupTwo.Length; i++) 147 | { 148 | if (_objectGroupTwo[i] == null) 149 | { 150 | continue; 151 | } 152 | 153 | Gizmos.DrawLine(_objectGroupTwo[i].position, _objectGroupTwo[i].position + _moveDirection); 154 | } 155 | 156 | for (var i = 0; i < _objectGroupThree.Length; i++) 157 | { 158 | if (_objectGroupThree[i] == null) 159 | { 160 | continue; 161 | } 162 | 163 | Gizmos.DrawLine(_objectGroupThree[i].position, _objectGroupThree[i].position + _moveDirection); 164 | } 165 | } 166 | } 167 | 168 | #endif 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/BatchTweenEventExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c0276b24e4644098d4f9b8998bfce72 3 | timeCreated: 1557730123 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/BatchingExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class BatchingExample : MonoBehaviour 7 | { 8 | [Header("Scene Refs")] 9 | [SerializeField] 10 | private GameObject prefab; 11 | 12 | [SerializeField] 13 | private Vector3 _center; 14 | 15 | [Header("UX"), Space(5)] 16 | [SerializeField] 17 | private Material _material; 18 | 19 | [Header("Animation"), Space(5)] 20 | [Range(10, 180)] 21 | [SerializeField] 22 | private float _angle; 23 | 24 | [SerializeField] 25 | private EaseType _easeType; 26 | 27 | [Min(0)] 28 | [SerializeField] 29 | private float _radius; 30 | 31 | [Min(0)] 32 | [SerializeField] 33 | private float _innerRadius; 34 | 35 | private Transform[] _transforms; 36 | 37 | private void Awake() 38 | { 39 | // Setup initial arrangement. 40 | var count = (int)(360 / _angle); 41 | _transforms = new Transform[count]; 42 | 43 | var index = 0; 44 | var currentAngle = 0f; 45 | while (index < count) 46 | { 47 | var spawnPosition = GetCirclePos(_center, currentAngle, _radius); 48 | var newGameObject = Instantiate(prefab, spawnPosition, Quaternion.identity); 49 | newGameObject.transform.LookAt(_center); 50 | 51 | newGameObject.GetComponent().material = _material; 52 | 53 | _transforms[index] = newGameObject.transform; 54 | 55 | index++; 56 | 57 | currentAngle += _angle; 58 | } 59 | } 60 | 61 | private void Start() 62 | { 63 | var fromArray = new Vector3[_transforms.Length]; 64 | fromArray.PopulatePositionArray(_transforms, SpaceType.World); 65 | 66 | var toArray = new Vector3[_transforms.Length]; 67 | var currentAngle = 0f; 68 | for (var i = 0; i < _transforms.Length; i++) 69 | { 70 | toArray[i] = GetCirclePos(_center, currentAngle, _innerRadius); 71 | currentAngle += _angle; 72 | } 73 | 74 | JTweenControl.Instance.BatchMove( 75 | _transforms, 76 | fromArray, 77 | toArray, 78 | 1, 79 | easeType: _easeType, 80 | loopType: LoopType.PingPong, 81 | loopCount: -1); 82 | } 83 | 84 | private Vector3 GetCirclePos(Vector3 center, float angle, float radius) 85 | { 86 | Vector3 pos; 87 | pos.x = center.x + radius * Mathf.Sin(angle * Mathf.Deg2Rad); 88 | pos.y = center.y + radius * Mathf.Cos(angle * Mathf.Deg2Rad); 89 | pos.z = center.z; 90 | return pos; 91 | } 92 | 93 | #if UNITY_EDITOR 94 | 95 | private void OnDrawGizmos() 96 | { 97 | Gizmos.color = Color.green; 98 | Gizmos.DrawSphere(_center, 0.5f); 99 | 100 | UnityEditor.Handles.color = Color.green; 101 | UnityEditor.Handles.DrawWireDisc(_center, Vector3.forward, _radius); 102 | 103 | UnityEditor.Handles.color = Color.cyan; 104 | UnityEditor.Handles.DrawWireDisc(_center, Vector3.forward, _innerRadius); 105 | } 106 | 107 | #endif 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/BatchingExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 535efc2cbae849a38b416d4b35ab035c 3 | timeCreated: 1557639015 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/LocalMovementExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class LocalMovementExample : MonoBehaviour 7 | { 8 | [SerializeField] 9 | private Vector3 _destination; 10 | 11 | private Vector3 _target; 12 | 13 | private void Start() 14 | { 15 | // This movement tween will move this transform in local space relative to its parent to the target. 16 | gameObject.transform.MoveLocal(_destination, 2, EaseType.BounceOut, LoopType.Restart, 5); 17 | 18 | // Get original local point for gizmo 19 | _target = gameObject.transform.TransformPoint(_destination); 20 | } 21 | 22 | private void OnDrawGizmos() 23 | { 24 | Gizmos.color = Color.green; 25 | if (Application.isPlaying) 26 | { 27 | Gizmos.DrawLine(gameObject.transform.position, _target); 28 | } 29 | else 30 | { 31 | Gizmos.DrawLine(gameObject.transform.position, gameObject.transform.TransformPoint(_destination)); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/LocalMovementExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb4dbaeca3c44adbb6a5e796faf49f08 3 | timeCreated: 1557081822 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/LocalRotationExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class LocalRotationExample : MonoBehaviour 7 | { 8 | private void Start() 9 | { 10 | transform.RotateYLocal(360f, 2f, loopType:LoopType.Restart, loopCount:-1); 11 | } 12 | 13 | #if UNITY_EDITOR 14 | 15 | private void OnDrawGizmos() 16 | { 17 | UnityEditor.Handles.color = Color.green; 18 | UnityEditor.Handles.DrawWireDisc(transform.position, transform.up, 1f); 19 | } 20 | 21 | #endif 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/LocalRotationExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed92b0b48c5f46338a93ec39abaaed48 3 | timeCreated: 1557123325 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/ScalingExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class ScalingExample : MonoBehaviour 7 | { 8 | [SerializeField] 9 | private Vector3 _scaleTarget; 10 | 11 | [Min(0f)] 12 | [SerializeField] 13 | private float _duration; 14 | 15 | [SerializeField] 16 | private EaseType _easeType; 17 | 18 | [SerializeField] 19 | private LoopType _loopType; 20 | 21 | [Min(-1)] 22 | [SerializeField] 23 | private int _loopCount; 24 | 25 | private void Start() 26 | { 27 | transform.Scale(_scaleTarget, _duration, _easeType, _loopType, _loopCount); 28 | } 29 | 30 | #if UNITY_EDITOR 31 | 32 | private void Reset() 33 | { 34 | _duration = 1f; 35 | _loopType = LoopType.PingPong; 36 | _loopCount = -1; 37 | } 38 | 39 | private void OnDrawGizmos() 40 | { 41 | // Show the general bounds of the scale target for simple primitive meshes. 42 | UnityEditor.Handles.color = Color.green; 43 | UnityEditor.Handles.DrawWireCube(transform.position, _scaleTarget); 44 | } 45 | 46 | #endif 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/ScalingExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 602974d6a1d74d5d8c47d05c8a32d828 3 | timeCreated: 1558245026 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/SingleTweenEventExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class SingleTweenEventExample : MonoBehaviour 7 | { 8 | [Header("Scene Refs")] 9 | [SerializeField] 10 | private Transform _objectOne; 11 | 12 | [SerializeField] 13 | private Transform _objectTwo; 14 | 15 | [SerializeField] 16 | private Transform _objectThree; 17 | 18 | [Header("Animation"), Space(5)] 19 | [SerializeField] 20 | private float _duration; 21 | 22 | [SerializeField] 23 | private EaseType _easeType; 24 | 25 | [SerializeField] 26 | private Vector3 _moveDirection; 27 | 28 | private Vector3 _gizmoTargetOne; 29 | private Vector3 _gizmoTargetTwo; 30 | private Vector3 _gizmoTargetThree; 31 | 32 | private void Start() 33 | { 34 | _gizmoTargetOne = _objectOne.position + _moveDirection; 35 | _gizmoTargetTwo = _objectTwo.position + _moveDirection; 36 | _gizmoTargetThree = _objectThree.position + _moveDirection; 37 | 38 | TweenObjectOne(); 39 | } 40 | 41 | private void TweenObjectOne() 42 | { 43 | _objectOne.Move( 44 | _objectOne.position + _moveDirection, 45 | _duration, 46 | _easeType, 47 | LoopType.PingPong, 48 | 1, 49 | onComplete: TweenObjectTwo); 50 | } 51 | 52 | private void TweenObjectTwo() 53 | { 54 | _objectTwo.Move( 55 | _objectTwo.position + _moveDirection, 56 | _duration, 57 | _easeType, 58 | LoopType.PingPong, 59 | 1, 60 | onComplete: TweenObjectThree); 61 | } 62 | 63 | private void TweenObjectThree() 64 | { 65 | _objectThree.Move( 66 | _objectThree.position + _moveDirection, 67 | _duration, 68 | _easeType, 69 | LoopType.PingPong, 70 | 1, 71 | onComplete: TweenObjectOne); 72 | } 73 | 74 | #if UNITY_EDITOR 75 | 76 | private void OnDrawGizmos() 77 | { 78 | if (_objectOne == null || _objectTwo == null || _objectThree == null) 79 | { 80 | return; 81 | } 82 | 83 | if (Application.isPlaying) 84 | { 85 | Gizmos.DrawLine(_objectOne.position, _gizmoTargetOne); 86 | Gizmos.DrawLine(_objectTwo.position, _gizmoTargetTwo); 87 | Gizmos.DrawLine(_objectThree.position, _gizmoTargetThree); 88 | } 89 | else 90 | { 91 | Gizmos.DrawLine(_objectOne.position, _objectOne.position + _moveDirection); 92 | Gizmos.DrawLine(_objectTwo.position, _objectTwo.position + _moveDirection); 93 | Gizmos.DrawLine(_objectThree.position, _objectThree.position + _moveDirection); 94 | } 95 | } 96 | 97 | #endif 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/SingleTweenEventExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9118b116afd54416b34601ef9d85ce5a 3 | timeCreated: 1557728692 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/TweenCollectionsExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | public class TweenCollectionsExample : MonoBehaviour 7 | { 8 | [Header("Scene Refs")] 9 | [SerializeField] 10 | private GameObject prefab; 11 | 12 | [SerializeField] 13 | private Vector3 _center; 14 | 15 | [Header("Tween Set One Animation"), Space(5)] 16 | [Min(0)] 17 | [SerializeField] 18 | private float _setOneDuration; 19 | 20 | [Range(10, 180)] 21 | [SerializeField] 22 | private float _angle; 23 | 24 | [SerializeField] 25 | private EaseType _setOneEaseType; 26 | 27 | [Min(0)] 28 | [SerializeField] 29 | private float _radius; 30 | 31 | [Min(0)] 32 | [SerializeField] 33 | private float _innerRadius; 34 | 35 | [Header("Tween Set Two Animation"), Space(5)] 36 | [Min(0)] 37 | [SerializeField] 38 | private float _setTwoDuration; 39 | 40 | [SerializeField] 41 | private EaseType _setTwoEaseType; 42 | 43 | [Header("Tween Sequence Animation"), Space(5)] 44 | [Min(0)] 45 | [SerializeField] 46 | private float _sequenceThreeDuration; 47 | 48 | [SerializeField] 49 | private EaseType _sequenceThreeEaseType; 50 | 51 | private Transform[] _transforms; 52 | 53 | private ITweenSet _tweenSetOne; 54 | private ITweenSet _tweenSetTwo; 55 | private ITweenSequence _tweenSequence; 56 | 57 | private void Awake() 58 | { 59 | // Setup initial arrangement. 60 | var count = (int)(360 / _angle); 61 | _transforms = new Transform[count]; 62 | 63 | var index = 0; 64 | var currentAngle = 0f; 65 | while (index < count) 66 | { 67 | var spawnPosition = GetCirclePos(_center, currentAngle, _radius); 68 | var newGameObject = Instantiate(prefab, spawnPosition, Quaternion.identity); 69 | newGameObject.transform.LookAt(_center); 70 | 71 | _transforms[index] = newGameObject.transform; 72 | 73 | index++; 74 | 75 | currentAngle += _angle; 76 | } 77 | } 78 | 79 | private void OnDestroy() 80 | { 81 | JTweenControl.Instance.RecycleSet(_tweenSetOne); 82 | JTweenControl.Instance.RecycleSet(_tweenSetTwo); 83 | JTweenControl.Instance.RecycleSequence(_tweenSequence); 84 | } 85 | 86 | private void Start() 87 | { 88 | _tweenSetOne = JTweenControl.Instance.NewSet(); 89 | _tweenSetTwo = JTweenControl.Instance.NewSet(); 90 | _tweenSequence = JTweenControl.Instance.NewSequence(); 91 | 92 | var currentAngle = 0f; 93 | for (var i = 0; i < _transforms.Length; i++) 94 | { 95 | var innerRadiusPosition = GetCirclePos(_center, currentAngle, _innerRadius); 96 | 97 | ITweenHandle tweenHandle; 98 | _transforms[i].Move( 99 | innerRadiusPosition, 100 | _setOneDuration, 101 | out tweenHandle, 102 | _setOneEaseType); 103 | 104 | _tweenSetOne.Add(tweenHandle); 105 | 106 | _transforms[i].RotateY( 107 | 360f, 108 | _setTwoDuration, 109 | out tweenHandle, 110 | _sequenceThreeEaseType); 111 | _tweenSetTwo.Add(tweenHandle); 112 | 113 | _transforms[i].Move( 114 | innerRadiusPosition, 115 | _transforms[i].position, 116 | _sequenceThreeDuration, 117 | out tweenHandle, 118 | _sequenceThreeEaseType); 119 | 120 | _tweenSequence.Add(tweenHandle); 121 | 122 | currentAngle += _angle; 123 | } 124 | 125 | _tweenSetOne.AddOnComplete(_tweenSetTwo.Rewind); 126 | _tweenSetOne.AddOnComplete(_tweenSetTwo.Play); 127 | 128 | _tweenSetTwo.AddOnComplete(_tweenSequence.Rewind); 129 | _tweenSetTwo.AddOnComplete(_tweenSequence.Play); 130 | 131 | _tweenSequence.AddOnComplete(_tweenSetOne.Rewind); 132 | _tweenSequence.AddOnComplete(_tweenSetOne.Play); 133 | 134 | _tweenSetOne.Play(); 135 | } 136 | 137 | private Vector3 GetCirclePos(Vector3 center, float angle, float radius) 138 | { 139 | Vector3 pos; 140 | pos.x = center.x + radius * Mathf.Sin(angle * Mathf.Deg2Rad); 141 | pos.y = center.y; 142 | pos.z = center.z + radius * Mathf.Cos(angle * Mathf.Deg2Rad); 143 | return pos; 144 | } 145 | 146 | #if UNITY_EDITOR 147 | 148 | private void OnDrawGizmos() 149 | { 150 | Gizmos.color = Color.green; 151 | Gizmos.DrawSphere(_center, 0.5f); 152 | 153 | UnityEditor.Handles.color = Color.green; 154 | UnityEditor.Handles.DrawWireDisc(_center, Vector3.up, _radius); 155 | 156 | UnityEditor.Handles.color = Color.cyan; 157 | UnityEditor.Handles.DrawWireDisc(_center, Vector3.up, _innerRadius); 158 | } 159 | 160 | #endif 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/TweenCollectionsExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 738c833de0d847f2bda98d0829973953 3 | timeCreated: 1558260721 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/TweenHandleExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace SampleContent 6 | { 7 | public class TweenHandleExample : MonoBehaviour 8 | { 9 | [Header("Scene Refs")] 10 | [SerializeField] 11 | private GameObject _moveObject; 12 | 13 | [SerializeField] 14 | private Vector3 _destination; 15 | 16 | [Header("Scene Refs")] 17 | [Space(5)] 18 | [SerializeField] 19 | private Button _playButton; 20 | 21 | [SerializeField] 22 | private Button _pauseButton; 23 | 24 | [SerializeField] 25 | private Button _restartButton; 26 | 27 | [SerializeField] 28 | private Button _rewindButton; 29 | 30 | [SerializeField] 31 | private Button _stopButton; 32 | 33 | [SerializeField] 34 | private Button _recycleButton; 35 | 36 | private Vector3 _originalPosition; 37 | private ITweenHandle _tweenHandle; 38 | 39 | private void Start() 40 | { 41 | _playButton.onClick.AddListener(OnPlayButtonClicked); 42 | _pauseButton.onClick.AddListener(OnPauseButtonClicked); 43 | _restartButton.onClick.AddListener(OnRestartButtonClicked); 44 | _rewindButton.onClick.AddListener(OnRewindButtonClicked); 45 | _stopButton.onClick.AddListener(OnStopButtonClicked); 46 | _recycleButton.onClick.AddListener(OnRecycleButtonClicked); 47 | 48 | _originalPosition = _moveObject.transform.position; 49 | } 50 | 51 | private void OnPlayButtonClicked() 52 | { 53 | if (_tweenHandle == null) 54 | { 55 | // This movement tween will move this transform in world space to the target area. 56 | _moveObject.transform.Move( 57 | _originalPosition, 58 | _destination, 59 | 2, 60 | out _tweenHandle, 61 | EaseType.BounceOut); 62 | 63 | _tweenHandle.AddOnStartedListener(OnTweenStarted); 64 | _tweenHandle.AddOnCompletedListener(OnTweenCompleted); 65 | _tweenHandle.Play(); 66 | } 67 | else 68 | { 69 | _tweenHandle.Play(); 70 | } 71 | } 72 | 73 | private void OnPauseButtonClicked() 74 | { 75 | if (_tweenHandle != null) 76 | { 77 | _tweenHandle.Pause(); 78 | } 79 | else 80 | { 81 | Debug.Log("Tween needs to be created first via Play button before trying to pause it."); 82 | } 83 | } 84 | 85 | private void OnRestartButtonClicked() 86 | { 87 | if (_tweenHandle != null) 88 | { 89 | _tweenHandle.Restart(); 90 | } 91 | else 92 | { 93 | Debug.Log("Tween needs to be created first via Play button before trying to restart it."); 94 | } 95 | } 96 | 97 | private void OnRewindButtonClicked() 98 | { 99 | if (_tweenHandle != null) 100 | { 101 | _tweenHandle.Rewind(); 102 | } 103 | else 104 | { 105 | Debug.Log("Tween needs to be created first via Play button before trying to rewind it."); 106 | } 107 | } 108 | 109 | private void OnStopButtonClicked() 110 | { 111 | if (_tweenHandle != null) 112 | { 113 | _tweenHandle.Stop(); 114 | } 115 | else 116 | { 117 | Debug.Log("Tween needs to be created first via Play button before trying to stop it."); 118 | } 119 | } 120 | 121 | private void OnRecycleButtonClicked() 122 | { 123 | if (_tweenHandle != null) 124 | { 125 | _tweenHandle.Recycle(); 126 | _tweenHandle = null; 127 | } 128 | else 129 | { 130 | Debug.Log("Tween needs to be created first via Play button before trying to recycle it."); 131 | } 132 | } 133 | 134 | private void OnTweenStarted() 135 | { 136 | Debug.Log("Tween Started"); 137 | } 138 | 139 | private void OnTweenCompleted() 140 | { 141 | Debug.Log("Tween Completed"); 142 | } 143 | 144 | private void OnDrawGizmos() 145 | { 146 | if (_moveObject == null) 147 | { 148 | return; 149 | } 150 | 151 | Gizmos.color = Color.green; 152 | Gizmos.DrawLine(_moveObject.transform.position, _destination); 153 | } 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/TweenHandleExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef6f6ddbfac2451c8b69463c0fac432b 3 | timeCreated: 1557990224 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/WorldMovementExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class WorldMovementExample : MonoBehaviour 7 | { 8 | [SerializeField] 9 | private Vector3 _destination; 10 | 11 | private void Start() 12 | { 13 | // This movement tween will move this transform in world space to the target area. 14 | gameObject.transform.Move(_destination, 2, EaseType.BounceOut, LoopType.Restart, 5); 15 | } 16 | 17 | private void OnDrawGizmos() 18 | { 19 | Gizmos.color = Color.green; 20 | Gizmos.DrawLine(gameObject.transform.position, _destination); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/WorldMovementExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b9f75fdc9f2a4a4ea46f28754ed1113 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/WorldRotationExample.cs: -------------------------------------------------------------------------------- 1 | using JCMG.JTween; 2 | using UnityEngine; 3 | 4 | namespace SampleContent 5 | { 6 | internal class WorldRotationExample : MonoBehaviour 7 | { 8 | private void Start() 9 | { 10 | transform.RotateY(360f, 2f, EaseType.Linear, LoopType.Restart, -1); 11 | } 12 | 13 | #if UNITY_EDITOR 14 | 15 | private void OnDrawGizmos() 16 | { 17 | UnityEditor.Handles.color = Color.green; 18 | UnityEditor.Handles.DrawWireDisc(transform.position, Vector3.up, 1f); 19 | } 20 | 21 | #endif 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Examples/WorldRotationExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c9f69fa479a4e00ab5fdefe69de03d8 3 | timeCreated: 1557121669 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 427c76d0aac143949b694d96055d9b3d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color01.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Color01 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 1, b: 0.27627563, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color01.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a43171d921a99a469eff9cead03c218 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color02.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Color02 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 0.20492086, b: 0, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color02.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27fef9b57bb416b4e8a27c115fca7bba 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color03.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Color03 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0.92274237, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/Materials/Color03.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64537b248e14014419b8bbe30e7b406c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/PerformanceTesting.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c664440ae92d4dd690a0998dd2743022 3 | timeCreated: 1557129328 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/PerformanceTesting/JTweenTester.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: baa76cc627884285b402eeb7d30af56c 3 | timeCreated: 1556616531 -------------------------------------------------------------------------------- /Unity/Assets/SampleContent/Scripts/PerformanceTesting/TweenTesterBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b7e9705bbba048ce9e34ed2c3c98c0aa 3 | timeCreated: 1556915606 -------------------------------------------------------------------------------- /Unity/Assets/csc.rsp: -------------------------------------------------------------------------------- 1 | -nowarn:0649 2 | -------------------------------------------------------------------------------- /Unity/Assets/csc.rsp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25610c77d3facf1429054ba959ed1dfd 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Unity/JCMG.JTween.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True 8 | True 9 | True 10 | True 11 | True 12 | True 13 | True 14 | True 15 | True 16 | True -------------------------------------------------------------------------------- /Unity/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.jeffcampbellmakesgames.packagetools": "https://github.com/jeffcampbellmakesgames/unity-package-tools.git#release/stable", 4 | "com.unity.burst": "1.0.4", 5 | "com.unity.collections": "0.0.9-preview.20", 6 | "com.unity.jobs": "0.0.7-preview.13", 7 | "com.unity.mathematics": "1.0.1", 8 | "com.unity.package-manager-ui": "2.1.2", 9 | "com.unity.modules.ai": "1.0.0", 10 | "com.unity.modules.animation": "1.0.0", 11 | "com.unity.modules.assetbundle": "1.0.0", 12 | "com.unity.modules.audio": "1.0.0", 13 | "com.unity.modules.cloth": "1.0.0", 14 | "com.unity.modules.director": "1.0.0", 15 | "com.unity.modules.imageconversion": "1.0.0", 16 | "com.unity.modules.imgui": "1.0.0", 17 | "com.unity.modules.jsonserialize": "1.0.0", 18 | "com.unity.modules.particlesystem": "1.0.0", 19 | "com.unity.modules.physics": "1.0.0", 20 | "com.unity.modules.physics2d": "1.0.0", 21 | "com.unity.modules.screencapture": "1.0.0", 22 | "com.unity.modules.terrain": "1.0.0", 23 | "com.unity.modules.terrainphysics": "1.0.0", 24 | "com.unity.modules.tilemap": "1.0.0", 25 | "com.unity.modules.ui": "1.0.0", 26 | "com.unity.modules.uielements": "1.0.0", 27 | "com.unity.modules.umbra": "1.0.0", 28 | "com.unity.modules.unityanalytics": "1.0.0", 29 | "com.unity.modules.unitywebrequest": "1.0.0", 30 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 31 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 32 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 33 | "com.unity.modules.unitywebrequestwww": "1.0.0", 34 | "com.unity.modules.vehicles": "1.0.0", 35 | "com.unity.modules.video": "1.0.0", 36 | "com.unity.modules.vr": "1.0.0", 37 | "com.unity.modules.wind": "1.0.0", 38 | "com.unity.modules.xr": "1.0.0" 39 | }, 40 | "lock": { 41 | "com.jeffcampbellmakesgames.packagetools": { 42 | "hash": "2c2578f315df7c37dfd9158389f2b40424b63873", 43 | "revision": "release/stable" 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/BurstAotSettings_Android.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "m_Enabled": true, 4 | "m_EditorHideFlags": 0, 5 | "m_Name": "", 6 | "m_EditorClassIdentifier": "Unity.Burst.Editor:Unity.Burst.Editor:BurstPlatformAotSettings", 7 | "DisableOptimisations": false, 8 | "DisableSafetyChecks": true, 9 | "DisableBurstCompilation": false 10 | } 11 | } -------------------------------------------------------------------------------- /Unity/ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "m_Enabled": true, 4 | "m_EditorHideFlags": 0, 5 | "m_Name": "", 6 | "m_EditorClassIdentifier": "Unity.Burst.Editor:Unity.Burst.Editor:BurstPlatformAotSettings", 7 | "DisableOptimisations": false, 8 | "DisableSafetyChecks": true, 9 | "DisableBurstCompilation": false 10 | } 11 | } -------------------------------------------------------------------------------- /Unity/ProjectSettings/BurstAotSettings_iOS.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "m_Enabled": true, 4 | "m_EditorHideFlags": 0, 5 | "m_Name": "", 6 | "m_EditorClassIdentifier": "Unity.Burst.Editor:Unity.Burst.Editor:BurstPlatformAotSettings", 7 | "DisableOptimisations": false, 8 | "DisableSafetyChecks": true, 9 | "DisableBurstCompilation": false 10 | } 11 | } -------------------------------------------------------------------------------- /Unity/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/SampleContent/Scenes/XX_PerformanceTesting.unity 10 | guid: 9fc0d4010bbf28b4594072e72b8655ab 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Hidden Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0} 40 | - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} 41 | m_PreloadedShaders: [] 42 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 43 | type: 0} 44 | m_CustomRenderPipeline: {fileID: 0} 45 | m_TransparencySortMode: 0 46 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 47 | m_DefaultRenderingPath: 1 48 | m_DefaultMobileRenderingPath: 1 49 | m_TierSettings: [] 50 | m_LightmapStripping: 0 51 | m_FogStripping: 0 52 | m_InstancingStripping: 0 53 | m_LightmapKeepPlain: 1 54 | m_LightmapKeepDirCombined: 1 55 | m_LightmapKeepDynamicPlain: 1 56 | m_LightmapKeepDynamicDirCombined: 1 57 | m_LightmapKeepShadowMask: 1 58 | m_LightmapKeepSubtractive: 1 59 | m_FogKeepLinear: 1 60 | m_FogKeepExp: 1 61 | m_FogKeepExp2: 1 62 | m_AlbedoSwatchInfos: [] 63 | m_LightsUseLinearIntensity: 0 64 | m_LightsUseColorTemperature: 0 65 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 1 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: [] 7 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2019.1.0f2 2 | m_EditorVersionWithRevision: 2019.1.0f2 (292b93d75a2c) 3 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 1 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_RenderPipeSettingsPath: 10 | m_FixedTimeStep: 0.016666668 11 | m_MaxDeltaTime: 0.05 12 | -------------------------------------------------------------------------------- /Unity/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /Unity/SampleContent.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True -------------------------------------------------------------------------------- /docs/api/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | | JTween 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 | 27 | 50 | 51 | 58 |
59 |
60 | 61 |
62 |
63 |
64 |

65 |
66 |
    67 |
    68 |
    69 | 100 | 101 |
    102 |
    103 | 112 |
    113 |
    114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /docs/api/toc.html: -------------------------------------------------------------------------------- 1 |  2 |
    3 |
    4 |
    5 |
    6 | 7 | 8 |
    9 |
    10 |
    11 |
    12 | 13 | 58 |
    59 |
    60 |
    61 |
    -------------------------------------------------------------------------------- /docs/articles/intro.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Add your introductions here! | JTween 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
    25 |
    26 | 27 | 50 | 51 | 58 |
    59 |
    60 | 61 |
    62 |
    63 |
    64 |

    65 |
    66 |
      67 |
      68 |
      69 | 101 | 102 |
      103 |
      104 | 113 |
      114 |
      115 | 116 | 117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /docs/articles/toc.html: -------------------------------------------------------------------------------- 1 |  2 |
      3 |
      4 |
      5 |
      6 | 7 | 8 |
      9 |
      10 |
      11 |
      12 | 13 | 18 |
      19 |
      20 |
      21 |
      -------------------------------------------------------------------------------- /docs/credits.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | | JTween 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
      25 |
      26 | 27 | 50 | 51 | 58 |
      59 |
      60 | 61 |
      62 |
      63 |
      64 |

      65 |
      66 |
        67 |
        68 |
        69 | 95 | 96 |
        97 |
        98 | 107 |
        108 |
        109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/favicon.ico -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /docs/images/app_icon_navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/images/app_icon_navbar.png -------------------------------------------------------------------------------- /docs/images/fun_example_02.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/images/fun_example_02.gif -------------------------------------------------------------------------------- /docs/images/fun_example_04.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jeffcampbellmakesgames/unity-jtween/12bfad173f2d3140394e19bd52cad10e2b51d008/docs/images/fun_example_04.gif -------------------------------------------------------------------------------- /docs/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | Created by Docfx 9 | 10 | 12 | 15 | 21 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/release_notes.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 1.0.1 | JTween 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
        25 |
        26 | 27 | 50 | 51 | 58 |
        59 |
        60 | 61 |
        62 |
        63 |
        64 |

        65 |
        66 |
          67 |
          68 |
          69 | 108 | 109 |
          110 |
          111 | 120 |
          121 |
          122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /docs/search-stopwords.json: -------------------------------------------------------------------------------- 1 | [ 2 | "a", 3 | "able", 4 | "about", 5 | "across", 6 | "after", 7 | "all", 8 | "almost", 9 | "also", 10 | "am", 11 | "among", 12 | "an", 13 | "and", 14 | "any", 15 | "are", 16 | "as", 17 | "at", 18 | "be", 19 | "because", 20 | "been", 21 | "but", 22 | "by", 23 | "can", 24 | "cannot", 25 | "could", 26 | "dear", 27 | "did", 28 | "do", 29 | "does", 30 | "either", 31 | "else", 32 | "ever", 33 | "every", 34 | "for", 35 | "from", 36 | "get", 37 | "got", 38 | "had", 39 | "has", 40 | "have", 41 | "he", 42 | "her", 43 | "hers", 44 | "him", 45 | "his", 46 | "how", 47 | "however", 48 | "i", 49 | "if", 50 | "in", 51 | "into", 52 | "is", 53 | "it", 54 | "its", 55 | "just", 56 | "least", 57 | "let", 58 | "like", 59 | "likely", 60 | "may", 61 | "me", 62 | "might", 63 | "most", 64 | "must", 65 | "my", 66 | "neither", 67 | "no", 68 | "nor", 69 | "not", 70 | "of", 71 | "off", 72 | "often", 73 | "on", 74 | "only", 75 | "or", 76 | "other", 77 | "our", 78 | "own", 79 | "rather", 80 | "said", 81 | "say", 82 | "says", 83 | "she", 84 | "should", 85 | "since", 86 | "so", 87 | "some", 88 | "than", 89 | "that", 90 | "the", 91 | "their", 92 | "them", 93 | "then", 94 | "there", 95 | "these", 96 | "they", 97 | "this", 98 | "tis", 99 | "to", 100 | "too", 101 | "twas", 102 | "us", 103 | "wants", 104 | "was", 105 | "we", 106 | "were", 107 | "what", 108 | "when", 109 | "where", 110 | "which", 111 | "while", 112 | "who", 113 | "whom", 114 | "why", 115 | "will", 116 | "with", 117 | "would", 118 | "yet", 119 | "you", 120 | "your" 121 | ] 122 | -------------------------------------------------------------------------------- /docs/styles/main.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE file in the project root for full license information. 2 | -------------------------------------------------------------------------------- /docs/styles/search-worker.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | importScripts('lunr.min.js'); 3 | 4 | var lunrIndex; 5 | 6 | var stopWords = null; 7 | var searchData = {}; 8 | 9 | lunr.tokenizer.seperator = /[\s\-\.]+/; 10 | 11 | var stopWordsRequest = new XMLHttpRequest(); 12 | stopWordsRequest.open('GET', '../search-stopwords.json'); 13 | stopWordsRequest.onload = function () { 14 | if (this.status != 200) { 15 | return; 16 | } 17 | stopWords = JSON.parse(this.responseText); 18 | buildIndex(); 19 | } 20 | stopWordsRequest.send(); 21 | 22 | var searchDataRequest = new XMLHttpRequest(); 23 | 24 | searchDataRequest.open('GET', '../index.json'); 25 | searchDataRequest.onload = function () { 26 | if (this.status != 200) { 27 | return; 28 | } 29 | searchData = JSON.parse(this.responseText); 30 | 31 | buildIndex(); 32 | 33 | postMessage({ e: 'index-ready' }); 34 | } 35 | searchDataRequest.send(); 36 | 37 | onmessage = function (oEvent) { 38 | var q = oEvent.data.q; 39 | var hits = lunrIndex.search(q); 40 | var results = []; 41 | hits.forEach(function (hit) { 42 | var item = searchData[hit.ref]; 43 | results.push({ 'href': item.href, 'title': item.title, 'keywords': item.keywords }); 44 | }); 45 | postMessage({ e: 'query-ready', q: q, d: results }); 46 | } 47 | 48 | function buildIndex() { 49 | if (stopWords !== null && !isEmpty(searchData)) { 50 | lunrIndex = lunr(function () { 51 | this.pipeline.remove(lunr.stopWordFilter); 52 | this.ref('href'); 53 | this.field('title', { boost: 50 }); 54 | this.field('keywords', { boost: 20 }); 55 | 56 | for (var prop in searchData) { 57 | if (searchData.hasOwnProperty(prop)) { 58 | this.add(searchData[prop]); 59 | } 60 | } 61 | 62 | var docfxStopWordFilter = lunr.generateStopWordFilter(stopWords); 63 | lunr.Pipeline.registerFunction(docfxStopWordFilter, 'docfxStopWordFilter'); 64 | this.pipeline.add(docfxStopWordFilter); 65 | this.searchPipeline.add(docfxStopWordFilter); 66 | }); 67 | } 68 | } 69 | 70 | function isEmpty(obj) { 71 | if(!obj) return true; 72 | 73 | for (var prop in obj) { 74 | if (obj.hasOwnProperty(prop)) 75 | return false; 76 | } 77 | 78 | return true; 79 | } 80 | })(); 81 | -------------------------------------------------------------------------------- /docs/toc.html: -------------------------------------------------------------------------------- 1 |  2 |
          3 |
          4 |
          5 |
          6 | 7 | 8 |
          9 |
          10 |
          11 |
          12 | 13 | 36 |
          37 |
          38 |
          39 |
          -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Jeff Campbell 2 | 3 | ### Non-legalese summary 4 | * You can freely use JTween in both commercial and non-commercial projects. 5 | * You can modify the code only for your own use and you cannot redistribute modified versions. 6 | * JTween was/is hard work: please respect the copyright. 7 | 8 | ### Definitions 9 | #### Copyright Holder 10 | Jeff Campbell 11 | 12 | #### You/Your 13 | Means any person who would like to copy, distribute, or modify the Package. 14 | 15 | #### Package 16 | Means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. 17 | 18 | #### Distribute 19 | Means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. 20 | 21 | #### Standard Version 22 | Refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. 23 | 24 | #### Modified Version 25 | Means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. 26 | 27 | ### License 28 | You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. 29 | 30 | You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers and also include the original readme.txt file. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. 31 | 32 | Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. 33 | 34 | This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Jeff Campbell 2 | 3 | ### Non-legalese summary 4 | * You can freely use JTween in both commercial and non-commercial projects. 5 | * You can modify the code only for your own use and you cannot redistribute modified versions. 6 | * JTween was/is hard work: please respect the copyright. 7 | 8 | ### Definitions 9 | #### Copyright Holder 10 | Jeff Campbell 11 | 12 | #### You/Your 13 | Means any person who would like to copy, distribute, or modify the Package. 14 | 15 | #### Package 16 | Means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. 17 | 18 | #### Distribute 19 | Means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. 20 | 21 | #### Standard Version 22 | Refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. 23 | 24 | #### Modified Version 25 | Means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. 26 | 27 | ### License 28 | You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. 29 | 30 | You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers and also include the original readme.txt file. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. 31 | 32 | Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. 33 | 34 | This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # JTween 2 | 3 | ## About 4 | **JTween** is a data-driven, job-based tweening library. It places a focus on performance by attempting to shift the processing of tween data and applying that data to tween targets on Job threads. This currently applies to Transforms only, but as the Entity-Component System of the Unity **DOTS** stack reaches maturity this approach can likely be applied to other components. 5 | 6 | For further information including usage, documentation, examples, contribution and style guidelines, and license information please visit [here](https://jeffcampbellmakesgames.github.io/unity-jtween/). 7 | 8 | You can read more about my experience porting my previous tween engine to leverage Unity's **DOTS**, now named **JTween** here https://www.jeffcampbellmakes.games/blog/2019/5/26/diving-in-headfirst-unitys-job-system-and-jtween. 9 | 10 | ## Support 11 | If this is useful to you and/or you’d like to see future development and more tools in the future, please consider supporting it either by contributing to the Github projects (submitting bug reports or features,pull requests) or by buying me coffee using any of the links below. Every little bit helps! 12 | 13 | [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I2W7GX) 14 | 15 | ## Visual Examples 16 | 17 | ![Example 01](https://github.com/jeffcampbellmakesgames/unity-jtween/blob/master/DocFXProject/images/fun_example_02.gif) 18 | 19 | ![Example 02](https://github.com/jeffcampbellmakesgames/unity-jtween/blob/master/DocFXProject/images/fun_example_04.gif) 20 | --------------------------------------------------------------------------------