Comments (7)
I think there are some open threads on FPS limitations in CEP panels (ex: https://community.adobe.com/t5/after-effects-bugs/running-cep-extensions-at-above-30fps-on-macos/idc-p/13273332#M808), but this seems different.
from cep-resources.
Example: I forked the AfterEffectsPanel form the Samples section, and made a progress bar that runs in a requestAnimationFrame loop. Note the slowdown when the panel width is odd vs even:
Screen.Recording.2022-10-11.at.4.25.18.PM.mov
from cep-resources.
Code to replicate:
index.html
<!doctype html>
<!--
/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2014 Adobe Inc.
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
**************************************************************************/
-->
<html>
<head>
<meta charset="utf-8">
<script src="./ext.js"></script>
<script src="./lib/CSInterface.js"></script>
<script src="./lib/jquery-1.9.1.js"></script>
<script src="./lib/Vulcan.js"></script>
<script type="text/javascript">
let count = 0;
$(document).ready(function () {
function render() {
var bar = document.getElementById("myBar");
function increase() {
count = count + 1;
if (count <= 100) {
bar.style.width = count + "%";
window.requestAnimationFrame(increase)
} else {
window.requestAnimationFrame(decrease)
}
}
function decrease() {
count = count - 1;
if (count >= 0) {
bar.style.width = count + "%";
window.requestAnimationFrame(decrease)
} else {
window.requestAnimationFrame(increase)
}
}
window.requestAnimationFrame(increase);
}
// For functions which require interaction at the JavaScript level, we provide these JQuery-based
// handlers, instead of directly invoking ExtendScript .This givs the JavaScript layer a chance
// to pass data into the ExtendScript layer, and process the results.
$("#sendtext").on("click", function (e) {
e.preventDefault();
window.requestAnimationFrame(render);
});
});
</script>
<link rel="stylesheet" type="text/css" href="./style.css">
</head>
<body onLoad="onLoaded()">
<a href="javascript:history.go(0)">Refresh panel</a>
<button id="sendtext">Start</button>
<div id="counterdiv"></div>
<div id="myProgress">
<div id="myBar"></div>
</div>
</body>
</html>
style.css
/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2014 Adobe Inc.
* All Rights Reserved.
*
* NOTICE: Adobe permits you to use, modify, and distribute this file in
* accordance with the terms of the Adobe license agreement accompanying
* it. If you have received this file from a source other than Adobe,
* then your use, modification, or distribution of it requires the prior
* written permission of Adobe.
**************************************************************************/
body {
text-align:center;
}
button, select, input
{
border:1px solid;
height:19px;
}
input[type=text]
{
height:16px;
}
#content {
margin-right:auto;
margin-left:auto;
vertical-align:middle;
width:100%;
}
#content ul {
padding:0px;
}
#content ul li {
margin:3px 0px 3px 0px;
}
#myProgress {
width: 100%;
background-color: grey;
}
#myBar {
width: 1%;
height: 30px;
background-color: green;
}
Same thing with setInterval()
instead of requestAnimationFrame()
from cep-resources.
Hi @cameronjeffords, thank you for the code!
MAX is next week so everyone is stretched a bit thin at the moment. I've asked for folks to investigate but may after MAX before we hear anything...
from cep-resources.
Hi @ErinFinnegan - Thanks! Totally understand everyone is busy, just wanted to get this on the radar. Please keep me updated, hope to hear back soon after.
Good luck on MAX!
from cep-resources.
Hey @ErinFinnegan , any updates on this? Do you know if the team will be investigating?
from cep-resources.
It seems like I was following a conversation about this somewhere else - were you also discussing this in a forum thread? 🤔 If not, no worries...
from cep-resources.
Related Issues (20)
- ZXPSignCmd not validating cert chain?
- InDesign crashes when a native plugin is used AND there is a CEP plugin with eventHandlers attached via JSX HOT 3
- Which CEP version ships in Illustrator 2023? HOT 2
- Javascript CC Reference docs incomplete HOT 3
- Illustrator 27.1.1 crashes on startup with AIHostAdapter installed HOT 7
- Packaging CEP extension with HostAdapter plugins installation issue HOT 1
- Need API to move CEP dialog so that the Dialog can be centered on the screen after resizing
- Can't do D&D from CEP panel to Adobe Premiere after update to Premiere Pro 2022 HOT 10
- exportOptionsPNG24.antiAliasing not working HOT 1
- Drag unresponsive inside Adobe CEP html engine on Mac when using the Leva UI library
- Circumventing --ignore-certificate-errors
- ZXPSignCmd on MacOS M1 Pro loops in Terminal
- JSDoc parsing error in type expressions for @param tags
- Cannot use CMD+V to paste inside a shadow DOM input element (After-Effects) HOT 2
- Types of parameters in MOGRT.
- Trouble finding a timestamp service that works HOT 1
- Adobe CC session/user information HOT 2
- Possible to capture a screenshot / current Program Monitor output as image?
- ZXPSignCmd signing zxp using certificate with USB token HOT 3
- CEP 11.1 Character Encoding Issue Breaking Module Import HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cep-resources.