Commit 38b86410 authored by 张媛's avatar 张媛

金币动效

parent 02502499
import React from 'react'; import React from 'react';
import "./canvasTestCom.less";
import {GoldCoinAni} from "./goldCoinAni"; import {GoldCoinAni} from "./goldCoinAni";
interface TestProps { interface TestProps {
/**设置主题色 */ /**设置主题色 */
...@@ -11,7 +10,8 @@ const goldCoinReceiveAniCallback =(goldCode)=>{ ...@@ -11,7 +10,8 @@ const goldCoinReceiveAniCallback =(goldCode)=>{
console.log(goldCode); console.log(goldCode);
} }
export const GoldCoinCom = (pros:TestProps)=>{ export const GoldCoinCom = (pros:TestProps)=>{
const goldCoinAni = new GoldCoinAni([150, 200], [516, 200], "../../asserts/homeGoldIconImg.png", goldCoinReceiveAniCallback.bind(this), true, 0.2, 10, 400); stage.removeAllChildren();
const goldCoinAni = new GoldCoinAni([100, 200], [516, 200], "//yun.duiba.com.cn/spark/assets/b0709b25a9c0357c8d832e661345ee59c04b7aca.png", goldCoinReceiveAniCallback.bind(this), true, 0.2, 10, 400);
stage.addChild(goldCoinAni); stage.addChild(goldCoinAni);
goldCoinAni.triggerAni(); goldCoinAni.triggerAni();
return ( return (
......
...@@ -2,7 +2,7 @@ import React from 'react'; ...@@ -2,7 +2,7 @@ import React from 'react';
import { PolygonSystemCom } from '../canvasCom/polygonSystemCom/PolygonSystemCom.tsx'; import { PolygonSystemCom } from '../canvasCom/polygonSystemCom/PolygonSystemCom.tsx';
export default { export default {
component: PolygonSystemCom, component: PolygonSystemCom,
title: 'Canvas组件/Button', title: 'Canvas组件/polygonSystem',
//👇 Creates specific argTypes //👇 Creates specific argTypes
argTypes: { argTypes: {
backgroundColor: { control: 'color' }, backgroundColor: { control: 'color' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment