ProcessingJoy —— 简单的 3D 文字【JAVA】
        【摘要】 
                    效果图 
 
  
 
  
 代码和注释 
 /// @note 测试字符串String strs[] = {    "Hello" + "\n" + "Processing" + "\n" + "Creative" + "\n" + "Develop",    "ProcessingJoy ",    ...
    
    
    
    效果图


代码和注释
  
   - 
    
     
    
    
      
     
    
- 
    
     
    
    
     
      /// @note 测试字符串
     
    
- 
    
     
    
    
     
      String strs[] = {
     
    
- 
    
     
    
    
         "Hello" + "\n" + "Processing" + "\n" + "Creative" + "\n" + "Develop",
     
    
- 
    
     
    
    
         "ProcessingJoy ",
     
    
- 
    
     
    
    
         " ShaderJoy ",
     
    
- 
    
     
    
    
         "Code & " +  "Art"
     
    
- 
    
     
    
    
     
      };
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     
      color cols[] = {color(0), color(64, 38, 0), color(128, 77, 0), color(255, 153, 0)};
     
    
- 
    
     
    
    
     
      String str;
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     
      public void setup()
     
    
- 
    
     
    
    
     
      {
     
    
- 
    
     
    
    
     
          size(640, 480);
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     
          background(cols[0]);
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         //text
     
    
- 
    
     
    
    
         int fontSize = 14;
     
    
- 
    
     
    
    
         PFont font =  createFont("SourceCodePro-Regular.ttf", fontSize);
     
    
- 
    
     
    
    
     
          textFont(font);
     
    
- 
    
     
    
    
     
          str = strs[int(random(strs.leng
     
    
 文章来源: panda1234lee.blog.csdn.net,作者:panda1234lee,版权归原作者所有,如需转载,请联系作者。
原文链接:panda1234lee.blog.csdn.net/article/details/112223397
        【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
            cloudbbs@huaweicloud.com
        
        
        
        
        
        
        - 点赞
- 收藏
- 关注作者
 
             
           
评论(0)