[GIF] The Phase Property in GIF Loop Coder
2016-08-29 19:54
218 查看
In this lesson, we look at one of the most powerful features in GIF Loop Coder, the phase property, which allows you to let different objects run animations shifted in time.
function onGLC(glc) { glc.loop(); // glc.size(400, 400); // glc.setDuration(5); // glc.setFPS(20); //glc.setMode('single'); glc.setEasing(false); var list = glc.renderList, width = glc.w, height = glc.h, color = glc.color; // your code goes here: glc.styles.backgroundColor = "black"; for(var i = 0; i < 1000; i++){ list.addCircle({ x: Math.random() * width, y: Math.random() * height, radius: [0.25,1], fillStyle: "white", phase: Math.random() + 10 }) } list.addText({ x: width / 2, y: height / 2 + 20, fontSize: [18, 24], text: "Tecnotree Way of Work (WoW)", fillStyle: ["white", "yellow"], }) }
function onGLC(glc) { glc.loop(); // glc.size(400, 400); // glc.setDuration(5); // glc.setFPS(20); //glc.setMode('single'); //glc.setEasing(false); var list = glc.renderList, width = glc.w, height = glc.h, color = glc.color; // your code goes here: var res = 10; for(var y = 0; y < height; y += res){ for(var x = 0; x < width; x +=res){ var dx = x - width / 2, dy = y - height / 2, dist = Math.sqrt(dx * dx+dy*dy); list.addCircle({ translationX: x, translationY: y, x: res / 2, y: res / 2, radius: res / 2, fillStyle: ["red", "yellow"], phase: -dist / 100 }) } } }
相关文章推荐
- [GIF] Shape Objects in GIF Loop Coder
- [GIF] Colors in GIF Loop Coder
- [GIF] Parenting in GIF Loop Coder
- VMWare虚拟机实例拷贝到另一台服务器后出现Error in the RPC receive loop: RpcIn: Unable to send.错误的解决
- [原] XAF How to see and edit the time part in the DatePropertyEditor for the System.DateTime property
- Fw:Managing View State in ASP.NET 4 Using the New ViewStateMode Property
- the investors buy the property in question.
- modify the font of pages in PropertySheet
- No object in the CompoundRoot has a publicly accessible property named
- [BTS] Loading property information list by namespace failed or property not found in the list. Verify that the schema is deployed properly.
- Creating a Web Control with an Expandable Property in the Designer by Using C#.
- No object in the CompoundRoot has a publicly accessible property named
- Using the innerText Property in Firefox
- ExtJS中表格控件的使用,属性设置和数据的获取(copyfrom:http://www.itzhai.com/extjs-form-controls-in-the-use-of-property-)
- No object in the CompoundRoot has a publicly accessible property named
- C++/C The variable in the LOOP STRUCT
- Secrets Stolen, Fortunes Lost: Preventing Intellectual Property Theft and Economic Espionage in the
- 高级bash编程一书Example 3-3. Running a loop in the background的问题
- FW:Use the OnReadyStateChange Property in Visual Basic and Visual C/C++
- Parsing Failure in config.xml: java.lang.IllegalArgumentException: In production mode, it's not allowed to set a clear text value to the property