Skip to content

Instantly share code, notes, and snippets.

View ina-amagami's full-sized avatar

AMAGAMI ina-amagami

View GitHub Profile
@ina-amagami
ina-amagami / index.ejs
Last active November 27, 2023 15:03
CocosでCapacitorを利用するためにindex.htmlを修正する
<%- include(cocosTemplate, {}) %>
<!-- ↑こちらは削除して以下に置き換える -->
<% if (webDebuggerSrc) { %>
<script src="<%=webDebuggerSrc%>"></script>
<script type="text/javascript">
// open web debugger console
window.VConsole && (window.vConsole = new VConsole());
</script>
@ina-amagami
ina-amagami / index.html
Created November 23, 2023 15:51
Cocos x Capacitorを動くようにする
<script>
System.import('./index.js').catch(function(err) { console.error(err); })
</script>
<!-- 上記は消して以下に置き換える -->
<script src="./index.js"></script>
@ina-amagami
ina-amagami / ResponsiveCanvasScaler.cs
Created February 14, 2023 14:48
モバイル表示でもPCのワイド表示でもちょうど良い感じに表示するためのCanvasScaler
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// PC/モバイル両方にレスポンシブ対応するためのCanvasScaler
/// </summary>
public class ResponsiveCanvasScaler : CanvasScaler
{
private float _defaultMatchWidthOrHeight;
private int _cachedWidth;
@ina-amagami
ina-amagami / CircleSoft.shader
Created April 2, 2022 10:21
UIで円形に切り抜くシェーダ
Shader "UI/CircleSoft"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
_StencilComp("Stencil Comparison", Float) = 8
_Stencil("Stencil ID", Float) = 0
_StencilOp("Stencil Operation", Float) = 0
@ina-amagami
ina-amagami / HideImage.cs
Last active March 28, 2022 07:04
uGUIで描画を行わない、入力をとるだけの専用コンポーネント
using UnityEngine;
using UnityEngine.UI;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class HideImage : Graphic
{
public override Material material
@ina-amagami
ina-amagami / header.php
Created March 24, 2022 05:28
JINテーマのサイトを英語設定にする
<!DOCTYPE html>
<!-- <html lang="ja"> ← これを↓に置き換え -->
<html <?php language_attributes(); ?>>
@ina-amagami
ina-amagami / content-none.php
Created February 28, 2022 12:27
JINの404ページから読み込まれるcontent-none.phpを英語化
<div class="content-none">
<?php if( is_404() ){
echo '<p>Thank you for visiting our website. <br />We\'re sorry, but the article you tried to access has either been deleted or the URL has been changed. We apologize for the inconvenience, but please try the following methods to find the page you are looking for again.</p>';
}elseif( is_search() ){
$r = get_search_query();
echo '<p>I searched for "'.$r.'", but could not find the article. We apologize for the inconvenience, but please try the following methods to find the article you are looking for again.</p>';
} ?>
<h2>1. search and find</h2>
<p>Enter the keywords that correspond to the content you are looking for in the search box. A list of pages with similar themes will be displayed.</p>
<div class="widget-box">
@ina-amagami
ina-amagami / search.php
Created February 28, 2022 11:11
JINの検索結果画面を英語化
<?php get_header(); ?>
<div id="contents">
<!--メインコンテンツ-->
<main id="main-contents" class="main-contents <?php echo is_article_design(); ?> <?php is_animation_style(); ?>" itemscope itemtype="https://schema.org/Blog">
<section class="cps-post-box hentry">
<header class="archive-post-header">
<span class="archive-title-sub ef">― SEARCH WORD ―</span>
<h1 class="archive-title entry-title" itemprop="headline">
@ina-amagami
ina-amagami / 404.php
Created February 28, 2022 11:01
JINの404を英語化
<?php get_header(); ?>
<div id="contents">
<!--メインコンテンツ-->
<main id="main-contents" class="main-contents <?php echo is_article_design(); ?> <?php is_animation_style(); ?>" itemprop="mainContentOfPage">
<section class="cps-post-box hentry">
<article class="cps-post">
<header class="cps-post-header">
<h1 class="cps-post-title entry-title" itemprop="headline">The article you were looking for was not found.</h1>
@ina-amagami
ina-amagami / style.css
Created February 28, 2022 10:33
JINのボックス文字を英語化
/* ボックスの文字を英語化 */
body .concept-box1:before{
content: "What's important" !important;
}
body .concept-box2:before{
content: "Be careful" !important;
}
body .concept-box3:before{
content: "Good" !important;
}