@quenty/blend
Advanced tools
Comparing version 2.0.1-canary.238.2c4d310.0 to 2.0.1-canary.238.f89c386.0
@@ -6,3 +6,3 @@ # Change Log | ||
## [2.0.1-canary.238.2c4d310.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@2.0.0...@quenty/blend@2.0.1-canary.238.2c4d310.0) (2021-12-29) | ||
## [2.0.1-canary.238.f89c386.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@2.0.0...@quenty/blend@2.0.1-canary.238.f89c386.0) (2021-12-30) | ||
@@ -9,0 +9,0 @@ **Note:** Version bump only for package @quenty/blend |
{ | ||
"name": "@quenty/blend", | ||
"version": "2.0.1-canary.238.2c4d310.0", | ||
"version": "2.0.1-canary.238.f89c386.0", | ||
"description": "Declarative UI system.", | ||
@@ -30,21 +30,21 @@ "keywords": [ | ||
"dependencies": { | ||
"@quenty/acceltween": "2.0.1-canary.238.2c4d310.0", | ||
"@quenty/brio": "3.5.1-canary.238.2c4d310.0", | ||
"@quenty/instanceutils": "3.5.1-canary.238.2c4d310.0", | ||
"@quenty/loader": "3.1.2-canary.238.2c4d310.0", | ||
"@quenty/maid": "2.0.2-canary.238.2c4d310.0", | ||
"@quenty/promise": "3.3.1-canary.238.2c4d310.0", | ||
"@quenty/rx": "3.5.1-canary.238.2c4d310.0", | ||
"@quenty/spring": "3.0.1-canary.238.2c4d310.0", | ||
"@quenty/steputils": "3.0.1-canary.238.2c4d310.0", | ||
"@quenty/string": "2.2.1-canary.238.2c4d310.0", | ||
"@quenty/symbol": "2.0.1-canary.238.2c4d310.0", | ||
"@quenty/valuebaseutils": "3.5.1-canary.238.2c4d310.0", | ||
"@quenty/valueobject": "3.5.1-canary.238.2c4d310.0" | ||
"@quenty/acceltween": "2.0.1-canary.238.f89c386.0", | ||
"@quenty/brio": "3.5.1-canary.238.f89c386.0", | ||
"@quenty/instanceutils": "3.5.1-canary.238.f89c386.0", | ||
"@quenty/loader": "3.1.2-canary.238.f89c386.0", | ||
"@quenty/maid": "2.0.2-canary.238.f89c386.0", | ||
"@quenty/promise": "3.3.1-canary.238.f89c386.0", | ||
"@quenty/rx": "3.5.1-canary.238.f89c386.0", | ||
"@quenty/spring": "3.0.1-canary.238.f89c386.0", | ||
"@quenty/steputils": "3.0.1-canary.238.f89c386.0", | ||
"@quenty/string": "2.2.1-canary.238.f89c386.0", | ||
"@quenty/symbol": "2.0.1-canary.238.f89c386.0", | ||
"@quenty/valuebaseutils": "3.5.1-canary.238.f89c386.0", | ||
"@quenty/valueobject": "3.5.1-canary.238.f89c386.0" | ||
}, | ||
"devDependencies": { | ||
"@quenty/contentproviderutils": "3.3.1-canary.238.2c4d310.0", | ||
"@quenty/playerthumbnailutils": "3.4.1-canary.238.2c4d310.0" | ||
"@quenty/contentproviderutils": "3.3.1-canary.238.f89c386.0", | ||
"@quenty/playerthumbnailutils": "3.4.1-canary.238.f89c386.0" | ||
}, | ||
"gitHead": "2c4d310b84afd0570d89667dc5d4aa69a0ef304a" | ||
"gitHead": "f89c3863db94c96adc936ea31a49e0c770756dd0" | ||
} |
## Blend | ||
<div align="center"> | ||
<a href="http://quenty.github.io/NevermoreEngine/"> | ||
<img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" /> | ||
<img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" /> | ||
</a> | ||
@@ -16,2 +16,4 @@ <a href="https://discord.gg/mhtGUS8"> | ||
<div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/Blend">View docs →</a></div> | ||
## Installation | ||
@@ -28,47 +30,2 @@ ``` | ||
* Extensible | ||
* No implicit reliance upon GC | ||
## Usage | ||
See files in src/Client/Test that are stories. Blend returns an observable that will create/return one instance. | ||
Note that subscribe function anchors everything into a maid/cleanup function that can be used to disconnect the whole tree. | ||
```lua | ||
local require = ... -- Nevermore import here | ||
local Blend = require("Blend") | ||
local Maid = require("Maid") | ||
local maid = Maid.new() | ||
local isVisible = Instance.new("BoolValue") | ||
isVisible.Value = false | ||
local percentVisible = Blend.Spring(Blend.Computed(isVisible, function(visible) | ||
return visible and 1 or 0 | ||
end), 35) | ||
local transparency = Blend.Computed(percentVisible, function(percent) | ||
return 1 - percent | ||
end) | ||
maid:GiveTask((Blend.New "Frame" { | ||
Size = UDim2.new(0.5, 0, 0.5, 0); | ||
BackgroundColor3 = Color3.new(0.9, 0.9, 0.9); | ||
AnchorPoint = Vector2.new(0.5, 0.5); | ||
Position = UDim2.new(0.5, 0, 0.5, 0); | ||
BackgroundTransparency = transparency; | ||
Parent = parent; -- TODO: Assign parent | ||
[Blend.Children] = { | ||
Blend.New "UIScale" { | ||
Scale = Blend.Computed(percentVisible, function(percent) | ||
return 0.8 + 0.2*percent | ||
end); | ||
}; | ||
Blend.New "UICorner" { | ||
CornerRadius = UDim.new(0.05, 0); | ||
}; | ||
}; | ||
}):Subscribe()) | ||
``` | ||
* No implicit reliance upon GC |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32920
29
+ Added@quenty/acceltween@2.0.1-canary.238.f89c386.0(transitive)
+ Added@quenty/brio@3.5.1-canary.238.f89c386.0(transitive)
+ Added@quenty/deferred@2.0.2-canary.238.f89c386.0(transitive)
+ Added@quenty/instanceutils@3.5.1-canary.238.f89c386.0(transitive)
+ Added@quenty/loader@3.1.2-canary.238.f89c386.0(transitive)
+ Added@quenty/maid@2.0.2-canary.238.f89c386.0(transitive)
+ Added@quenty/promise@3.3.1-canary.238.f89c386.0(transitive)
+ Added@quenty/rx@3.5.1-canary.238.f89c386.0(transitive)
+ Added@quenty/signal@2.0.1-canary.238.f89c386.0(transitive)
+ Added@quenty/spring@3.0.1-canary.238.f89c386.0(transitive)
+ Added@quenty/steputils@3.0.1-canary.238.f89c386.0(transitive)
+ Added@quenty/string@2.2.1-canary.238.f89c386.0(transitive)
+ Added@quenty/symbol@2.0.1-canary.238.f89c386.0(transitive)
+ Added@quenty/table@2.1.1-canary.238.f89c386.0(transitive)
+ Added@quenty/throttle@3.2.1-canary.238.f89c386.0(transitive)
+ Added@quenty/valuebaseutils@3.5.1-canary.238.f89c386.0(transitive)
+ Added@quenty/valueobject@3.5.1-canary.238.f89c386.0(transitive)
- Removed@quenty/acceltween@2.0.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/brio@3.5.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/deferred@2.0.2-canary.238.2c4d310.0(transitive)
- Removed@quenty/instanceutils@3.5.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/loader@3.1.2-canary.238.2c4d310.0(transitive)
- Removed@quenty/maid@2.0.2-canary.238.2c4d310.0(transitive)
- Removed@quenty/promise@3.3.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/rx@3.5.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/signal@2.0.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/spring@3.0.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/steputils@3.0.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/string@2.2.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/symbol@2.0.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/table@2.1.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/throttle@3.2.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/valuebaseutils@3.5.1-canary.238.2c4d310.0(transitive)
- Removed@quenty/valueobject@3.5.1-canary.238.2c4d310.0(transitive)