Socket
Socket
Sign inDemoInstall

@jiaminghi/c-render

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jiaminghi/c-render - npm Package Compare versions

Comparing version 0.2.9 to 0.2.10

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# 0.2.10-alpha (2019-05-26)
### Perfect
- **core:** `animationDelay` Optimize animationDelay.
# 0.2.9-alpha (2019-05-24)

@@ -2,0 +8,0 @@

9

class/crender.class.js

@@ -190,3 +190,3 @@ import color from '@jiaminghi/color'

resolve()
})
}, Date.now())
})

@@ -198,5 +198,6 @@ }

* @param {Function} callback Callback in animation end
* @param {Number} timeStamp Time stamp of animation start
* @return {Undefined} Void
*/
function animation (callback) {
function animation (callback, timeStamp) {
const { graphs } = this

@@ -210,7 +211,7 @@

graphs.forEach(graph => graph.turnNextAnimationFrame())
graphs.forEach(graph => graph.turnNextAnimationFrame(timeStamp))
this.drawAllGraph()
requestAnimationFrame(animation.bind(this, callback))
requestAnimationFrame(animation.bind(this, callback, timeStamp))
}

@@ -217,0 +218,0 @@

@@ -274,7 +274,9 @@ import Style from './style.class'

*/
Graph.prototype.turnNextAnimationFrame = function () {
const { animationRoot, animationKeys, animationFrameState, animationPause } = this
Graph.prototype.turnNextAnimationFrame = function (timeStamp) {
const { animationDelay, animationRoot, animationKeys, animationFrameState, animationPause } = this
if (animationPause) return
if (Date.now() - timeStamp < animationDelay) return
animationRoot.forEach((root, i) => {

@@ -281,0 +283,0 @@ animationKeys[i].forEach(key => {

{
"name": "@jiaminghi/c-render",
"version": "0.2.9",
"version": "0.2.10",
"author": "JiaMing <743192023@qq.com>",

@@ -5,0 +5,0 @@ "description": "Canvas-based vector graphics rendering plugin",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc